/* Secondary button (not in main.css) */
.btn-ghost {
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
}

/* find-loading + maps-search */
.find-loading-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Match find.html hero: find_bg.webp + same gradient scrim as .page-hero::before */
.find-loading-hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  background-color: #000;
  background-image: none;
  overflow: hidden;
}

.find-loading-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}


.find-loading-globe > canvas {
  display: block;
}

.globe-pin {
  width: 26px;
  height: 26px;
  background: url("/images/globe-pin.svg") center/contain no-repeat;
  transform: translate(-50%, -92%);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.55));
  pointer-events: none;
}

.find-loading-header-cta {
  box-shadow: 0 0 24px -4px rgba(37, 99, 235, 0.45);
}

.find-loading-body {
  margin: 0;
  min-height: 100%;
}

.find-loading-main {
  z-index: 20;
  padding-top: 72px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 20px);
}
.find-loading-globe{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Card + ad column: wider and pinned toward top */
.find-loading-stack {
  width: 100%;
  max-width: min(96vw, 980px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
}

.find-loading-glass,
.find-loading-card {
  position: relative;
  z-index: 25;
  width: 100%;
  max-width: 100%;
  text-align: center;
  border-radius: 22px;
  padding: 52px 48px 48px;
  min-height: 400px;
  background: rgba(22, 26, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(59, 130, 246, 0.08) inset;
  /* backdrop-filter: blur(16px); */
  animation: find-card-breathe 5s ease-in-out infinite;
}
.right-ad{
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 9;
}

/* Near-me quick buttons on map (avoid ad overlap) */
.maps-nearme-dock {
  position: absolute;
  left: 12px;
  top: 108px; /* keep below top ad (ad-box-bottom at top:5px) */
  z-index: 50;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  padding: 8px 8px;
  border-radius: 999px;
  -webkit-overflow-scrolling: touch;
}

.maps-nearme-dock::-webkit-scrollbar { height: 8px; }
.maps-nearme-dock::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.18); border-radius: 8px; }

.maps-nearme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);

}

.maps-nearme-btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.maps-nearme-btn__ic {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  opacity: 0.88;
}

.maps-nearme-btn__ic svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 768px) {
  .maps-nearme-dock {
    left: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    top: 98px;
  }
}

/* Near-me buttons around the marker (Mapbox Marker elements) */
.maps-nearme-fab {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.maps-nearme-fab:hover { transform: translateY(-1px); }

.maps-nearme-popup__form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 4px 4px;
}
.maps-nearme-popup__input {
  width: 220px;
  max-width: 52vw;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}
.maps-nearme-popup__go {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
@keyframes find-card-breathe {
  0%,
  100% {
    box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(59, 130, 246, 0.08) inset;
  }
  50% {
    box-shadow: 0 36px 72px -20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(59, 130, 246, 0.18) inset, 0 0 40px -16px rgba(37, 99, 235, 0.15);
  }
}

.find-loading-glass--done {
  animation: none;
}

.find-loading-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0 0 10px;
}

.find-loading-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  color: #f8fafc;
  font-weight: 600;
  font-style: normal;
  line-height: 1.22;
}

.find-loading-desc {
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.65;
  max-width: 42em;
  margin-left: auto;
  margin-right: auto;
}

.find-loading-coords {
  margin: 0 0 8px;
  font-size: 13px;
  color: #86efac;
  font-variant-numeric: tabular-nums;
}

.find-loading-query {
  margin: 0 0 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #7dd3fc;
  word-break: break-all;
  opacity: 0.95;
}

.find-progress-hint {
  margin: 16px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.find-progress {
  text-align: left;
}

.find-progress--gif {
  margin-top: 4px;
}

.find-progress__gif {
  display: block;
  width: min(100%, 320px);
  height: auto;
  max-height: 22px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.find-progress--animated .find-progress__track--glow {
  position: relative;
  height: 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2), 0 0 24px -6px rgba(37, 99, 235, 0.35);
  animation: find-track-pulse 1.1s ease-in-out infinite;
}

.find-progress--animated .find-progress__fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #1e40af, #0ea5e9, #3b82f6, #22d3ee);
  background-size: 200% 100%;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.85), 0 0 8px rgba(14, 165, 233, 0.6);
  transition: width 0.04s linear;
  animation: find-bar-gradient 1.2s ease infinite;
}

.find-progress__shine {
  position: absolute;
  top: 0;
  right: 0;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  border-radius: 0 5px 5px 0;
  animation: find-shine-sweep 1.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes find-track-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2), 0 0 24px -6px rgba(37, 99, 235, 0.35);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4), 0 0 32px -2px rgba(37, 99, 235, 0.5);
  }
}

@keyframes find-bar-gradient {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes find-shine-sweep {
  0% {
    opacity: 0.4;
    transform: translateX(-120%);
  }
  100% {
    opacity: 0.9;
    transform: translateX(120%);
  }
}

/* narrow track when not animated (fallback) */
.find-progress__track {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  overflow: hidden;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.15);
}

