.map-view {
    margin-top: 1rem;
}

#map {
    width: 100%;
    height: 500px;
    border: 1px solid #dfe3e7;
    border-radius: 6px;
}

#map img[src*="gstatic.com/"],
#map img[src*="googleapis.com/"] {
    max-width: none !important;
}

.map-status {
    margin-bottom: .5rem;
    font-weight: 600;
}

.map-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-bottom: .75rem;
    color: #495057;
    font-size: .875rem;
}

.map-legend[hidden] {
    display: none;
}

.map-legend > span {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
}

.map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.map-legend-bullseye { background: #215781; }
.map-legend-3d { background: #624078; }
.map-legend-both { background: #343a40; }

.map-cluster-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 46px;
    height: 46px;
    padding: 0 8px;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #343a40;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    font: 600 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.map-location-popup {
    max-width: 100%;
    color: #252b30;
    background: #fff;
    font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-wrap: anywhere;
}

.map-location-popup * {
    box-sizing: border-box;
}

.map-location-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 16px;
    border-bottom: 1px solid #dfe3e7;
}

.map-location-count {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 50%;
    background: #343a40;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
}

.map-location-popup h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 600;
}

.map-location-types {
    margin: 4px 0 0;
    color: #5a646c;
}

.map-location-event {
    padding: 16px 0;
    border-bottom: 1px solid #dfe3e7;
}

.map-event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #5a646c;
    font-size: 12px;
}

.map-range-badge {
    padding: 3px 7px;
    border-radius: 4px;
    color: #215781;
    background: #e8f1fa;
    font-weight: 600;
}

.map-range-badge-3d {
    color: #624078;
    background: #f2edf7;
}

.map-location-popup h3 {
    margin: 8px 0 10px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
}

.map-event-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: #005da8;
    font-weight: 600;
}

.map-event-link:hover,
.map-event-link:focus {
    color: #00447b;
    text-decoration: underline;
}

.map-location-footer {
    margin: 0;
    padding: 12px 0 0;
    color: #5a646c;
    font-size: 12px;
}

@media (max-width: 575.98px) {
    #map { height: 460px; }
    .map-legend-note { flex-basis: 100%; }
}

@media (pointer: coarse) {
    .map-event-link { min-height: 44px; }
}
