/*
 * Miro Child main override styles.
 * Header is tokenized and aligned to an 8pt-friendly rhythm.
 */

:root {
  --ra-color-white: rgba(255, 255, 255, 1);
  --ra-color-soft-gray: rgba(231, 231, 229, 1);
  --ra-color-charcoal: rgba(42, 42, 42, 1);

  --ra-space-1: 0.25rem;
  --ra-space-2: 0.5rem;
  --ra-space-3: 0.75rem;
  --ra-space-4: 1rem;
  --ra-space-5: 1.5rem;
  --ra-space-6: 2rem;
  --ra-space-7: 2.5rem;
  --ra-space-8: 3rem;

  --ra-header-height: 5rem;
  --ra-header-top-offset: 0.5rem;
  --ra-header-side-gap: 0.5rem;
  --ra-header-radius: 1rem;
  --ra-header-padding-x: 1rem;
  --ra-header-side-col: 3.5rem;

  --ra-control-size: 2.75rem;
  --ra-icon-size: 1.5rem;
  --ra-logo-max-height: 2.5rem;

  --ra-burger-line-width: 1.125rem;
  --ra-burger-line-height: 0.125rem;
  --ra-burger-line-offset: 0.375rem;

  --ra-header-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(246, 246, 245, 0.6) 42%,
    rgba(231, 231, 229, 0.56) 100%
  );
  --ra-header-border: rgba(255, 255, 255, 0.62);
  --ra-header-shadow:
    0 0.375rem 1rem rgba(42, 42, 42, 0.1),
    0 0.125rem 0.375rem rgba(42, 42, 42, 0.07),
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.74),
    inset 0 -0.0625rem 0 rgba(255, 255, 255, 0.24);
  --ra-header-texture-opacity: 0.05;
  --ra-header-sheen-opacity: 0.42;
  --ra-header-sheen-duration: 18s;
}

@keyframes ra-header-sheen-slide {
  0% {
    transform: translate3d(-58%, 0, 0);
  }
  50% {
    transform: translate3d(0%, 0, 0);
  }
  100% {
    transform: translate3d(58%, 0, 0);
  }
}

/* Override parent sticky strip with floating shell. */
body.burger_major .header {
  background: transparent !important;
  height: calc(var(--ra-header-height) + var(--ra-header-top-offset)) !important;
  min-height: calc(var(--ra-header-height) + var(--ra-header-top-offset)) !important;
  max-height: calc(var(--ra-header-height) + var(--ra-header-top-offset)) !important;
}

/* Parent theme uses high-specificity generated rules, so !important is required. */
body.burger_major .header .header_cont,
body.burger_major .header.get_shade .header_cont,
body.burger_major .header.get_shade_menu .header_cont {
  width: min(112.5rem, calc(100% - (var(--ra-header-side-gap) * 2))) !important;
  left: 50% !important;
  top: var(--ra-header-top-offset) !important;
  margin-top: 0 !important;
  transform: translateX(-50%);
  height: var(--ra-header-height) !important;
  min-height: var(--ra-header-height) !important;
  max-height: var(--ra-header-height) !important;
  border-radius: var(--ra-header-radius);
  overflow: hidden;
  isolation: isolate;
  background: var(--ra-header-bg) !important;
  border: 0.0625rem solid var(--ra-header-border);
  box-shadow: var(--ra-header-shadow);
  backdrop-filter: blur(1rem) saturate(128%);
  -webkit-backdrop-filter: blur(1rem) saturate(128%);
}

body.burger_major .header .header_cont::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      135% 180% at 12% -78%,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(255, 255, 255, 0.28) 38%,
      rgba(255, 255, 255, 0.04) 70%,
      transparent 100%
    ),
    radial-gradient(
      120% 160% at 88% -68%,
      rgba(255, 255, 255, 0.56) 0%,
      rgba(255, 255, 255, 0.18) 44%,
      transparent 86%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.44) 0%,
      rgba(255, 255, 255, 0.12) 48%,
      rgba(255, 255, 255, 0.04) 100%
    );
}

body.burger_major .header .header_cont::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.36) 0%,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0) 72%,
      rgba(255, 255, 255, 0.22) 100%
    ),
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, var(--ra-header-texture-opacity)) 0,
      rgba(255, 255, 255, var(--ra-header-texture-opacity)) 0.0625rem,
      rgba(255, 255, 255, 0) 0.0625rem,
      rgba(255, 255, 255, 0) 0.1875rem
    );
  box-shadow:
    inset 0 0 0 0.0625rem rgba(255, 255, 255, 0.34),
    inset 0 1rem 1.75rem rgba(255, 255, 255, 0.08);
}

/* Graceful fallback when blur is unsupported. */
@supports not ((backdrop-filter: blur(0.125rem)) or (-webkit-backdrop-filter: blur(0.125rem))) {
  body.burger_major .header .header_cont {
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(231, 231, 229, 0.92) 100%
    ) !important;
  }
}

body.admin-bar.burger_major .header .header_cont {
  top: calc(var(--ra-header-top-offset) + 2rem) !important;
  margin-top: 0 !important;
}

