/* State facility map — inline SVG generated by app/lib/map.php.
   Standalone file per the design brief: do not merge into site.css. Uses the
   live token custom properties with literal fallbacks so the map still reads
   correctly if it's ever previewed outside a page that defines them. */

.mapframe {
    position: relative;
    background: var(--navy, #0B1222);
    border: 1px solid var(--border-dark, rgba(255, 255, 255, .08));
    border-radius: 16px;
    padding: 24px;
    display: grid;
    gap: 16px;
}

.mapframe__figure {
    margin: 0;
}

.state-map {
    display: block;
    width: 100%;
    height: auto;
}

.state-map__outline {
    fill: var(--card, #162033);
    stroke: var(--accent, #3B82F6);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.state-map__pin circle {
    stroke: rgba(11, 18, 34, .55); /* --navy, translucent, separates dots on dense clusters */
    stroke-width: .75;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .12s ease;
}

/* Count badge on a shared-coordinate marker (real multi-unit campuses --
   Pitchess, Lompoc, Lerdo -- not a rendering trick). Numerals only, so it
   stays legible at r=6; a two-digit cluster is not expected in practice. */
.state-map__pin-count {
    fill: var(--navy, #0B1222);
    font-size: 7px;
    font-weight: 700;
    pointer-events: none;
}

/* transform: scale(), not an animated r attribute -- r isn't animatable in
   Safari/iOS, transform is. Hover only; the dots are excluded from the tab
   order (see map.php), so there's no keyboard-focus state to match. */
.state-map__pin:hover circle {
    transform: scale(1.4);
}

/* Legend + counts card. Matches the live site's dark floating-card treatment;
   positioned by the view (e.g. bottom-left over the map, or stacked below it
   on narrow screens) rather than fixed here, since layout is the page's job. */
.mapframe-legend {
    background: var(--card, #162033);
    border: 1px solid var(--border-dark, rgba(255, 255, 255, .08));
    border-radius: 12px;
    padding: 16px 18px;
    display: grid;
    gap: 10px;
}

.mapframe-legend__eyebrow {
    margin: 0;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dark-muted, #94A3B8);
}

.mapframe-legend__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.mapframe-legend__list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: var(--text-primary, #E2E8F0);
}

.mapframe-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.mapframe-legend__label {
    flex: 1 1 auto;
}

.mapframe-legend__count {
    font-weight: 700;
    color: var(--text-primary, #E2E8F0);
}

.mapframe-legend__note {
    margin: 4px 0 0;
    font-size: .75rem;
    line-height: 1.5;
    color: var(--text-dark-muted, #94A3B8);
    border-top: 1px solid var(--border-dark, rgba(255, 255, 255, .08));
    padding-top: 10px;
}

@media (min-width: 860px) {
    .mapframe {
        grid-template-columns: 1fr 260px;
        align-items: start;
    }

    .mapframe-legend {
        position: sticky;
        top: 24px;
    }
}

/* Map beside its legend on desktop, stacked on mobile. map.css sets .mapframe to a single
   grid column; this is an opt-in modifier so the standalone test page is unaffected.
   Map first in source order — it is the subject, the legend is the key to it. */
@media (min-width:900px){
  .mapframe--split{grid-template-columns:minmax(0,1fr) 320px;align-items:start}
  .mapframe--split .mapframe-legend{position:sticky;top:24px}
}