.find-progress__fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1d4ed8, #38bdf8, #3b82f6);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
  transition: width 0.05s linear;
}

/* Layer selection */
#find-phase-layers {
  text-align: left;
}

#find-phase-layers .find-loading-title,
#find-phase-layers .find-loading-eyebrow {
  text-align: center;
}

#find-phase-layers .find-loading-desc,
#find-phase-layers .find-loading-addr {
  text-align: center;
}

#find-layer-place-line {
  color: #cbd5e1;
}

.find-loading-addr {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 20px;
}

.find-layer-fieldset {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
}

.find-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.find-layer-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 560px) {
  .find-layer-grid--3 {
    gap: 12px;
  }
}

/* Narrow screens: three tiles in one row — stack thumb + label inside each cell */
@media (max-width: 559px) {
  .find-layer-grid--3 .find-layer-tile__sub {
    display: none;
  }

  .find-layer-grid--3 .find-layer-tile__inner {
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px;
    min-height: auto;
  }
  .find-loading-glass, .find-loading-card{
    min-height: 318px;
  }


  .find-layer-grid--3 .find-layer-tile__icon {
    width: 36px;
    height: 36px;
  }

  .find-layer-grid--3 .find-layer-tile__text {
    align-items: center;
  }

  .find-layer-grid--3 .find-layer-tile__name {
    font-size: 11px;
    text-align: center;
  }
}

.find-layer-tile {
  position: relative;
  cursor: pointer;
  display: block;
  margin: 0;
  border-radius: 12px;
}

.find-layer-tile--link {
  text-decoration: none;
  color: inherit;
  outline: none;
}

.find-layer-tile--link:focus-visible .find-layer-tile__inner {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}

.find-layer-tile--default .find-layer-tile__inner {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow:0 0 0 1px rgba(59, 130, 246, 0.6), 0 0 0px -2px rgba(37, 99, 235, 0.8);
}

.find-layer-tile--dark .find-layer-tile__inner {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow:
    0 0 0 1px rgba(67, 56, 202, 0.25) inset,
    0 0 24px -10px rgba(49, 46, 129, 0.5);
}

.find-layer-tile--dark:hover .find-layer-tile__inner {
  border-color: rgba(129, 140, 248, 0.55);
  background: rgba(30, 27, 75, 0.58);
}

.find-layer-tile--dark .find-layer-tile__icon {
  color: #a5b4fc;
  background: rgba(30, 27, 75, 0.85);
  border-color: rgba(99, 102, 241, 0.4);
}

.find-layer-tile__sub--dim {
  color: #94a3e8;
}

.find-layer-tile input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.find-layer-tile__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: left;
}

.find-layer-tile:hover .find-layer-tile__inner {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 41, 59, 0.5);
}

.find-layer-tile input:checked + .find-layer-tile__inner,
.find-layer-tile input:focus-visible + .find-layer-tile__inner {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6), 0 0 20px -6px rgba(37, 99, 235, 0.55);
  background: rgba(30, 58, 138, 0.2);
}

.find-layer-tile__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.find-layer-tile__icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.find-layer-tile__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  align-items: flex-start;
}

.find-layer-tile__name {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
}

.find-layer-tile__sub {
  font-size: 10px;
  color: #64748b;
  line-height: 1.35;
  text-align: left;
}

.find-layer-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

a.find-btn-continue,
.find-btn-continue {
  display: block;
  width: max-content;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.55);
  margin: 0 auto;
  padding: 20px 70px;
  font-size: 22px;
}

a.find-btn-continue:hover,
.find-btn-continue:hover {
  filter: brightness(1.05);
  color: #fff;
}

a.find-btn-ghost,
.find-btn-ghost {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
}

a.find-btn-ghost:hover,
.find-btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.55);
  color: #f8fafc;
}

.find-loading-ad-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
  margin: 22px 0 10px;
}

.find-loading-ad-box {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
} 

.find-loading-foot-strip {
  border-top: 1px solid #e2e8f0;
}

.find-loading-footer.find-loading-foot-strip {
  background: #f8fafc;
  color: #64748b;
  padding: 18px 0 20px;
  position: relative;
  z-index: 2;
}

.find-loading-footer {
  border-top: 0;
  margin-top: 0;
}

.find-loading-footer-bottom {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  justify-content: center;
  gap: 12px;
}

.find-loading-footer-a {
  color: #94a3b8;
}

