#map-svg-wrapper {
    width: 100%;
    height: 100%;
}

#map-svg-wrapper svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#map-svg-wrapper svg:active {
    cursor: grabbing;
}

.country {
    cursor: pointer;
    transition: opacity 0.2s, stroke-width 0.2s;
}

.country:hover {
    opacity: 0.85;
    stroke-width: 1.5px;
    stroke: #fff;
}

.country-border {
    pointer-events: none;
}

.hotspot {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

#map-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    pointer-events: none;
    z-index: 100;
    max-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.tooltip-score {
    font-size: 24px;
    font-weight: 800;
    margin: 4px 0;
}

.tooltip-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#map-legend {
    position: absolute;
    bottom: 20px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 11px;
    color: #9ca3af;
    z-index: 50;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-bar {
    width: 200px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #10b981, #f59e0b, #f97316, #ef4444);
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    width: 200px;
    font-size: 10px;
    margin-top: 2px;
}

.no-data {
    fill: #1f2937;
}


/* ===== Responsive: Map ===== */

@media (max-width: 768px) {
    #map-legend {
        bottom: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 10px;
        gap: 6px;
    }

    .legend-bar {
        width: 120px;
        height: 8px;
    }

    .legend-labels {
        width: 120px;
        font-size: 9px;
    }

    #map-tooltip {
        font-size: 12px;
        padding: 8px 10px;
        max-width: 180px;
    }

    .tooltip-name {
        font-size: 13px;
    }

    .tooltip-score {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    #map-legend {
        bottom: 6px;
        left: 6px;
        padding: 4px 8px;
    }

    .legend-bar {
        width: 80px;
        height: 6px;
    }

    .legend-labels {
        width: 80px;
        font-size: 8px;
    }
}
