/* "Find shows" page: search, map, results, show details, route builder. */
.wrap.wide { max-width: 80rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.finder-main { max-width: 80rem; margin: 0 auto; padding: 1rem 1rem 5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.75rem; padding: 0 1rem; border-radius: 0.7rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.97rem; font-weight: 600; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: #3a4a7a; color: var(--text); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.btn.primary { background: var(--glow); border-color: var(--glow); color: #1a1000; }
.btn.primary:hover { background: #ffc633; color: #1a1000; }
.btn.small { min-height: 2.25rem; padding: 0 0.75rem; font-size: 0.9rem; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; stroke-width: 2; fill: none; }
.btn svg circle:first-child { fill: currentColor; stroke: none; }

.search { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.search input, .search select {
  min-height: 2.75rem; border-radius: 0.7rem; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; padding: 0 0.8rem;
}
.search input { flex: 1 1 14rem; min-width: 0; }

.finder-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.map {
  height: 45vh; min-height: 18rem; border-radius: 1rem; border: 1px solid var(--line);
  background: #0b1433; z-index: 0;
}
.panel { min-width: 0; }
@media (min-width: 860px) {
  .finder-grid { grid-template-columns: minmax(0, 1.4fr) minmax(20rem, 1fr); align-items: start; }
  .map { height: calc(100vh - 12rem); min-height: 28rem; position: sticky; top: 1rem; }
  .panel { max-height: calc(100vh - 12rem); overflow-y: auto; padding-right: 0.25rem; }
}

.status { color: var(--muted); margin: 0 0 0.75rem; }
.status.error { color: #ff8a6b; }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.result {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.8rem;
}
.result.active { border-color: var(--glow); }
.result .thumb, .detail .logo {
  flex: none; width: 3.25rem; height: 3.25rem; border-radius: 0.7rem; object-fit: cover;
  background: #142050; display: grid; place-items: center; color: var(--glow); font-weight: 700;
}
.result .body { flex: 1; min-width: 0; }
.result h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.result h3 a { color: var(--text); text-decoration: none; }
.result h3 a:hover { color: var(--glow); }
.result .meta { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.result .actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }

.btn.in-route { border-color: var(--glow); color: var(--glow); }

.detail { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.detail .hero-img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; background: #142050; }
.detail .inner { padding: 1rem 1.1rem 1.2rem; }
.detail .top { display: flex; gap: 0.8rem; align-items: center; }
.detail h2 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.detail .back { margin-bottom: 0.8rem; }
.detail dl { margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.detail dt { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.detail dd { margin: 0; white-space: pre-line; }
.detail .desc { white-space: pre-line; margin: 1rem 0 0; }
.detail .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.detail .links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.detail .links a { display: inline-block; padding: 0.4rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.93rem; }
.detail .links a:hover { border-color: var(--glow); }

.route { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem 1.2rem; }
.route h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.route .hint { color: var(--muted); font-size: 0.93rem; margin: 0 0 0.8rem; }
.route ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.route li { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.5rem 0.6rem; }
.route .num {
  flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--glow); color: #1a1000; font-weight: 700; font-size: 0.9rem;
}
.route .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.route .icon-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1;
}
.route .icon-btn:hover:not([disabled]) { border-color: var(--glow); }
.route .icon-btn[disabled] { opacity: 0.35; cursor: default; }
.route .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.route .actions .btn { flex: 1 1 12rem; }
.route .tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }

.route-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 1000;
  display: flex; align-items: center; gap: 0.9rem;
  background: #0f1a40; border: 1px solid #33427a; border-radius: 999px;
  padding: 0.4rem 0.45rem 0.4rem 1.1rem; box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
  width: max-content; max-width: calc(100vw - 2rem); white-space: nowrap;
}
.route-bar[hidden] { display: none; }
.route-bar .btn { border-radius: 999px; }

/* Map markers: glowing bulbs; numbered when they're on the route. */
.c9 {
  position: relative; width: 24px; height: 40px;
  filter: drop-shadow(0 0 5px var(--glow-c)) drop-shadow(0 0 2px var(--glow-c));
  transform-origin: 50% 100%; transition: transform 0.15s ease;
}
.c9 svg { display: block; }
.leaflet-marker-icon:hover .c9, .c9.active { transform: scale(1.3); }
.c9.active { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 9px var(--glow-c)) drop-shadow(0 0 4px var(--glow-c)); }
.stop-num {
  position: absolute; top: -8px; right: -11px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: #fff; color: #0b1433; border: 2px solid #0b1433;
  font: 800 11px/14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: center;
}
@media (prefers-reduced-motion: reduce) { .c9 { transition: none; } }
.you-are-here {
  width: 16px; height: 16px; border-radius: 50%; background: #3d8bff; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(61, 139, 255, 0.25);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); }
.leaflet-popup-content { margin: 0.7rem 0.9rem; font-size: 0.95rem; }
.leaflet-popup-content a { color: var(--glow); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-attribution { font-size: 0.7rem; }

.toast {
  position: fixed; left: 50%; bottom: 5rem; transform: translateX(-50%); z-index: 1100;
  background: #1b2756; color: var(--text); border: 1px solid #33427a; border-radius: 0.7rem;
  padding: 0.6rem 1rem; font-size: 0.95rem; box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5);
}

body.finder nav a { margin-left: 0.9rem; }
@media (max-width: 520px) {
  body.finder header.site .wrap { gap: 0.4rem; }
  body.finder nav a { margin: 0 0.9rem 0 0; font-size: 0.95rem; }
  .search select { flex: 0 0 auto; }
  .search .btn { flex: 1 1 auto; }
}
