/**
 * Shared header/footer chrome: mobile drawer + homepage location field.
 * Header must sit above page content (incl. hero 3D / promoted layers) and above the mobile app bar.
 */
header.public-site-header {
  z-index: 1100 !important;
}

/* —— Location “select” (homepage) —— */
.nav-location-field {
  width: 100%;
  max-width: 100%;
}

.nav-location-field-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.35rem;
  padding-left: 0.125rem;
}

.nav-location-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.nav-location-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    145deg,
    rgba(22, 24, 28, 0.92) 0%,
    rgba(12, 13, 16, 0.88) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 28px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  font-family: inherit;
  text-align: left;
}

@media (min-width: 768px) {
  .nav-location-btn {
    font-size: 0.8125rem;
    padding: 0.6rem 0.9rem 0.6rem 0.8rem;
  }
}

.nav-location-btn:hover {
  border-color: rgba(161, 222, 86, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 10px 32px rgba(0, 0, 0, 0.4);
}

.nav-location-btn:focus-visible {
  outline: none;
  border-color: rgba(161, 222, 86, 0.65);
  box-shadow:
    0 0 0 3px rgba(161, 222, 86, 0.22),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.nav-location-btn[aria-expanded='true'] {
  border-color: rgba(161, 222, 86, 0.55);
  background: linear-gradient(
    145deg,
    rgba(28, 32, 38, 0.95) 0%,
    rgba(16, 18, 22, 0.92) 100%
  );
}

.nav-location-pin {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #a1de56;
}

.nav-location-label {
  flex: 1 1 auto;
  min-width: 3.5rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(248, 250, 252, 0.96);
}

.nav-location-chevron-wrap {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-location-btn[aria-expanded='true'] .nav-location-chevron-wrap {
  background: rgba(161, 222, 86, 0.12);
  border-color: rgba(161, 222, 86, 0.25);
}

.nav-location-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.65;
}

.nav-location-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  min-width: min(100vw - 2rem, 280px);
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 15, 18, 0.98);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(161, 222, 86, 0.06) inset;
  z-index: 2000;
}

.nav-location-panel[hidden] {
  display: none !important;
}

.nav-location-panel-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
  margin: 0 0 0.55rem;
  line-height: 1.4;
}

.nav-location-search-wrap {
  margin: 0 0 0.55rem;
}

.nav-location-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.52rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #f2f2f2;
  font-size: 0.8125rem;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.nav-location-search::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.nav-location-search:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-location-search:focus {
  border-color: rgba(161, 222, 86, 0.55);
  box-shadow: 0 0 0 3px rgba(161, 222, 86, 0.15);
}

.nav-location-no-match {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 0.55rem;
  line-height: 1.35;
}

.nav-location-area-list {
  max-height: min(42vh, 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 0 0.55rem;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-location-area-list .nav-location-option {
  margin-bottom: 0;
}

.nav-location-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.35rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #f2f2f2;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-location-panel > .nav-location-option:last-child {
  margin-bottom: 0;
}

.nav-location-option:hover {
  background: rgba(161, 222, 86, 0.14);
  color: #d8f5a8;
}

/* —— Header layout —— */
.public-site-header .header-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  position: relative;
}

.public-site-header .header-location-slot {
  flex: 1 1 auto;
  /* Without a min-width, this slot absorbed all shrink and the label collapsed to invisible. */
  min-width: min(12rem, 42vw);
  max-width: min(26rem, 100%);
  display: flex;
  justify-content: flex-start;
}

@media (min-width: 1100px) {
  .public-site-header .header-location-slot {
    max-width: min(28rem, 38vw);
  }
}

@media (max-width: 767px) {
  .public-site-header .header-content {
    padding-right: 52px;
  }
  .public-site-header .header-location-slot {
    max-width: none;
  }
}

.public-site-header .nav-desktop-cluster {
  margin-left: auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.public-site-header .nav-desktop-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.85rem;
  min-width: 0;
}

.public-site-header .nav-desktop-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: 0.35rem;
}

.nav-link-quiet {
  color: rgba(209, 213, 219, 0.95);
}
.nav-link-quiet:hover {
  color: #a1de56;
}
.nav-link-quiet.nav-link-active {
  color: #a1de56;
  font-weight: 600;
}

/* —— Mobile menu —— */
.mobile-menu-btn {
  display: block !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(30, 30, 30, 0.85);
  color: white;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1002;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: rgba(50, 50, 50, 0.9);
  border-color: #a1de56;
  transform: translateY(-50%) scale(1.05);
}

