/*
  combined-cms-embed.css — shared styles for all Griffith campus map embeds.
  Pairs with combined-cms-embed.html + combined-cms-embed.js and a per-campus
  data/<campus>.data.js. Must load AFTER Leaflet's CSS (it overrides
  .leaflet-* classes). All selectors are scoped to .gu-map-embed.
*/

  .gu-map-embed {
    --griffith-red: #d8232a;
    --griffith-red-dark: #a3171c;
    --griffith-red-soft: #fff5f5;
    --text: #1a1a1a;
    --text-muted: #555;
    --text-soft: #777;
    --border: #d0d0d0;
    --border-soft: #e6e6e6;
    --surface: #ffffff;
    --surface-soft: #f7f7f8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

    --cat-mobility:  #1b6e34;
    --cat-emergency: #d8232a;
    --cat-main:      #2c5aa0;

    --grp-bldg:  #2c5aa0;
    --grp-food:  #e07b00;
    --grp-fac:   #008087;
    --grp-svc:   #6b4ea8;
    --grp-move:  #4a8b3a;
    --grp-study: #1b3a6b;
    --grp-other: #777777;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    line-height: 1.45;
    box-sizing: border-box;
  }
  .gu-map-embed *, .gu-map-embed *::before, .gu-map-embed *::after { box-sizing: border-box; }

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

  /* Map viewport — viewport-relative height with a min-height floor. */
  .gu-map-embed .app-main {
    position: relative;
    height: 72vh;
    min-height: 560px;
    border: 1px solid var(--border);
    border-top: 0;
  }
  .gu-map-embed .gu-map { height: 100%; width: 100%; background: #e9eef2; }

  /* Map control cluster (GPS + zoom) — top-left, right of the search box. */
  .gu-map-embed .map-controls {
    position: absolute; top: 12px; left: 264px;
    z-index: 800; display: flex; gap: 4px;
  }
  .gu-map-embed .map-ctrl-btn {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 6px;
    box-shadow: var(--shadow-md); cursor: pointer;
    font: inherit; padding: 0;
  }
  .gu-map-embed .map-ctrl-btn--zoom { font-size: 1.25rem; line-height: 1; }
  .gu-map-embed .map-ctrl-btn:hover { background: var(--surface-soft); }
  .gu-map-embed .map-ctrl-btn:focus-visible {
    outline: 3px solid var(--griffith-red); outline-offset: 2px;
  }
  .gu-map-embed .map-ctrl-btn:disabled {
    opacity: 0.4; cursor: default; background: var(--surface);
  }
  /* Locating state — swap the icon for a spinner. */
  .gu-map-embed .map-ctrl-btn[aria-busy="true"] svg { display: none; }
  .gu-map-embed .map-ctrl-btn[aria-busy="true"]::after {
    content: ""; box-sizing: border-box;
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--griffith-red);
    animation: gu-spin 0.7s linear infinite;
  }
  @keyframes gu-spin { to { transform: rotate(360deg); } }

  .gu-map-embed .banner {
    position: absolute;
    top: 12px; left: 50%; transform: translateX(-50%);
    z-index: 600;
    background: rgba(26, 26, 26, 0.85); color: #fff;
    padding: 5px 12px; border-radius: 999px;
    font-size: 0.78rem; font-weight: 500;
    max-width: calc(100% - 580px);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: center;
  }
  /* [hidden] needs an explicit rule — the base .banner/.stats-bar rules
     set `display`, which would otherwise override the bare attribute. */
  .gu-map-embed .banner[hidden] { display: none; }

  /* z-index 900 keeps the search box + its dropdown above the control
     cluster (800) so the dropdown isn't blocked on mobile. */
  .gu-map-embed .search-box {
    position: absolute; top: 12px; left: 12px;
    z-index: 900; width: 240px; max-width: calc(100% - 24px);
  }
  .gu-map-embed .search-box__row {
    display: flex; align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow-md); overflow: hidden;
  }
  .gu-map-embed .search-box__row:focus-within {
    outline: 3px solid var(--griffith-red); outline-offset: 2px;
  }
  /* Hard reset — !important: the host CMS's global site-search CSS
     (id-specificity) would otherwise bleed into this input. */
  .gu-map-embed .search-box__input {
    flex: 1 1 auto; min-width: 0;
    padding: 6px 12px;
    -webkit-appearance: none !important; appearance: none !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    font-style: normal !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--text) !important;
  }
  .gu-map-embed .search-box__input:focus { outline: none; }
  .gu-map-embed .search-box__input::-webkit-search-decoration,
  .gu-map-embed .search-box__input::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none;
  }
  /* Same defensive reset — host `button {}` rules bleed too. */
  .gu-map-embed .search-box__btn {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    -webkit-appearance: none !important; appearance: none !important;
    font-family: inherit !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    text-transform: none !important;
    padding: 0;
  }
  .gu-map-embed .search-box__btn:focus-visible {
    outline: 3px solid var(--griffith-red); outline-offset: -3px;
  }
  .gu-map-embed .search-box__btn--clear {
    width: 30px; background: transparent !important;
    color: var(--text-soft); font-size: 1.2rem; line-height: 1;
  }
  .gu-map-embed .search-box__btn--clear:hover { color: var(--text); }
  .gu-map-embed .search-box__btn--clear[hidden] { display: none; }
  /* border-left !important — survives the .search-box__btn `border:0` reset. */
  .gu-map-embed .search-box__btn--go {
    width: 34px; height: 34px;
    background: var(--griffith-red) !important; color: #fff;
    border-left: 1px solid var(--border) !important;
  }
  .gu-map-embed .search-box__btn--go:hover { background: var(--griffith-red-dark); }
  /* Results list is built from <div>s (not <ul>/<li>) so host CMS list
     styling — bullets, li::before — has nothing to attach to. */
  .gu-map-embed .search-box__results {
    margin: 4px 0 0; padding: 4px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: var(--shadow-md);
    max-height: 260px; overflow-y: auto;
  }
  .gu-map-embed .search-box__results[hidden] { display: none; }
  .gu-map-embed .search-box__result {
    padding: 7px 9px; border-radius: 4px; cursor: pointer;
    font-size: 0.86rem; color: var(--text);
  }
  .gu-map-embed .search-box__result:hover,
  .gu-map-embed .search-box__result[aria-selected="true"] {
    background: var(--surface-soft);
  }
  .gu-map-embed .search-box__empty {
    padding: 7px 9px; font-size: 0.82rem; color: var(--text-soft);
  }

  /* Google Maps link in the search-result popup. */
  .gu-map-embed .leaflet-popup-content .gu-popup-link {
    display: block; margin-top: 6px;
    color: var(--griffith-red); font-size: 0.82rem;
    font-weight: 600; text-decoration: none;
  }
  .gu-map-embed .leaflet-popup-content .gu-popup-link:hover { text-decoration: underline; }

  .gu-map-embed .panel--pdf { right: 12px; }
  .gu-map-embed .pdf-link {
    display: block; padding: 9px 10px; border-radius: 6px;
    text-decoration: none; color: var(--text);
  }
  .gu-map-embed .pdf-link + .pdf-link { margin-top: 2px; }
  .gu-map-embed .pdf-link:hover { background: var(--surface-soft); }
  .gu-map-embed .pdf-link:focus-visible {
    outline: 3px solid var(--griffith-red); outline-offset: 2px;
  }
  .gu-map-embed .pdf-link__title {
    display: block; color: var(--griffith-red); font-size: 0.88rem;
  }
  .gu-map-embed .pdf-link__desc {
    display: block; margin-top: 2px;
    font-size: 0.78rem; color: var(--text-soft); line-height: 1.4;
  }

  .gu-map-embed .panel {
    position: absolute; top: 12px; z-index: 700;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: var(--shadow-md);
    width: 260px; max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    display: flex; flex-direction: column;
    font-size: 0.88rem;
  }
  .gu-map-embed .panel[hidden] { display: none; }
  .gu-map-embed .panel--map-view { right: 12px; }
  .gu-map-embed .panel--categories { left: 12px; }

  .gu-map-embed .panel__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
  }
  .gu-map-embed .panel__title {
    font-weight: 700; font-size: 0.74rem; color: var(--text-soft);
    text-transform: uppercase; letter-spacing: 0.05em;
  }
  .gu-map-embed .panel__head-tools { display: flex; gap: 4px; align-items: center; }
  .gu-map-embed .quick-btn {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; cursor: pointer;
    font: inherit; font-size: 0.7rem; padding: 2px 6px; color: var(--text);
  }
  .gu-map-embed .quick-btn:hover { background: var(--surface-soft); }
  .gu-map-embed .quick-btn:focus-visible {
    outline: 3px solid var(--griffith-red); outline-offset: 2px;
  }
  .gu-map-embed .panel__toggle {
    background: transparent; border: 0; cursor: pointer;
    font-size: 1.1rem; line-height: 1; color: var(--text-soft);
    padding: 2px 6px; border-radius: 4px; min-width: 28px;
  }
  .gu-map-embed .panel__toggle:hover { background: var(--surface-soft); color: var(--text); }
  .gu-map-embed .panel__toggle:focus-visible {
    outline: 3px solid var(--griffith-red); outline-offset: 2px;
  }
  .gu-map-embed .panel__body { overflow-y: auto; padding: 4px; }
  .gu-map-embed .panel__body[hidden] { display: none; }

  .gu-map-embed .mv-option {
    display: block; padding: 8px 10px; border-radius: 4px;
    cursor: pointer; line-height: 1.3;
  }
  .gu-map-embed .mv-option:hover { background: var(--surface-soft); }
  .gu-map-embed .mv-option:focus-within { outline: 2px solid var(--griffith-red); outline-offset: -2px; }
  .gu-map-embed .mv-option__top { display: flex; align-items: center; gap: 8px; }
  .gu-map-embed .mv-option__top input[type="radio"] {
    accent-color: var(--griffith-red); width: 16px; height: 16px; flex-shrink: 0;
  }
  .gu-map-embed .mv-option__label { font-weight: 600; }
  .gu-map-embed .mv-option__count {
    font-size: 0.72rem; color: var(--text-soft);
    padding: 1px 6px; border-radius: 999px;
    background: var(--surface-soft); border: 1px solid var(--border-soft);
    margin-left: auto;
  }
  .gu-map-embed .mv-option__desc {
    font-size: 0.78rem; color: var(--text-soft);
    margin: 2px 0 0 24px; line-height: 1.4;
  }
  .gu-map-embed .mv-option__pdf {
    display: inline-block; margin-top: 4px;
    color: var(--griffith-red); text-decoration: none; font-weight: 600;
  }
  .gu-map-embed .mv-option__pdf:hover { text-decoration: underline; }
  .gu-map-embed .mv-option__pdf:focus-visible {
    outline: 3px solid var(--griffith-red); outline-offset: 2px; border-radius: 2px;
  }

  .gu-map-embed .group { padding: 4px 8px 6px; }
  .gu-map-embed .group__label {
    font-size: 0.68rem; color: var(--text-soft);
    text-transform: uppercase; letter-spacing: 0.05em;
    font-weight: 700; margin: 4px 0 4px;
  }
  .gu-map-embed .cats { display: flex; flex-wrap: wrap; gap: 4px; }
  .gu-map-embed .cat-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); cursor: pointer;
    font: inherit; font-size: 0.76rem;
    padding: 3px 9px 3px 8px; color: var(--text);
  }
  .gu-map-embed .cat-chip:hover { background: var(--surface-soft); }
  .gu-map-embed .cat-chip:focus-visible { outline: 3px solid var(--griffith-red); outline-offset: 2px; }
  .gu-map-embed .cat-chip[aria-pressed="true"] { color: #fff; border-color: transparent; }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="bldg"]  { background: var(--grp-bldg); }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="food"]  { background: var(--grp-food); }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="fac"]   { background: var(--grp-fac); }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="svc"]   { background: var(--grp-svc); }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="move"]  { background: var(--grp-move); }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="study"] { background: var(--grp-study); }
  .gu-map-embed .cat-chip[aria-pressed="true"][data-grp="other"] { background: var(--grp-other); }
  .gu-map-embed .cat-chip__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; font-size: 0.85rem;
  }
  .gu-map-embed .cat-chip__count { font-size: 0.66rem; opacity: 0.8; }

  .gu-map-embed .poi-panel {
    position: absolute; left: 12px; bottom: 12px; z-index: 650;
    width: 320px; max-width: calc(100% - 24px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .gu-map-embed .poi-panel[data-open="true"] { display: block; }
  .gu-map-embed .poi-panel__head {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 12px 14px 4px;
  }
  .gu-map-embed .poi-panel__title { margin: 0 0 4px; font-weight: 700; font-size: 1rem; }
  .gu-map-embed .poi-panel__chip {
    display: inline-block; font-size: 0.68rem; padding: 2px 8px; border-radius: 999px;
    background: var(--surface-soft); color: var(--text-muted);
    border: 1px solid var(--border-soft);
    text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700;
  }
  .gu-map-embed .poi-panel__chip[data-src="mobility"]  { background: #e6f4ea; color: var(--cat-mobility); border-color: #b6dec3; }
  .gu-map-embed .poi-panel__chip[data-src="emergency"] { background: #fde8ea; color: var(--cat-emergency); border-color: #f1b8bd; }
  .gu-map-embed .poi-panel__chip[data-src="bldg"]  { background: #e2eaf5; color: var(--grp-bldg); border-color: #b8c8e0; }
  .gu-map-embed .poi-panel__chip[data-src="food"]  { background: #fdf0e0; color: var(--grp-food); border-color: #e7c896; }
  .gu-map-embed .poi-panel__chip[data-src="fac"]   { background: #e0f0f1; color: var(--grp-fac); border-color: #a6cfd2; }
  .gu-map-embed .poi-panel__chip[data-src="svc"]   { background: #ece5f5; color: var(--grp-svc); border-color: #c4b3df; }
  .gu-map-embed .poi-panel__chip[data-src="move"]  { background: #e6f0e0; color: var(--grp-move); border-color: #b5d4a4; }
  .gu-map-embed .poi-panel__chip[data-src="study"] { background: #dce4f0; color: var(--grp-study); border-color: #aab8cf; }
  .gu-map-embed .poi-panel__chip[data-src="other"] { background: #ececec; color: var(--grp-other); border-color: #ccc; }
  .gu-map-embed .poi-panel__close {
    background: transparent; border: 0; font-size: 1.4rem; cursor: pointer;
    color: var(--text-soft); padding: 0 4px; line-height: 1;
  }
  .gu-map-embed .poi-panel__close:hover { color: var(--text); }
  .gu-map-embed .poi-panel__close:focus-visible { outline: 3px solid var(--griffith-red); outline-offset: 2px; }
  .gu-map-embed .poi-panel__body { margin: 0; padding: 0 14px 14px; font-size: 0.88rem; color: var(--text-muted); }

  .gu-map-embed .pin {
    width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--cat-main);
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
  }
  .gu-map-embed .pin > span {
    transform: rotate(45deg); color: #fff;
    font-size: 0.8rem; font-weight: 700;
  }
  .gu-map-embed .pin[data-src="mobility"]  { background: var(--cat-mobility); }
  .gu-map-embed .pin[data-src="emergency"] { background: var(--cat-emergency); }
  .gu-map-embed .pin[data-src="bldg"]      { background: var(--grp-bldg); }
  .gu-map-embed .pin[data-src="food"]      { background: var(--grp-food); }
  .gu-map-embed .pin[data-src="fac"]       { background: var(--grp-fac); }
  .gu-map-embed .pin[data-src="svc"]       { background: var(--grp-svc); }
  .gu-map-embed .pin[data-src="move"]      { background: var(--grp-move); }
  .gu-map-embed .pin[data-src="study"]     { background: var(--grp-study); }
  .gu-map-embed .pin[data-src="other"]     { background: var(--grp-other); }
  .gu-map-embed .pin--small { width: 22px; height: 22px; }
  .gu-map-embed .pin--small > span { font-size: 0.65rem; }

  /* ── Guidance markers (opt-in via DATA.highlightPois) ───────────────────
     Used to call out key Griffith buildings, nearby landmarks, and a future
     campus site. See buildPin() in combined-cms-embed.js. */

  /* Key Griffith building — solid red pin, larger, sits above other pins. */
  .gu-map-embed .pin--griffith {
    background: var(--griffith-red) !important;
    width: 32px; height: 32px;
    border: 3px solid #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
  }
  .gu-map-embed .pin--griffith > span { font-size: 0.95rem; }
  /* Nearby landmark (e.g. QPAC) — neutral grey, clearly NOT a Griffith building. */
  .gu-map-embed .pin--landmark {
    background: var(--grp-other) !important;
    width: 28px; height: 28px;
    border: 2px solid #fff;
  }

  /* Future campus site (e.g. Treasury, 2027) — Griffith emblem logo + text,
     on a white backing card. No teardrop pin. */
  .gu-map-embed .gu-logo-marker {
    display: flex; flex-direction: column; align-items: center;
  }
  .gu-map-embed .gu-logo-marker__svg {
    width: 56px; height: auto;
    padding: 6px; border-radius: 8px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }
  .gu-map-embed .gu-logo-marker__svg .gu-logo-fill { fill: var(--griffith-red); }
  .gu-map-embed .gu-logo-marker__text {
    margin-top: 3px; font-weight: 700; font-size: 0.72rem; line-height: 1.15;
    color: var(--griffith-red-dark); text-align: center; white-space: nowrap;
    background: rgba(255,255,255,0.92); border-radius: 5px; padding: 1px 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  }

  /* Always-visible on-node label (Leaflet permanent tooltip) for highlight /
     landmark pins. Non-interactive so it never blocks map clicks. */
  .gu-map-embed .gu-bldg-label.leaflet-tooltip {
    background: #fff; color: var(--griffith-red-dark);
    border: 1px solid var(--griffith-red); border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    font-weight: 700; font-size: 0.72rem; padding: 2px 7px;
    white-space: nowrap; pointer-events: none;
  }
  .gu-map-embed .gu-bldg-label.leaflet-tooltip::before { border-top-color: var(--griffith-red); }
  /* Landmark label — neutral grey, distinct from Griffith-red building labels. */
  .gu-map-embed .gu-bldg-label--landmark.leaflet-tooltip {
    color: var(--text-muted); border: 1px solid var(--grp-other); background: #fff;
  }
  .gu-map-embed .gu-bldg-label--landmark.leaflet-tooltip::before { border-top-color: var(--grp-other); }

  .gu-map-embed .stats-bar {
    padding: 6px 14px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-top: 0;
    font-size: 0.76rem; color: var(--text-muted);
  }
  .gu-map-embed .stats-bar strong { color: var(--text); }
  .gu-map-embed .stats-bar__right { display: flex; gap: 14px; align-items: center; }
  .gu-map-embed .stats-bar[hidden] { display: none; }

  /* Responsive */
  @media (max-width: 1023px) {
    .gu-map-embed .panel { width: 240px; }
    .gu-map-embed .banner { max-width: calc(100% - 540px); }
  }
  @media (max-width: 767px) {
    .gu-map-embed .panel { width: 220px; }
    .gu-map-embed .banner { max-width: calc(100% - 500px); }
    .gu-map-embed .app-main { min-height: 520px; }
  }
  @media (max-width: 599px) {
    .gu-map-embed .panel--map-view   { right: 8px; left: 8px; width: auto; max-width: none; }
    .gu-map-embed .panel--categories { left: 8px; right: 8px; width: auto; max-width: none; top: 12px; }
    .gu-map-embed .banner { display: none; }
    .gu-map-embed .poi-panel { left: 8px; right: 8px; width: auto; }
    .gu-map-embed .stats-bar { font-size: 0.72rem; }
    .gu-map-embed .stats-bar__right { display: none; }
    .gu-map-embed .app-main { min-height: 460px; }

    /* Mobile: search box full-width on top, PDF panel anchored bottom,
       control cluster below the search box. */
    .gu-map-embed .search-box {
      top: 8px; left: 8px; right: 8px; width: auto; max-width: none;
    }
    .gu-map-embed .panel--pdf {
      top: auto; bottom: 22px;  /* clears the OSM attribution strip */
      left: 8px; right: 8px; width: auto; max-width: none;
    }
    .gu-map-embed .map-controls {
      top: 72px; left: 8px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .gu-map-embed *, .gu-map-embed *::before, .gu-map-embed *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
  @media (forced-colors: active) {
    .gu-map-embed .map-ctrl-btn { border: 2px solid CanvasText; }
  }

/* ── Dark mode ──────────────────────────────────────────────────────────────
   Activated by the dev bar dark toggle (sets data-theme="dark" on <html>).
   Only reachable when dev tools are visible (localhost, file://, or ?dev=true).
   Token overrides cover everything; hardcoded colours need explicit rules. */
[data-theme="dark"] .gu-map-embed {
  --text:              #e2e2e2;
  --text-muted:        #a8a8b0;
  --text-soft:         #7c7c90;
  --border:            #383856;
  --border-soft:       #2c2c44;
  --surface:           #1e1e2e;
  --surface-soft:      #252537;
  --griffith-red-soft: #2d1215;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3),  0 2px 6px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}
/* Invert map tiles + rotate hues — gives a usable dark basemap from OSM tiles.
   Scoped to the tile pane so pins, popups, and controls are unaffected. */
[data-theme="dark"] .gu-map-embed .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg);
}
[data-theme="dark"] .gu-map-embed .gu-map           { background: #1a1a2e; }
[data-theme="dark"] .gu-map-embed .banner            { background: rgba(0,0,0,0.75); }
[data-theme="dark"] .gu-map-embed .leaflet-popup-content-wrapper {
  background: #1e1e2e; color: #e2e2e2; border: 1px solid #383856;
}
[data-theme="dark"] .gu-map-embed .leaflet-popup-tip { background: #1e1e2e; }
/* POI chip accent tints — hardcoded in light mode, need explicit dark overrides */
[data-theme="dark"] .gu-map-embed .poi-panel__chip                       { background: #252537; border-color: #383856; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="mobility"]  { background: #0d2116; border-color: #1b4a2c; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="emergency"] { background: #2d1215; border-color: #6b2025; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="bldg"]      { background: #142038; border-color: #2a4070; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="food"]      { background: #2a1c00; border-color: #5a3c00; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="fac"]       { background: #002e30; border-color: #006068; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="svc"]       { background: #1e1430; border-color: #4a3070; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="move"]      { background: #142018; border-color: #2a4a30; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="study"]     { background: #101828; border-color: #2a3c56; }
[data-theme="dark"] .gu-map-embed .poi-panel__chip[data-src="other"]     { background: #1e1e1e; border-color: #444444; }
/* Guidance marker labels keep a light card in dark mode for contrast against
   the inverted basemap; the logo backing stays white so the red mark reads. */
[data-theme="dark"] .gu-map-embed .gu-bldg-label.leaflet-tooltip          { background: #fff; }
[data-theme="dark"] .gu-map-embed .gu-bldg-label--landmark.leaflet-tooltip { color: #555; }