.find-loading-footer-a:hover {
  color: #e2e8f0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* find-loading: dark modal */
.find-loading-modal .find-modal-dark {
  background: linear-gradient(165deg, #1a1d2a 0%, #151720 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.find-loading-modal .find-modal-dark h3 {
  color: #f1f5f9;
}

.find-loading-modal .find-modal-dark p {
  color: #94a3b8;
}

.find-loading-modal .find-modal-dark input[type="text"] {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.find-modal-bottom-link a {
  color: #60a5fa;
  font-size: 13px;
}

.find-loading-page--dark .find-loading-header.site-header {
  top: 0;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: wm-spin 0.75s linear infinite;
  margin: 0 auto 20px;
}

@keyframes wm-spin {
  to {
    transform: rotate(360deg);
  }
}

.find-result-actions--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.find-place-error-alt {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-align: center;
  text-decoration: none;
}

.find-place-error-alt:hover {
  text-decoration: underline;
}

.find-result-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.find-result-actions .btn {
  min-width: 220px;
}

.text-mono {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: #475569;
  word-break: break-all;
}

/* Modal */
.wm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.wm-modal-backdrop.is-open {
  display: flex;
}

.wm-modal {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
}

.wm-modal h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #0f172a;
}

.wm-modal p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.wm-modal form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wm-modal input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
}

.wm-modal .btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* maps-search layout */
html.maps-app-html,
body.maps-app-body {
  height: 100%;
  margin: 0;
}

.maps-app {
  display: flex;
  height: 100vh;
  width: 100%;
}

.maps-app-sidebar {
  width: 100%;
  max-width: 420px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  z-index: 2;
  overflow: auto;
  transition: max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    border-right-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop: collapsed state — sidebar slides out to zero width */
.maps-app.is-collapsed .maps-app-sidebar {
  max-width: 0;
  border-right-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.maps-app.is-collapsed .maps-app-sidebar-inner {
  opacity: 0;
  transition: opacity 0.16s ease-out;
}

/* Top leaderboard: when sidebar collapses — fixed width centered */
.maps-app.is-collapsed .maps-app-map .maps-app-footer-ad .ad-box.ad-box-bottom {
  left: 50%;
  right: auto;
  width: min(728px, calc(100% - 16px));
  transform: translateX(-50%);
  box-sizing: border-box;
}

/* Suppress transitions for programmatic/initial state changes (set briefly
   by JS so the sidebar doesn't visibly animate when restoring saved state). */
.maps-app.no-anim .maps-app-sidebar,
.maps-app.no-anim .maps-app-sidebar-inner,
.maps-app.no-anim .maps-sidebar-toggle,
.maps-app.no-anim .maps-sidebar-toggle svg {
  transition: none !important;
}

.maps-app-sidebar-inner {
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.22s ease-in 0.06s;
}

/* Sidebar collapse toggle — sits on the left edge of the map area (desktop only) */
.maps-sidebar-toggle {
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 54px;
  padding: 0;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.maps-sidebar-toggle:hover,
.maps-sidebar-toggle:focus-visible {
  background: #f8fafc;
  color: #1e293b;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22),
    0 0 0 2px rgba(37, 99, 235, 0.35);
  outline: none;
}

.maps-sidebar-toggle svg {
  display: block;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.maps-app.is-collapsed .maps-sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Bottom sheet drag handle — visible only in mobile sheet layout */
.maps-app-sheet-handle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 0 4px;
  margin: 0;
  border: 0;
  background: transparent;
  font: inherit;
  touch-action: none;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  appearance: none;
}

.maps-app-sheet-handle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.maps-app-sheet-handle:active,
.maps-app-sheet-handle.is-dragging {
  cursor: grabbing;
}

.maps-app-sheet-handle__bar {
  display: block;
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
}

.maps-app-sidebar .brand {
  font-weight: 800;
  color: #0f172a;
  font-size: 15px;
}

.maps-app-sidebar .brand .brand-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  vertical-align: middle;
}

.maps-app-lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.maps-app-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.45;
}

.maps-app-sidebar h1 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
  line-height: 1.3;
  font-style: normal;
}

.maps-app-search {
  margin-bottom: 4px;
}

/* Mobile maps search: “Search Again” strip (mapssearch.phtml); hidden on wide viewports */
.maps-app-search-again {
  display: none;
}

.maps-app-search-again__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  width: 98%;
}

.maps-app-search-again__btn:active {
  opacity: 0.92;
}

.maps-app-search-again__ic {
  flex-shrink: 0;
}

/* Reparented by maps-app-sidebar-collapse.js when desktop sidebar is collapsed */
.maps-app-map > .maps-app-search.maps-app-search--floating {
  position: absolute;
  z-index: 12;
  margin: 0;
  left: 40px;
  top: 12px;
  right: auto;
  box-sizing: border-box;
  padding: 3px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.4);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  /* Left ribbon to centered ~728px leaderboard; account for left:40px + gap before ad */
  width: min(420px, calc((100% - 728px) / 2 - 40px - 24px));
  min-width: 0;
}

.maps-app-map > .maps-app-search.maps-app-search--floating .search-suggest {
  z-index: 80;
}

/* Viewport too narrow for a full-width search beside the banner — drop below the ad strip */
@media (max-width: 1100px) {
  .maps-app-map > .maps-app-search.maps-app-search--floating {
    top: 100px;
    width: min(420px, calc(100% - 64px));
  }
}

