/* Mobile currency placement and menu-button finish. Other theme areas remain unchanged. */

/* Desktop keeps the compact header currency selector. */
.nova-currency--header {
  display: inline-grid !important;
}

/* Mobile menu currency card is hidden while the desktop navigation is active. */
.nova-mobile-menu__currency-block {
  display: none;
}

/* Solid, visible menu control instead of a transparent surface. */
.nova-menu-btn {
  border: 1px solid rgba(var(--nova-gold), .28) !important;
  background:
    linear-gradient(145deg, rgba(var(--nova-gold), .22), rgba(var(--nova-gold), .08)),
    rgb(8, 30, 13) !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 8px 22px rgba(0,0,0,.25),
    0 0 18px rgba(var(--nova-gold), .09) !important;
}

.nova-menu-btn:hover,
.nova-menu-btn:focus-visible {
  border-color: rgba(var(--nova-gold), .48) !important;
  background:
    linear-gradient(145deg, rgba(var(--nova-gold), .30), rgba(var(--nova-gold), .12)),
    rgb(10, 39, 17) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.11),
    0 10px 25px rgba(0,0,0,.28),
    0 0 22px rgba(var(--nova-gold), .15) !important;
  transform: translateY(-1px);
}

.nova-menu-btn[aria-expanded="true"] {
  border-color: rgba(var(--nova-gold), .58) !important;
  background:
    linear-gradient(145deg, rgba(var(--nova-gold), .38), rgba(var(--nova-gold), .16)),
    rgb(11, 45, 19) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 10px 26px rgba(0,0,0,.30),
    0 0 25px rgba(var(--nova-gold), .20) !important;
}

.nova-menu-btn span {
  background: #a8ffad !important;
  box-shadow: 0 0 7px rgba(var(--nova-gold), .22);
}

@media (max-width: 1100px) {
  /* Currency is now inside the menu, so remove it from the header at this breakpoint. */
  .nova-currency--header {
    display: none !important;
  }

  .nova-mobile-menu__panel {
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
      radial-gradient(circle at 100% 0, rgba(var(--nova-gold), .09), transparent 15rem),
      linear-gradient(180deg, rgb(6, 19, 9), rgb(4, 13, 6)) !important;
  }

  .nova-mobile-menu__top {
    margin-bottom: .72rem;
    padding: .3rem .15rem .82rem !important;
    border-bottom: 1px solid rgba(var(--nova-gold), .10);
  }

  .nova-mobile-menu__top > span {
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .nova-mobile-menu__top button {
    display: grid;
    place-items: center;
    border-color: rgba(var(--nova-gold), .20) !important;
    background: rgba(var(--nova-gold), .07) !important;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
  }

  .nova-mobile-menu__top button:hover,
  .nova-mobile-menu__top button:focus-visible {
    border-color: rgba(var(--nova-gold), .38) !important;
    background: rgba(var(--nova-gold), .13) !important;
    transform: rotate(4deg);
  }

  .nova-mobile-menu__currency-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    margin: 0 0 .9rem;
    padding: .85rem;
    border: 1px solid rgba(var(--nova-gold), .17);
    border-radius: 1rem;
    background:
      linear-gradient(145deg, rgba(var(--nova-gold), .09), rgba(var(--nova-gold), .025)),
      rgba(255,255,255,.018);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 28px rgba(0,0,0,.20);
  }

  .nova-mobile-menu__currency-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .68rem;
  }

  .nova-mobile-menu__currency-icon {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--nova-gold), .20);
    border-radius: .75rem;
    background: rgba(var(--nova-gold), .085);
    color: rgb(var(--nova-gold));
    box-shadow: 0 0 16px rgba(var(--nova-gold), .07);
  }

  .nova-mobile-menu__currency-copy strong,
  .nova-mobile-menu__currency-copy small {
    display: block;
  }

  .nova-mobile-menu__currency-copy strong {
    color: rgba(var(--nova-white), .92);
    font-size: .76rem;
    line-height: 1.2;
  }

  .nova-mobile-menu__currency-copy small {
    max-width: 15rem;
    margin-top: .2rem;
    overflow: hidden;
    color: rgba(var(--nova-white), .47);
    font-size: .61rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nova-mobile-menu__currency-block .nova-currency--menu {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(2.2rem, auto) .65rem !important;
    align-items: center !important;
    column-gap: .42rem !important;
    width: 5.25rem !important;
    min-width: 5.25rem !important;
    height: 2.55rem !important;
    min-height: 2.55rem !important;
    padding: 0 .65rem !important;
    border: 1px solid rgba(var(--nova-gold), .20) !important;
    border-radius: .78rem !important;
    background: rgb(8, 27, 12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
  }

  .nova-mobile-menu__currency-block .nova-currency--menu:hover,
  .nova-mobile-menu__currency-block .nova-currency--menu:focus-within {
    border-color: rgba(var(--nova-gold), .40) !important;
    background: rgb(10, 35, 15) !important;
    box-shadow: 0 0 0 3px rgba(var(--nova-gold), .055), 0 0 18px rgba(var(--nova-gold), .08) !important;
  }

  .nova-mobile-menu__currency-block .nova-currency--menu select {
    position: relative !important;
    inset: auto !important;
    z-index: 1;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    color: rgba(var(--nova-white), .92) !important;
    font-size: .71rem;
    font-weight: 800;
    cursor: pointer;
  }

  .nova-mobile-menu__currency-block .nova-currency__arrow {
    display: grid !important;
    width: .65rem;
    place-items: center;
    color: rgb(var(--nova-gold));
  }

  .nova-mobile-menu__panel > a {
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
  }

  .nova-mobile-menu__panel > a:hover,
  .nova-mobile-menu__panel > a:focus-visible {
    border-color: rgba(var(--nova-gold), .22);
    background: rgba(var(--nova-gold), .055);
    transform: translateX(-2px);
  }
}

@media (max-width: 430px) {
  .nova-mobile-menu__currency-block {
    grid-template-columns: 1fr;
  }

  .nova-mobile-menu__currency-block .nova-currency--menu {
    width: 100% !important;
    min-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) .7rem !important;
  }

  .nova-mobile-menu__currency-copy small {
    max-width: 12rem;
  }
}

