/* Caregiving Map Styles */

.caregiving-map-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Map Container */
.caregiving-map-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.us-map-svg {
    width: 100%;
    height: auto;
    max-height: 600px;
}

.us-map-svg .state {
    stroke: #374151;
    stroke-width: 1;
    cursor: pointer;
    transition: opacity 0.3s ease, fill 0.3s ease;
}

.us-map-svg .state:hover {
    opacity: 0.8;
}

.us-map-svg .state.dimmed {
    fill: #e5e7eb !important;
    opacity: 0.7;
}

/* Popup Styles - Tight Compact */
.caregiving-map-popup {
    position: absolute;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 14px 18px;
    min-width: 240px;
    max-width: 280px;
    z-index: 1000;
    pointer-events: auto;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    font-weight: 300;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.popup-close:hover {
    color: #000;
}

.popup-state-name {
    color: #B91C1C;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 22px;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0 0 6px 0;
    padding-right: 24px;
    line-height: 1.2;
}

.popup-caregivers {
    margin-bottom: 8px;
}

.popup-caregivers .popup-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.popup-caregivers .popup-label {
    display: block;
    font-size: 15px;
    color: #666;
    font-weight: 400;
    line-height: 1.3;
}

.popup-prevalence {
    border-top: 1px dotted #ccc;
    padding-top: 8px;
    margin-top: 8px;
}

.popup-prevalence .popup-percent {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 4px;
}

.popup-prevalence .popup-label {
    font-size: 15px;
    color: #666;
    font-weight: 400;
}

/* Legend Styles */
.caregiving-map-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.legend-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.legend-btn:hover {
    background-color: #f1f5f9;
}

.legend-btn.active {
    background-color: #e2e8f0;
    color: #334155;
}

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

/* Responsive */
@media (max-width: 768px) {
    .caregiving-map-legend {
        gap: 10px;
    }
    
    .legend-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}