/* Direction map: route form reparented when desktop sidebar is collapsed */
.maps-app-map > .direction-map-route-form.direction-map-route-form--floating {
  position: absolute;
  z-index: 12;
  margin: 0;
  left: 40px;
  top: 12px;
  right: auto;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  width: min(400px, calc((100% - 420px) / 2 - 40px - 24px));
  min-width: 0;
  max-height: min(72vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.maps-app-map > .direction-map-route-form.direction-map-route-form--floating .search-suggest {
  z-index: 80;
}

@media (max-width: 1100px) {
  .maps-app-map > .direction-map-route-form.direction-map-route-form--floating {
    top: 100px;
    width: min(520px, calc(100% - 64px));
  }
}

/* After search: jump to route planner (Google Maps–style A/B handoff) */
.maps-app-dir-bar {
  margin-top: 12px;
  padding: 12px 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.maps-app-dir-bar[hidden] {
  display: none !important;
}

.maps-app-dir-bar__title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.maps-app-dir-bar__hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.maps-app-dir-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Filled, clickable chrome — <a> only had .btn (no .btn-secondary in project) so it read as text */
.maps-app-dir-bar .maps-app-dir-bar__btn.btn {
  display: inline-flex;
  flex: 1 1 calc(50% - 4px);
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.12s ease;
}

.maps-app-dir-bar .maps-app-dir-bar__btn.btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.maps-app-dir-bar .maps-app-dir-bar__btn.btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.maps-app-dir-bar .maps-app-dir-bar__btn.btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06);
}

.maps-app-search-combo {
  position: relative;
}

.maps-app-search label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 8px;
}

/* One row: input (flex) + Go — avoids tall stacked pill */
.maps-app-search-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  min-height: 44px;
  padding: 3px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.maps-app-search-row .input-clear-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  background: #f8fafc;
  border-radius: 9px 0 0 9px;
}

.maps-app-search-row .input-clear-row input[name="mapQuery"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  border-radius: 0;
  padding: 0 4px 0 14px;
  font-size: 15px;
  color: #0f172a;
}

.maps-app-search-row .input-clear-row .search-panel-clear {
  align-self: center;
  margin-right: 4px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
}

.maps-app-search-row input[name="mapQuery"]::placeholder {
  color: #94a3b8;
}

.maps-app-search-go {
  flex-shrink: 0;
  border-radius: 0 9px 9px 0;
  padding: 0 18px;
  font-weight: 600;
  min-width: 4.5rem;
}

@media (max-width: 768px) {
  .maps-app-search-go.btn-search-submit {
    min-width: 48px;
    padding: 0 12px;
  }
}

.maps-app-meta {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.maps-app-meta strong {
  color: #0f172a;
}

.maps-app-city {
  margin-top: 4px;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-align: left;
}

.maps-app-city__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.maps-app-city__h {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  flex: 1;
  min-width: 0;
}

.maps-app-city__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.maps-app-city__navbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.maps-app-city__navbtn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.maps-app-city__dots {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  flex-wrap: wrap;
  justify-content: center;
}

.maps-app-city__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
}

.maps-app-city__dot.is-active,
.maps-app-city__dot[aria-selected="true"] {
  background: #2563eb;
  transform: scale(1.15);
}

.maps-app-city__status {
  margin: 0 0 8px;
  font-size: 13px;
  color: #64748b;
}

.maps-app-city__viewport {
  overflow: hidden;
  border-radius: 8px;
}

.maps-app-city__track {
  display: flex;
  width: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
}

.maps-app-city__slide {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0 1px 0 0;
}

.maps-app-city__slide-in {
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}

.maps-app-city__slide-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.maps-app-city__thumb {
  margin: 0 0 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.maps-app-city__thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.maps-app-city__desc {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.maps-app-city__extract {
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
}

.maps-app-city__err {
  margin: 0;
  font-size: 13px;
  color: #b91c1c;
}

/* Right rail: weather (statlliteutils pattern — wind, radar, cloud, rain) */
.maps-weather-dock {
  position: absolute;
  z-index: 4;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.maps-weather-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.maps-weather-btn:hover,
.maps-weather-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

.maps-weather-btn.is-active {
  background: rgba(37, 99, 235, 0.45);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.6);
}

.maps-weather-btn__ic {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.maps-weather-btn__ic svg {
  display: block;
}

.maps-app-map {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.maps-app-map #map {
  position: absolute;
  inset: 0;
}

/* Leaderboard (728): desktop overlays top of map; mapssearch mobile stack parks below map */
.maps-app-map > .maps-app-footer-ad {
  position: absolute;
  top: 5px;
  left: 0;
  width: 100%;
  z-index: 9999;
  pointer-events: auto;
}

/* Google-style layer switcher (bottom-left) */
.maps-layer-dock {
  position: absolute;
  z-index: 4;
  left: 10px;
  bottom: 36px;
  max-width: calc(100% - 20px);
}

.maps-layer-trigger {
  position: relative;
  display: block;
  width: 80px;
  min-height: 72px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.2);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.maps-layer-trigger:hover,
.maps-layer-trigger:focus-visible {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(59, 130, 246, 0.5);
  outline: none;
}

.maps-layer-trigger__preview {
  position: absolute;
  inset: 0;
  background-color: #1e293b;
  background-size: cover;
  background-position: center;
}

.maps-layer-trigger__preview--satellite {
  background-image: url("/images/1.png");
}

.maps-layer-trigger__preview--streets {
  background-image: url("/images/2.png");
}

.maps-layer-trigger__preview--dark {
  background-image: url("/images/3.png");
}

.maps-layer-trigger__preview--outdoors {
  background: linear-gradient(160deg, #14532d 0%, #166534 40%, #0f172a 100%);
}

.maps-layer-trigger__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.15) 60%, transparent);
  pointer-events: none;
}

.maps-layer-trigger__ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 7px 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.maps-layer-trigger__icon {
  flex-shrink: 0;
  display: flex;
  opacity: 0.95;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}

.maps-layer-panel {
  position: absolute;
  left: 0;
  bottom: 100%;
  min-width: 220px;
  max-width: min(90vw, 300px);
  max-height: min(60vh, 360px);
  overflow: auto;
  padding: 10px 10px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.25);
}