/* Full-height mobile menu visibility fix. Keeps all other theme areas unchanged. */
@media (max-width: 1100px) {
  .nova-mobile-menu {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    overscroll-behavior: none;
  }

  @supports (height: 100dvh) {
    .nova-mobile-menu {
      height: 100dvh !important;
      min-height: 100dvh !important;
      max-height: 100dvh !important;
    }
  }

  .nova-mobile-menu__panel {
    box-sizing: border-box !important;
    width: min(92vw, 25rem) !important;
    max-width: 100vw !important;
    height: 100vh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(1.35rem, env(safe-area-inset-bottom))
      1rem !important;
    scroll-padding-top: 4rem;
    scroll-padding-bottom: max(1.35rem, env(safe-area-inset-bottom));
    scrollbar-gutter: stable;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  @supports (height: 100dvh) {
    .nova-mobile-menu__panel {
      height: 100dvh !important;
      max-height: 100dvh !important;
    }
  }

  .nova-mobile-menu__top {
    position: sticky !important;
    top: 0;
    z-index: 4;
    flex: 0 0 auto;
    margin: calc(-1 * max(1rem, env(safe-area-inset-top))) -1rem .72rem !important;
    padding:
      max(1rem, env(safe-area-inset-top))
      1rem
      .82rem !important;
    background: linear-gradient(180deg, rgba(6,19,9,.99) 76%, rgba(6,19,9,.92));
    backdrop-filter: blur(14px);
  }

  .nova-mobile-menu__currency-block,
  .nova-mobile-menu__panel > a {
    flex: 0 0 auto;
  }

  .nova-mobile-menu__panel > a:last-child {
    margin-bottom: .25rem;
  }
}

@media (max-width: 430px) {
  .nova-mobile-menu__panel {
    width: 100vw !important;
    border-left: 0 !important;
  }
}
