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

$params: (
   "form-width": 400px,
   "name-margin-bottom": 0,

   "name-font-weight": global.$font-weight-bold,
   "name-font-size": global.$font-size-base,

   "title-font-size": global.$font-size-base,
   "title-font-weight": global.$font-weight-base,
);

@if global-variable-exists(c-utils-forms-productquestion-form, components) {
   $keys: map.keys(components.$c-utils-forms-productquestion-form);
   @each $name in $keys {
      @if not map.get($params, $name) {
         @warn "Neexistující proměnná '#{$name}' v komponentě '$#{component("Utils:Forms:ProductQuestion:Form", "class")}'.";
      }
   }

   $params: map.merge($params, components.$c-utils-forms-productquestion-form);
}

.#{component("Utils:Forms:ProductQuestion:Form", "class")} {
   container-type: inline-size;
   width: map.get($params, "form-width");
   max-width: 100%;

   .comment-ref-info {

      .name {
         font-weight: map.get($params, "name-font-weight");
         margin-bottom: map.get($params, "name-margin-bottom");
      }

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

   .btn {
      width: 100%;
   }
}