.maps-layer-panel[hidden] {
  display: none !important;
}

.maps-layer-panel__eyebrow {
  margin: 0 0 6px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.maps-layer-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.maps-layer-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 8px 8px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #0f172a;
  transition: background 0.12s, border-color 0.12s;
}

.maps-layer-option:hover,
.maps-layer-option:focus-visible {
  background: #eff6ff;
  border-color: #bfdbfe;
  outline: none;
}

.maps-layer-option.is-selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.maps-layer-option__thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e2e8f0;
  background-size: cover;
  background-position: center;
  border: 1px solid #e2e8f0;
}

.maps-layer-option__thumb--satellite {
  background-image: url("/images/1.png");
}

.maps-layer-option__thumb--streets {
  background-image: url("/images/2.png");
}

.maps-layer-option__thumb--dark {
  background-image: url("/images/3.png");
}

.maps-layer-option__thumb--outdoors {
  background: linear-gradient(160deg, #14532d 0%, #166534 40%, #0f172a 100%);
  border-color: #cbd5e1;
}

.maps-layer-option__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.maps-layer-option__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.maps-layer-option__sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.25;
}

.maps-layer-option__check {
  flex-shrink: 0;
  width: 1.1em;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  opacity: 0;
  transition: opacity 0.12s;
}

.maps-layer-option.is-selected .maps-layer-option__check {
  opacity: 1;
}

.maps-app-attr {
  font-size: 11px;
  color: #94a3b8;
  margin-top: auto;
  padding-top: 12px;
}

/* direction-map.html */
.direction-map-h1 {
  margin: 0;
  font-size: 1.35rem;
  color: #0f172a;
}

/* API loading popover (direction-map.js) — card only, no full-screen backdrop */
.dir-api-loading__card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: #fff;
  border-radius: 14px;
  padding: 20px 26px 18px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.22);
  text-align: center;
  min-width: 148px;
  max-width: 90vw;
  border: 1px solid #e2e8f0;
}

.dir-api-loading__card[hidden] {
  display: none !important;
}

.dir-api-loading__spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: wm-spin 0.75s linear infinite;
}

.dir-api-loading__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
}

/* B row + submit: desktop keeps form column layout (children participate in parent flex) */
.direction-map-to-row {
  display: contents;
}

