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

$params: (
   "border-bottom": 1px solid global.$border-color,
   "padding": 0 0 30px 0,
   "margin": 0 0 15px 0,

   "title-margin": 0 0 global.$spacer 0,

   "icon-margin": 0 11px 0 0,
   "icon-font-size": global.$font-size-larger,
);

@if global-variable-exists(c-preorderdetail-attachments, components) {
   $keys: map.keys(components.$c-preorderdetail-attachments);
   @each $name in $keys {
      @if not map.get($params, $name) {
         @warn "Neexistující proměnná '#{$name}' v komponentě '$#{component("Preorders:PreorderDetail:Attachments", "class")}'.";
      }
   }

   $params: map.merge($params, components.$c-preorderdetail-attachments);
}

.#{component("Preorders:PreorderDetail:Attachments", "class")} {
   padding: map.get($params, "padding");
   margin: map.get($params, "margin");
   border-bottom: map.get($params, "border-bottom");

   > a {
      display: flex;
      align-items: center;
   }

   .title {
      margin: map.get($params, "title-margin");
   }

   .c-icon {
      margin: map.get($params, "icon-margin");
      font-size: map.get($params, "icon-font-size");
   }
}