.mobile-menu-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.mobile-menu-btn .hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 5px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-menu-btn .hamburger-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.mobile-menu-btn.active .hamburger-icon {
  transform: rotate(180deg);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-overlay {
  opacity: 0;
  visibility: hidden;
  /* Above header chrome (1100); must not intercept taps while closed (incl. when hoisted to body). */
  z-index: 1200 !important;
  pointer-events: none;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-overlay.open .mobile-menu-content {
  transform: translateX(0) !important;
}

.mobile-nav-link {
  position: relative;
}

.mobile-nav-link:hover {
  background: rgba(161, 222, 86, 0.1);
  color: #a1de56 !important;
  border-left-color: #a1de56 !important;
}

.mobile-nav-link:active {
  background: rgba(161, 222, 86, 0.15);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .public-site-header .nav-desktop-cluster {
    display: none !important;
  }
}

/* Pages with fixed public header: nudge main content */
body.has-public-site-header .site-main-offset {
  padding-top: 5.5rem;
}

body.has-public-site-header.has-mobile-app-bar .site-main-offset {
  padding-bottom: 4.5rem;
}

@media (min-width: 768px) {
  body.has-public-site-header.has-mobile-app-bar .site-main-offset {
    padding-bottom: inherit;
  }
}

/* Sticky mobile CTA bar (homepage + shared) */
.mobile-app-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 0.65rem 1rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.has-mobile-app-bar .mobile-app-bar {
  display: block;
}

@media (min-width: 768px) {
  body.has-mobile-app-bar .mobile-app-bar {
    display: none;
  }
}

.mobile-app-bar a {
  display: block;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  background: #a1de56;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
}

.mobile-app-bar a:hover {
  filter: brightness(1.05);
}

.public-site-header .nav-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.875rem;
  color: #0a0a0a !important;
  background: #a1de56;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.public-site-header .nav-login-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.public-site-header .nav-login-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(161, 222, 86, 0.45);
}

.mobile-nav-login-btn {
  display: block;
  padding: 0.75rem 1.5rem;
  background: #a1de56;
  color: #000000;
  text-decoration: none;
  border-radius: 0.5rem;
  text-align: center;
  font-weight: 600;
  transition: filter 0.2s ease;
}

.mobile-nav-login-btn:hover {
  filter: brightness(1.06);
  color: #000000;
}

.public-site-header .nav-app-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 1.05rem 0.42rem 0.5rem;
  border-radius: 9999px;
  text-decoration: none !important;
  color: #0a0a0a !important;
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(155deg, #e8faa8 0%, #b8e860 28%, #a1de56 55%, #6fbf2a 100%);
  border: 1px solid rgba(220, 252, 150, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 2px 4px rgba(10, 16, 8, 0.12) inset,
    0 10px 32px -14px rgba(161, 222, 86, 0.95),
    0 4px 14px -4px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.public-site-header .nav-app-cta:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 2px 5px rgba(10, 16, 8, 0.1) inset,
    0 14px 40px -14px rgba(161, 222, 86, 1),
    0 6px 18px -6px rgba(0, 0, 0, 0.45);
}

.public-site-header .nav-app-cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(161, 222, 86, 0.45),
    0 10px 32px -14px rgba(161, 222, 86, 0.95);
}

.public-site-header .nav-app-cta-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(10, 10, 10, 0.08);
}

.public-site-header .nav-app-cta-device-icon {
  width: 1.05rem;
  height: 1.05rem;
  color: #0a0a0a;
  opacity: 0.9;
}

.public-site-header .nav-app-cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  gap: 0.03rem;
  flex-shrink: 0;
  min-width: max-content;
}

.public-site-header .nav-app-cta-title {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.public-site-header .nav-app-cta-sub {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.68);
}

.mobile-nav-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0.15rem 0.85rem 0.65rem;
  padding: 0.9rem 1.1rem !important;
  border-radius: 14px !important;
  background: linear-gradient(155deg, #e8faa8 0%, #a1de56 50%, #6fbf2a 100%) !important;
  border: 1px solid rgba(220, 252, 150, 0.95) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 10px 28px -14px rgba(161, 222, 86, 0.9) !important;
  color: #0a0a0a !important;
  border-left: none !important;
}

.mobile-nav-cta:hover {
  filter: brightness(1.04);
  color: #0a0a0a !important;
  background: linear-gradient(155deg, #eefcb8 0%, #a8e850 50%, #6fbf2a 100%) !important;
}

.mobile-nav-cta .mobile-nav-cta-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mobile-nav-cta .mobile-nav-cta-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.76;
}

@media (prefers-reduced-motion: reduce) {
  .public-site-header .nav-app-cta,
  .public-site-header .nav-app-cta:hover {
    transition: none;
    transform: none;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .public-site-header .nav-desktop-links {
    gap: 0.4rem 0.65rem;
  }
  .public-site-header .nav-link-quiet {
    font-size: 0.8125rem;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .public-site-header .nav-app-cta-sub {
    display: none;
  }
  .public-site-header .nav-app-cta {
    padding: 0.42rem 0.9rem 0.42rem 0.45rem;
  }
  .public-site-header .nav-app-cta-title {
    font-size: 0.8rem;
  }
}