/* Route planner form in sidebar — compact layout */
.direction-map-route-form.ab-form {
  margin-top: 2px;
  margin-bottom: 8px;
  padding: 10px 10px 10px;
  gap: 6px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.direction-map-route-form .ab-title {
  color: #0f172a;
}

.direction-map-route-form .mode-switch {
  gap: 8px;
  margin: 0 0 2px;
}

.direction-map-route-form .mode-switch label {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.direction-map-route-form .mode-switch input:checked + label {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
  transform: none;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.45);
}

.direction-map-route-form .mode-switch svg {
  width: 17px;
  height: 17px;
}

.direction-map-route-form .ab-input {
  padding: 3px 8px 3px 4px;
  gap: 8px;
  border-radius: 8px;
}

.direction-map-route-form .ab-badge {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.direction-map-route-form .ab-input input {
  font-size: 14px;
  padding: 6px 4px;
  line-height: 1.3;
}
.dir-routes-header{
  padding: 3px 12px;
}

.dir-route-tab{
  min-width: 28px;
  height: 28px;
}
.direction-map-route-form .ab-input .input-clear-row .search-panel-clear {
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
}

.direction-map-route-form .ab-submit {
  margin-top: 2px;
}

.direction-map-route-form .ab-submit .btn-primary {
  width: 100%;
  min-width: 0;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
}

.direction-map-route-form .ab-submit .btn-primary.btn-search-submit {
  width: auto;
  margin-left: auto;
  margin-right: auto;
}

.direction-map-route-form .search-suggest {
  max-height: 220px;
}

.direction-route-ab {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
}

.direction-route-ab--b {
  margin-top: 6px;
}

.direction-ab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  vertical-align: middle;
  margin-right: 2px;
}

.direction-ab-badge--a {
  background: #16a34a;
}

.direction-ab-badge--b {
  background: #dc2626;
}

.direction-map-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.direction-map-actions .btn-primary {
  text-align: center;
}

.direction-map-link-secondary {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  text-align: center;
}

.direction-map-link-secondary:hover {
  text-decoration: underline;
}

.direction-map-attrib {
  margin: 16px 0 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}

.direction-map-attrib a {
  color: #64748b;
}

/* Multi-route + turn-by-turn (direction-map.js) */
.dir-routes-mount {
  margin-top: 10px;
}

.dir-routes-shell {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.dir-routes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  font-size: 13px;
  font-weight: 700;
  color: #1e3a5f;
}

.dir-routes-header__summary {
  flex: 1;
  line-height: 1.35;
  min-width: 0;
}

.dir-routes-header__meta {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  margin-top: 2px;
}

.dir-route-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.dir-route-tab {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(30, 64, 175, 0.25);
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.85);
  color: #1e40af;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dir-route-tab:hover {
  background: #fff;
  border-color: rgba(30, 64, 175, 0.45);
}

.dir-route-tab.is-active {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

.dir-steps {
  max-height: min(52vh, 300px);
  overflow-y: auto;
  padding: 14px 10px 14px 14px;
  -webkit-overflow-scrolling: touch;
}

.dir-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 12px;
  align-items: start;
}

.dir-step__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

.dir-step__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.dir-step__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.dir-step__line {
  width: 0;
  flex: 1;
  min-height: 14px;
  border-left: 2px dotted #94a3b8;
  margin: 2px 0;
}

.dir-step:last-child .dir-step__line {
  display: none;
}

.dir-step__body {
  padding-bottom: 16px;
}

.dir-step:last-child .dir-step__body {
  padding-bottom: 4px;
}

.dir-step__instr {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
}

.dir-step__dist {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}
@media (max-height: 1000px) {
  .find-loading-glass, .find-loading-card{
    padding: 12px 48px 8px;
    min-height: 323px;
  }
  a.find-btn-continue, .find-btn-continue{
    padding: 13px 70px;
  }
}

