/* Sydney Games Festival — public venue map */
:root {
  --blue: #0042db;
  --coral: #fc5571;
  --orange: #fd912d;
  --ink: #202020;
  --paper: #fffdf8;
  --cream: #fff4e8;
  --stone: #e7e1d7;
  --white: #fff;
  --muted: #625e58;
  --card: var(--paper);
  --focus: var(--blue);
  --radius: 24px;
  --font-body: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-head: 'Special Gothic Expanded One', var(--font-body);
  --font-display: 'BBH Hegarty', var(--font-head);
}

html { background: var(--orange); }
body { min-height: 100vh; font-family: var(--font-body); color: var(--ink); background: var(--cream); border-top: 5px solid var(--orange); }
h1, h2, .head { font-family: var(--font-head); font-weight: 400; letter-spacing: 0; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 4px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px clamp(16px, 3vw, 38px); background: var(--paper); border-bottom: 3px solid var(--ink); }
.topbar .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 48px; height: 24px; flex: 0 0 auto; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name { font-family: var(--font-display); color: var(--blue); font-size: clamp(18px, 2vw, 23px); line-height: 1; }
.brand-context { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; line-height: 1.15; }
.brand-context span { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--muted); }
.map-symbol { width: 22px; height: 14px; }
.topbar .spacer, .filters .spacer { flex: 1; }
.topbar .tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.chip-btn:hover { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.source-pill { padding: 3px 9px; border: 2px solid var(--ink); border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.source-pill.sample { background: var(--orange); color: var(--ink); }
.source-pill.live { background: var(--blue); color: var(--paper); }

.filters { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 12px clamp(16px, 3vw, 38px); background: var(--paper); border-bottom: 2px solid var(--ink); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.field select { min-width: 170px; padding: 8px 34px 8px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 14px var(--font-body); }
.field select:hover { border-color: var(--blue); }
.result-count { align-self: center; color: var(--muted); font-size: 13px; font-weight: 500; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; height: calc(100vh - 174px); min-height: 480px; margin: 20px clamp(16px, 3vw, 38px) 32px; overflow: hidden; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 10px 10px 0 var(--orange); }
#leafletMap { width: 100%; height: 100%; background: var(--cream); }
.side-panel { overflow-y: auto; padding: 18px; border-left: 3px solid var(--ink); background: var(--paper); }
.side-panel h2 { margin: 0 0 5px; color: var(--ink); font-size: 15px; line-height: 1.2; }
.side-panel .hint { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.geostatus { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 11px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); color: var(--muted); font-size: 12px; }
.geostatus .spinner { width: 12px; height: 12px; flex: 0 0 auto; border: 2px solid var(--stone); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.venue-card { margin-bottom: 10px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--cream); cursor: pointer; }
.venue-card:hover { border-color: var(--blue); box-shadow: 4px 4px 0 var(--orange); transform: translate(-1px, -1px); }
.venue-card .vname { font-weight: 700; font-size: 13px; }
.venue-card .vcount { color: var(--muted); font-size: 11px; }
.unmapped-list .venue-card { cursor: default; }

.leaflet-bar { border: 2px solid var(--ink) !important; border-radius: 12px !important; box-shadow: 4px 4px 0 var(--orange) !important; }
.leaflet-bar a { border-bottom-color: var(--ink) !important; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-weight: 700; }
.leaflet-bar a:hover { background: var(--blue); color: var(--paper); }
.leaflet-popup-content-wrapper { border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--orange); }
.leaflet-popup-tip { background: var(--paper); }
.leaflet-popup-content { font-family: var(--font-body); }
.pop-title { margin: 0 0 6px; color: var(--ink); font-family: var(--font-head); font-size: 13px; font-weight: 400; line-height: 1.25; }
.pop-address { margin: -2px 0 6px; color: var(--muted); font-size: 11.5px; }
.pop-ev { padding: 6px 0; border-top: 1px solid var(--stone); font-size: 12.5px; }
.pop-ev:first-of-type { border-top: none; }
.pop-ev .pop-name { font-weight: 700; }
.pop-ev .pop-meta { color: var(--muted); }
.pop-ev .pop-link { display: inline-block; margin-top: 4px; color: var(--blue); font-size: 12px; font-weight: 700; }
.map-empty { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  #leafletMap { height: 60vh; min-height: 380px; }
  .side-panel { max-height: 42vh; border-top: 3px solid var(--ink); border-left: 0; }
}
@media (max-width: 600px) {
  .topbar { align-items: flex-start; gap: 10px; }
  .topbar .brand { width: 100%; }
  .brand-mark { width: 38px; height: 19px; }
  .brand-context { flex-wrap: wrap; }
  .filters { align-items: stretch; }
  .field, .field select { width: 100%; }
  .map-layout { margin-top: 14px; border-radius: 18px; box-shadow: 6px 6px 0 var(--orange); }
  #leafletMap { min-height: 340px; }
}
