/* ========== Skip close ========== */
button.skip-close img {
  transition: all 100ms ease;
}

/* ========== Skip container ========== */
.skip-container {
  overflow: hidden;
  transition: all 200ms ease;
}

.skip-container.is-dismissing {
  opacity: 0;
  padding-block: 0 !important;
  margin-block: 0 !important;
  max-height: 0 !important;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
.site-header {
  transition: box-shadow 150ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0px 14px 54px 0px #0000001a;
}

.site-header > .header-lower,
.top-bar > .skip-container {
  border-bottom: 0.5px solid #dfdfdf99;
}

.site-header > *,
.top-bar > * {
  padding-inline: 20px;
}

@media (min-width: 1024px) {
  .site-header > *,
  .top-bar > * {
    padding-inline: 100px;
  }
}

/* ---------------------------------------------------------------------- */
/* ========== Menu chips ========== */
.menu-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;

  font-weight: 500;
  font-size: 20px;
  color: #222222;
  text-transform: capitalize;

  width: 100%;
  height: 24px;
  line-height: 18px;
  padding: 0px;
  transition: color 150ms ease;
  cursor: pointer;
}

:is(.pill-control, .submenu-chip, .menu-chip):hover {
  color: var(--brand-orange) !important;
}

:is(.pill-control, button.skip-close, .submenu-chip, .menu-chip):hover > img {
  filter: var(--icon-filter-orange);
}

@media (min-width: 1024px) {
  .menu-chip {
    font-size: 14px;
    height: 36px;
    padding: 9px 15px;
    border-radius: 18px;
    background: #f8f8f8;
  }
}

/* ========== Submenu chips ========== */
.submenu-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;

  font-weight: 500;
  text-transform: capitalize;

  width: 100%;
  height: 20px;
  line-height: 20px;

  font-size: 12px;
  margin-inline-end: 30px;
  cursor: pointer;
}

/* Mobile sizes (default) */
.submenu-chip--m16 {
  font-size: 16px;
}
.submenu-chip--m14 {
  font-size: 14px;
}

/* Desktop (same for both) */
@media (min-width: 1024px) {
  .submenu-chip--m16,
  .submenu-chip--m14 {
    font-size: 12px;
  }
}

/* ---------------------------------------------------------------------- */
/* ========== Shared (for both menus) ========== */
.dropdown-panel {
  transition-property: opacity, margin;
  transition-duration: 10ms;
  transition-timing-function: ease;

  z-index: 300;
  border-radius: 8px;
}

@media (min-width: 1024px) {
  .dropdown-panel {
    transition-duration: 150ms;
    box-shadow: 0px 14px 44px 0px #00000026;

    /* width fits content */
    min-width: 0;
    width: max-content;
    max-width: min(90vw, 520px);
    white-space: nowrap;
  }

  /* Hover buffer above the menu */
  .dropdown-panel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
    background: transparent;
  }
}

/* ========== Level 1 menu (specific) ========== */
.dropdown-menu {
  margin-top: 16px;
  background: #f8f8f8;
  position: static;
}

@media (min-width: 1024px) {
  .dropdown-menu {
    margin-top: 8px;
    background: #ffffff;
    position: fixed;
  }

  /* Arrow pointer (visual indicator for the menu) */
  .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
  }
}

/* ========== Level 2 menu (specific) ========== */
.dropdown-menu2 {
  margin-top: 12px;
  background: #ffffff;
}

@media (min-width: 1024px) {
  .dropdown-menu2 {
    margin-top: 0;
    top: -13px;
    left: 0px;
    position: relative;
  }

  /* Arrow pointer (visual indicator for the menu) */
  .dropdown-menu2::before {
    content: "";
    position: absolute;
    top: 18px;
    inset-inline-start: -7px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-inline-end: 8px solid #ffffff;
  }

  /* Hover buffer between Level 2 toggle and submenu */
  .dropdown-menu2::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: -30px;
    width: 30px;
    height: 100%;
    background: transparent;
  }
}

/* ---------------------------------------------------------------------- */
/* ========== Currency and Language (specific) ========== */
.locale-selector .menu-chip {
  padding: 0;
  height: 18px;
  font-size: 14px;
  font-weight: 400;
  color: #666666;
}

.locale-selector .dropdown-menu {
  background-color: white;
  box-shadow: 0px 14px 44px 0px #00000026;
}

/* Arrow pointer (visual indicator for the menu) */
.locale-selector .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
}

/* ========== User menu (specific) ========== */
.user-menu .menu-chip {
  font-size: 16px;
  padding: 0;
  background: none;

  color: black;
  height: fit-content;
}

.user-menu .submenu-chip {
  justify-content: start;
  gap: 8px;
}

/* ========== Search show more (specific) ========== */
.search-showmore {
  font-size: 14px;
  padding: 0;
  background: none;

  color: #000c21e5;
  font-weight: 400;
  height: 24px;
}