@media (max-width: 800px) {
  .find-loading-glass,
  .find-loading-card {
    padding: 10px;
  }

  /* One-screen layout: map fills viewport; sidebar is a fixed bottom sheet (height via JS + --maps-app-sheet-h) */
  html.maps-app-html,
  body.maps-app-body {
    height: 100%;
    height: 100dvh;
    overscroll-behavior: none;
  }

  .maps-app {
    display: block;
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .maps-app-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    flex: none;
    min-height: 0;
    padding-bottom: 0;
  }

  .maps-app-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: 100%;
    max-width: none;
    height: var(--maps-app-sheet-h, 42vh);
    min-height: 88px;
    max-height: 90vh;
    border-right: none;
    border-radius: 20px 20px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
  }

  .maps-app-sheet-handle {
    display: flex;
  }

  /* Desktop sidebar collapse toggle is meaningless on mobile */
  .maps-sidebar-toggle {
    display: none !important;
  }

  .maps-app-sidebar-inner {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 4px max(12px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-right, 0px));
    gap: 12px;
  }

  .maps-app-sidebar h1,
  .direction-map-h1 {
    font-size: clamp(1.05rem, 4.2vw, 1.15rem);
  }

  /* Float above sheet so layers / weather stay tappable */
  .maps-layer-dock,
  .maps-weather-dock {
    position: absolute;
    z-index: 6;
  }

  .maps-layer-dock {
    left: max(10px, env(safe-area-inset-left, 0px));
    bottom: calc(var(--maps-app-sheet-h, 42vh) + 12px + env(safe-area-inset-bottom, 0px));
  }

  /* Layer chip: compact floating control */
  .maps-layer-trigger {
    width: 62px;
    min-height: 56px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(15, 23, 42, 0.12),
      0 1px 0 rgba(255, 255, 255, 0.38) inset;
  }

  .maps-layer-trigger:hover,
  .maps-layer-trigger:focus-visible,
  .maps-layer-trigger[aria-expanded="true"] {
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.38),
      0 0 0 2px rgba(59, 130, 246, 0.65),
      0 1px 0 rgba(255, 255, 255, 0.4) inset;
  }

  .maps-layer-trigger__ui {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 5px 6px 6px;
    gap: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  }

  .maps-layer-trigger__icon svg {
    width: 13px;
    height: 13px;
  }

  /* Weather dock: HORIZONTAL row at bottom-right, mirroring the Layers chip */
  .maps-weather-dock {
    top: auto;
    left: auto;
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--maps-app-sheet-h, 42vh) + 12px + env(safe-area-inset-bottom, 0px));
    transform: none;
    flex-direction: row;
    gap: 4px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.36),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    max-width: calc(100vw - 110px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  }

  .maps-weather-btn {
    width: 35px;
    height: 30px;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.95);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
  }

  .maps-weather-btn:hover,
  .maps-weather-btn:focus-visible {
    background: rgba(255, 255, 255, 0.16);
  }

  .maps-weather-btn:active {
    transform: scale(0.94);
  }

  .maps-weather-btn.is-active {
    background: rgba(37, 99, 235, 0.7);
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(147, 197, 253, 0.95);
  }

  .maps-weather-btn__ic svg {
    width: 22px;
    height: 22px;
  }

  /* Tight phones (<=380px): shrink buttons to keep row + Layers chip within the viewport */
  @media (max-width: 380px) {
    .maps-weather-btn {
      width: 42px;
      height: 42px;
      border-radius: 12px;
    }
    .maps-weather-btn__ic svg {
      width: 20px;
      height: 20px;
    }
    .maps-layer-trigger {
      width: 58px;
      min-height: 52px;
    }
  }

  /* Mapbox zoom + compass: frosted card, larger tap targets */
  .maps-app-map .mapboxgl-ctrl-top-right {
    margin-top: max(8px, env(safe-area-inset-top, 0px));
    margin-right: max(8px, env(safe-area-inset-right, 0px));
  }

  .maps-app-map .mapboxgl-ctrl-group {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 16px;
    box-shadow:
      0 6px 28px rgba(15, 23, 42, 0.18),
      0 0 0 1px rgba(148, 163, 184, 0.42);
    overflow: hidden;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .maps-app-map .mapboxgl-ctrl-group button + button {
    border-top: 1px solid rgba(148, 163, 184, 0.38);
  }

  .maps-app-map .mapboxgl-ctrl-group button:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.55);
    outline: none;
  }

  /* Layers panel: compact dropdown that expands UPWARD from the chip */
  .maps-layer-panel {
    position: absolute;
    left: 0;
    right: auto;
    top: auto;
    bottom: calc(100% + 8px);
    transform: none;
    z-index: 10;
    min-width: 200px;
    width: max-content;
    max-width: min(calc(100vw - 24px), 260px);
    max-height: min(52vh, 340px);
    margin: 0;
    padding: 8px 8px 6px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.28);
    overflow: auto;
    animation: wm-layer-pop-up 0.16s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    transform-origin: bottom left;
  }

  @supports (height: 1dvh) {
    .maps-layer-panel {
      max-height: min(52dvh, 340px);
    }
  }

  .maps-layer-panel__eyebrow {
    margin: 0 0 6px 4px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .maps-layer-panel__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .maps-layer-option {
    padding: 7px 8px 7px 6px;
    gap: 9px;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 10px;
  }

  .maps-layer-option:hover,
  .maps-layer-option:focus-visible {
    background: #eff6ff;
    border-color: #bfdbfe;
  }

  .maps-layer-option.is-selected {
    background: #eff6ff;
    border-color: #93c5fd;
  }

  .maps-layer-option__thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .maps-layer-option__name {
    font-size: 13px;
  }

  .maps-layer-option__sub {
    font-size: 11px;
  }

  @keyframes wm-layer-pop-up {
    from {
      opacity: 0;
      transform: translateY(6px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .maps-app-search-row .input-clear-row input[name="mapQuery"] {
    font-size: 16px;
  }

  .direction-map-route-form .ab-input input {
    font-size: 13px;
    padding: 5px 4px;
  }

  .dir-steps {
    max-height: min(38vh, 260px);
  }

  @supports (height: 1dvh) {
    .dir-steps {
      max-height: min(38dvh, 260px);
    }
  }

  .dir-routes-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 12px;
  }
  .dir-route-tab{
    min-width: 28px;
    height: 28px;
  }

  /* Mobile stack: maps search (stack) | direction map (direction-stack) */
  .maps-app[data-maps-mobile-layout="stack"],
  .maps-app[data-maps-mobile-layout="direction-stack"] {
    display: flex !important;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-sidebar,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-sidebar {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 auto;
    width: 100%;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    z-index: 5;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
    overflow: visible;
    background: #f8fafc;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-sheet-handle,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-sheet-handle {
    display: none !important;
  }
  .dir-routes-header__summary{
    display: flex;
    justify-content: space-between;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-sidebar-inner,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-sidebar-inner {
    padding: 0;
    gap: 0;
    flex: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-sidebar-inner:not(:has(.maps-app-search-again)) > *:not(.maps-app-search) {
    display: none !important;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-sidebar-inner:has(.maps-app-search-again) > *:not(.maps-app-search-again) {
    display: none !important;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-search-again {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: calc(100% + 6px);
    margin-bottom: 0;
    padding: 5px 14px;
    background: rgb(72 138 251);
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-search {
    margin-bottom: 0;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-sidebar-inner > *:not(#dir-map-route-form):not(#maps-app-direction-mobile-strip) {
    display: none !important;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form {
    margin-bottom: 0;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form.ab-form {
    padding: 3px 10px;
    gap: 5px;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form .mode-switch {
    gap: 6px;
    margin: 0 0 1px;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form .mode-switch label {
    width: 28px;
    height: 28px;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form .mode-switch svg {
    width: 15px;
    height: 15px;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form .ab-input {
    padding: 2px 6px 2px 3px;
    gap: 6px;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-route-form .ab-badge {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-to-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-to-row > .ab-input-wrap {
    flex: 1 1 0;
    min-width: 0;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-to-row > .ab-submit {
    margin-top: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-to-row > .ab-submit .btn-primary {
    width: auto;
    min-width: 0;
    padding: 0;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .direction-map-to-row > .ab-submit .btn-primary.btn-search-submit {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    margin: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-direction-mobile-strip {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(22vh, 160px);
    margin-top: 2px;
    padding: 4px 6px 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-direction-mobile-strip__meta,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-direction-mobile-strip__actions {
    display: none !important;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-direction-mobile-strip .dir-routes-mount {
    margin-bottom: 2px;
    max-height: min(14vh, 96px);
    overflow: auto;
  }

  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-direction-mobile-strip .maps-app-alert {
    margin-top: 2px;
    margin-bottom: 0;
    padding: 6px 8px;
    font-size: 12px;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-map,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-map {
    position: relative !important;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    inset: auto !important;
    z-index: 1;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-map #map,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-map #map {
    position: relative !important;
    flex: 1 1 0;
    inset: auto !important;
    min-height: 0;
    width: 100%;
  }

  .maps-app[data-maps-mobile-layout="stack"] #map .ad-box.right-ad,
  .maps-app[data-maps-mobile-layout="direction-stack"] #map .ad-box.right-ad {
    display: none !important;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-footer-ad,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-footer-ad {
    position: relative !important;
    flex: 0 0 auto;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    z-index: 3;
    min-height: 0;
    max-height: min(55vh, 480px);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
    pointer-events: auto;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-footer-ad .ad-box,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-footer-ad .ad-box {
    min-height: 0;
    width: 100%;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-footer-ad .ad-box-bottom,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-footer-ad .ad-box-bottom {
    position: static !important;
    width: 100% !important;
    max-width: 100%;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    min-height: 0;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-app-footer-ad #div-gpt-ad-728-90,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-app-footer-ad #div-gpt-ad-728-90 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-layer-dock,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-layer-dock {
    bottom: calc(max(33px, env(safe-area-inset-bottom, 0px)) + var(--maps-mobile-footer-ad-h, 0px)) !important;
  }

  .maps-app[data-maps-mobile-layout="stack"] .maps-weather-dock,
  .maps-app[data-maps-mobile-layout="direction-stack"] .maps-weather-dock {
    bottom: calc(max(40px, env(safe-area-inset-bottom, 0px)) + var(--maps-mobile-footer-ad-h, 0px)) !important;
  }
}

@media screen and (max-width: 768px) {
  a.find-btn-continue, .find-btn-continue{
    padding: 15px 70px;
    font-size: 15px;
  }
  .mapboxgl-ctrl-top-right{
    top: 150px !important;
  }
}

/* Below-the-fold SEO on app layout (Map search, route map, loading pages) */
.maps-app-seo-below {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  padding-top: 24px;
}
.maps-app-seo-below .section:first-of-type {
  padding-top: 8px;
}

/* Sidebar SEO content block (topic pages) */
.maps-app-seo-block {
  margin-top: 10px;
  padding-top: 6px;
  padding-bottom: 60px;
}

.maps-app-seo-block h2 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.25;
  color: #1f2937;
}

.maps-app-seo-block h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  color: #1f2937;
}

.maps-app-seo-block p {
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.6;
  font-size: 16px;
}

.maps-app-seo-result[hidden] {
  display: none !important;
}

.maps-app-seo-result__title {
  margin: 0 0 8px;
  font-size: 42px;
  line-height: 1.2;
  color: #1f2937;
  word-break: break-word;
}

.maps-app-seo-result__desc {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.55;
  font-size: 16px;
}

.maps-app-seo-bullets {
  margin: 4px 0 14px 18px;
  padding: 0;
  color: #334155;
}

.maps-app-seo-steps {
  margin: 4px 0 14px 20px;
  padding: 0;
  color: #334155;
}

.maps-app-seo-steps li {
  margin: 0 0 6px;
  line-height: 1.55;
  font-size: 15px;
}

.maps-app-seo-bullets li {
  margin: 0 0 6px;
  line-height: 1.55;
  font-size: 15px;
}

.maps-app-seo-inline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.maps-app-seo-inline-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 20px;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.maps-app-seo-inline-list a:hover {
  background: #e5e7eb;
}
