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

$params: (
   "bg-color": global.$body-bg,
   "highlight-color": global.$brand-primary,
   "padding": global.$spacer,
   "margin": 0 0 global.$spacer 0,
   "gap": global.$spacer-lg,
);

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

   $params: map.merge($params, components.$c-preorders-bottombar);
}

.#{component("Preorders:BottomBar", "class")} {
   z-index: 5;
   padding: map.get($params, "padding");
   margin: map.get($params, "margin");
   position: sticky;
   bottom: 0;
   left: 0;
   width: 100%;

   background-color: map.get($params, "bg-color");
   box-shadow: 0 -4px 4px -4px rgba(0, 0, 0, .15);
}
