@use "sass:map";
@use "@twig/scss/_global" as global;
@use "@twig/scss/variables/_variables-components" as components;

$params: (
   "title-font-weight": global.$font-weight-bold,
   "link-back-margin": 20px,

   "btn-icon-margin": 10px,
   "btn-icon-color": global.$green,
   "btn-icon-size": 16px,
   "btn-icon-offset": 3px,
);

@if global-variable-exists(c-product-reviews-utils-formswitch, components) {
   $keys: map.keys(components.$c-product-reviews-utils-formswitch);
   @each $name in $keys {
      @if not map.get($params, $name) {
         @warn "Neexistující proměnná '#{$name}' v komponentě '$#{component("Product:Reviews:Utils:FormSwitch", "class")}'.";
      }
   }

   $params: map.merge($params, components.$c-product-reviews-utils-formswitch);
}

.#{component("Product:Reviews:Utils:FormSwitch", "class")} {
   .btn-form-switch {
      .c-icon {
         position: relative;
         top: map.get($params, "btn-icon-offset");
         margin-right: map.get($params, "btn-icon-margin");
         font-size: map.get($params, "btn-icon-size");
         color: map.get($params, "btn-icon-color");
      }
   }

   .title-default {
      font-weight: map.get($params, "title-font-weight");
   }

   .checkform-link-back {
      margin-top: map.get($params, "link-back-margin");
      margin-bottom: 0;
      text-align: center;

      a {
         cursor: pointer;
      }
   }
}
