/* State Report Card — clickable US map block (JQVMap-based) */

.srcm__title { margin-bottom: 0.5rem; }
.srcm__intro { margin-bottom: 1.25rem; }

/* JQVMap reads the container's width AND height at init and sizes its SVG to match,
   so the container MUST have a real height — give it the USA map's aspect ratio. */
.srcm__map {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 959 / 593;
}

/* Let JQVMap size the SVG (it sets explicit pixels); just keep it block-level. */
.srcm__map svg {
    display: block;
    max-width: 100%;
}

.srcm__map .jqvmap-region {
    cursor: pointer;
    transition: fill 0.15s ease;
}

/* Allow the small-state leader-line labels near the right edge to show outside the map box. */
.srcm__map svg {
    overflow: visible;
}

/* State abbreviation labels drawn into the map SVG (scale with the map). */
.srcm__label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    fill: #1a1a1a;
    pointer-events: none;   /* clicks fall through to the region beneath */
    -webkit-user-select: none;
    user-select: none;
}

/* External labels for the small NE states + DC carry the click (the region is too small to hit). */
.srcm__label--link {
    font-size: 13px;
    pointer-events: auto;
    cursor: pointer;
}

.srcm__leader {
    stroke: #1a1a1a;
    stroke-width: 0.6;
    fill: none;
}

/* Tooltip label styling (overrides the chapter-locator default) */
.srcm__map .jqvmap-label,
.jqvmap-label {
    z-index: 1000;
    padding: 5px 8px;
    font-size: 0.8rem;
    line-height: 1.2;
    background: #003845;
    border-radius: 4px;
    color: #fff;
    pointer-events: none;
}

@media (max-width: 600px) {
    .jqvmap-label { font-size: 0.72rem; }
}

/* Legend (categories defined on the block) */
.srcm__legend {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    margin: 1rem auto 0;
    padding: 0;
    max-width: 1000px;
}

.srcm__legend-item {
    display: inline-flex;
    align-items: center;
}

.srcm__legend-swatch {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin-right: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 2px;
}

.srcm__legend-label {
    font-size: 0.9rem;
    line-height: 1.2;
}
