/* Midnight Concierge mobile header. The site integration enables it at the theme's mobile breakpoint. */
#lux-midnight {
  --lx-gold: #dbb471;
  display: none;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  color: #faf7f1;
  color-scheme: dark;
  font: 400 14px/1.35 "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal;
  text-align: start;
  text-transform: none;
}

#lux-midnight *,
#lux-midnight *::before,
#lux-midnight *::after {
  box-sizing: border-box;
}

#lux-midnight a,
#lux-midnight summary {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}

#lux-midnight :is(a, summary):focus-visible {
  outline: 2px solid #e9a74c;
  outline-offset: -3px;
}

/* The approved preview renders Lucide's outlined symbols in uniform 16px boxes. */
#lux-midnight svg {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#lux-midnight .lx-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 68px;
  padding: 0 13px;
  border-bottom: 1px solid #353333;
  background: #0c0f14;
}

#lux-midnight .lx-home-mark {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
}

#lux-midnight .lx-logo {
  display: block;
  width: 133px;
  max-width: 100%;
  height: auto;
  margin: 0;
}

#lux-midnight .lx-bar-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

#lux-midnight .lx-bar-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--lx-gold);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

#lux-midnight .lx-bar-quote span {
  padding-bottom: 2px;
  border-bottom: 1px solid #9b794c;
}

#lux-midnight details {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

#lux-midnight .lx-icon-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--lx-gold);
  list-style: none;
}

#lux-midnight .lx-icon-button::-webkit-details-marker {
  display: none;
}

#lux-midnight details:not([open]) .lx-close,
#lux-midnight details[open] .lx-open,
#lux-midnight details:not([open]) .lx-surface {
  display: none;
}

#lux-midnight .lx-surface {
  position: absolute;
  z-index: 3;
  inset: 100% 0 auto;
  display: block;
  margin: 0;
  padding: 22px 19px 13px;
  border: 0;
  border-top: 1px solid #65533b;
  border-radius: 0 0 14px 14px;
  background: #171b21;
  box-shadow: 0 12px 22px #0004;
  color: #faf7f1;
  font: inherit;
  text-align: start;
}

#lux-midnight .lx-kicker {
  color: var(--lx-gold);
  font: 600 10.5px/1.4 "Segoe UI", Arial, sans-serif;
  letter-spacing: 1.9px;
  text-transform: uppercase;
}

#lux-midnight .lx-prime {
  margin-top: 9px;
}

#lux-midnight .lx-service-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid #34373c;
}

#lux-midnight .lx-service-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #4a4133;
  border-radius: 9px;
  color: var(--lx-gold);
}

#lux-midnight .lx-service-text {
  display: grid;
  gap: 2px;
}

#lux-midnight .lx-service-text strong {
  color: inherit;
  font: 500 16px/1.35 "Segoe UI", Arial, sans-serif;
}

#lux-midnight .lx-service-text small {
  color: #b3b6bb;
  font: 400 12px/1.5 "Segoe UI", Arial, sans-serif;
}

#lux-midnight .lx-service-link > svg:last-child {
  justify-self: end;
  color: #a9a199;
}

#lux-midnight .lx-service-link:dir(rtl) > svg:last-child {
  transform: scaleX(-1);
}

#lux-midnight .lx-minor {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 54px;
}

#lux-midnight .lx-minor a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: #d5d7da;
  font-size: 13px;
}

#lux-midnight .lx-utilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#lux-midnight .lx-utilities a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid #464340;
  border-radius: 6px;
  color: #f2ebe1;
  font-size: 13px;
}

#lux-midnight .lx-utilities svg {
  color: var(--lx-gold);
}

@media (max-width: 370px) {
  #lux-midnight .lx-bar {
    padding-inline: 9px;
  }
  #lux-midnight .lx-logo {
    width: 116px;
  }
  #lux-midnight .lx-surface {
    padding-inline: 15px;
  }
}

/* Scope the switch to TheGem's current mobile header and its own 767px breakpoint.
   Unsupported layouts and browsers retain the theme navigation. */
@media (max-width: 767px) {
  #site-header .header-main:has(> #primary-navigation) > #lux-midnight {
    display: block;
  }
  #site-header .header-main:has(> #lux-midnight):has(> #primary-navigation) {
    display: block !important;
    width: 100%;
    height: auto !important;
    min-height: 0;
    padding: 0 !important;
    overflow: visible;
  }
  #site-header .container:has(> .header-main > #lux-midnight):has(#primary-navigation) {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }
  #site-header .header-main:has(> #lux-midnight):has(> #primary-navigation) > .site-title {
    display: none !important;
  }
  /* TheGem measures its trigger to decide whether mobile scrolling is active.
     Keep the original trigger measurable but hidden from input and assistive technology. */
  #site-header .header-main:has(> #lux-midnight) > #primary-navigation {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  #site-header:has(#lux-midnight details[open]) {
    transform: none !important;
    overflow: visible !important;
  }
  #lux-midnight .lx-surface {
    max-height: calc(100vh - 116px);
    max-height: max(100px, calc(100dvh - var(--lx-menu-top, 116px)));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