body.burger_major .header .top_menu {
  height: var(--ra-header-height) !important;
  min-height: var(--ra-header-height) !important;
  max-height: var(--ra-header-height) !important;
  padding: 0 var(--ra-header-padding-x) !important;
  position: relative;
  overflow: hidden;
  background: transparent !important;
}

body.burger_major .header .top_menu::before {
  content: "";
  position: absolute;
  inset: -60% -35%;
  z-index: 1;
  pointer-events: none;
  opacity: var(--ra-header-sheen-opacity);
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 34%,
    rgba(255, 255, 255, 0.26) 47%,
    rgba(255, 255, 255, 0.08) 57%,
    rgba(255, 255, 255, 0) 68%
  );
  transform: translate3d(-58%, 0, 0);
  animation: ra-header-sheen-slide var(--ra-header-sheen-duration) ease-in-out infinite;
  will-change: transform;
}

body.burger_major .header .top_menu .head_wrapper {
  display: grid;
  grid-template-columns: var(--ra-header-side-col) minmax(0, 1fr) var(--ra-header-side-col);
  align-items: center;
  column-gap: var(--ra-space-2);
  height: 100%;
  min-height: 100%;
  position: relative;
  z-index: 2;
}

body.burger_major .header .top_menu .search_form,
body.burger_major .header .top_menu .currency_chooser,
body.burger_major .header .top_menu .top_menu_right {
  display: none !important;
}

body.burger_major .header .top_menu .head_wrapper > .fixed_burger {
  grid-column: 1;
  justify-self: start;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0;
  width: var(--ra-control-size);
  height: var(--ra-control-size);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999rem;
  z-index: 3;
}

body.burger_major .header .top_menu .head_wrapper > .fixed_burger i {
  position: absolute;
  left: 50%;
  width: var(--ra-burger-line-width);
  height: var(--ra-burger-line-height);
  margin: 0;
  border-radius: 999rem;
  background: var(--ra-color-charcoal) !important;
  opacity: 1 !important;
  transform: translate(-50%, -50%);
}

body.burger_major .header .top_menu .head_wrapper > .fixed_burger i:first-child {
  top: calc(50% - var(--ra-burger-line-offset));
}

body.burger_major .header .top_menu .head_wrapper > .fixed_burger i:nth-child(2) {
  top: 50%;
}

body.burger_major .header .top_menu .head_wrapper > .fixed_burger i:nth-child(3) {
  top: calc(50% + var(--ra-burger-line-offset));
}

body.fixed_burger_active.burger_major .header .top_menu .head_wrapper > .fixed_burger i:first-child {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

body.fixed_burger_active.burger_major .header .top_menu .head_wrapper > .fixed_burger i:nth-child(2) {
  opacity: 0 !important;
}

body.fixed_burger_active.burger_major .header .top_menu .head_wrapper > .fixed_burger i:nth-child(3) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

body.burger_major .header .top_menu .logo {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  position: relative;
  z-index: 2;
}

body.burger_major .header .top_menu .logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ra-control-size);
}

body.burger_major .header .top_menu .logo img {
  max-height: var(--ra-logo-max-height) !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

body.burger_major .header .logo span,
body.burger_major .header .top_menu a {
  color: var(--ra-color-charcoal) !important;
}

body.burger_major .header .top_menu .header_right {
  grid-column: 3;
  justify-self: end;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  height: var(--ra-control-size) !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 3;
}

body.burger_major .header .top_menu .header_right > .cart {
  height: 100%;
  display: flex;
  align-items: center;
}

body.burger_major .header .top_menu .header_right .cart .carticons {
  width: var(--ra-control-size);
  height: var(--ra-control-size);
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative !important;
  border-radius: 999rem;
}

body.burger_major .header .top_menu .header_right .cart .cart_icon {
  display: block;
}

body.burger_major .header .top_menu .header_right .cart .cart_icon:before {
  display: block;
  width: var(--ra-icon-size);
  height: var(--ra-icon-size);
  background-size: auto var(--ra-icon-size);
  filter: grayscale(1) brightness(0.2);
  margin: 0;
}

/* Override parent badge offsets to keep consistent cart alignment. */
body.burger_major .header .top_menu .header_right .carticons .count_item {
  left: auto !important;
  top: var(--ra-space-2) !important;
  right: 0.375rem !important;
  transform: none !important;
  border-color: var(--ra-color-white) !important;
}

body.fixed_burger_active #sidebar {
  left: 0 !important;
}

@media (min-width: 62rem) {
  :root {
    --ra-header-side-col: 3.75rem;
    --ra-logo-max-height: 2.5rem;
  }
}

@media (max-width: 48.875rem) {
  body.admin-bar.burger_major .header .header_cont {
    top: calc(var(--ra-header-top-offset) + 2.875rem) !important;
  }
}

@media (max-width: 47.9375rem) {
  :root {
    --ra-header-padding-x: 0.75rem;
    --ra-header-side-col: 3.25rem;
    --ra-logo-max-height: 2.5rem;
  }

  body.burger_major .header .top_menu .header_right .carticons .count_item {
    right: 0.3125rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.burger_major .header .top_menu::before {
    animation: none;
    opacity: 0.14;
  }
}
