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

$params: (
   "margin": global.$spacer-lg 0,
   "gap": global.$gap-width,
   "border-bottom": global.$border-width solid global.$border-color,

   "column-min-width": 140px
);

@if global-variable-exists(c-account-orderdetail-userinfo, components) {
   $keys: map.keys(components.$c-account-orderdetail-userinfo);
   @each $name in $keys {
      @if not map.get($params, $name) {
         @warn "Neexistující proměnná '#{$name}' v komponentě '$#{component("Account:OrderDetail:UserInfo", "class")}'.";
      }
   }

   $params: map.merge($params, components.$c-account-orderdetail-userinfo);
}

.#{component("Account:OrderDetail:UserInfo", "class")} {
   display: flex;
   flex-wrap: wrap;
   gap: map.get($params, "gap");
   margin: map.get($params, "margin");
   border-bottom: map.get($params, "border-bottom");

   .column {
      flex: 1;
      min-width: map.get($params, "column-min-width");
   }
}
