/**
 * SafeCare Map Styling
 * Versie 2.0
 */

/* Container styling */
.safecare-map-container {
    width: 100%;
    margin: 0;
}

.flex.results_map {
    height: 600px;
    width: 100%;
    margin: 0;
    display: flex;
    position: relative;
}

/* Desktop weergave met negatieve marge */
@media (min-width: 992px) {
    .flex.results_map {
        width: calc(100vw + 260px);
        margin-left: -260px;
    }
}

/* Kaart element styling */
.safecare-map {
    height: 600px;
    width: 100%;
    min-height: 400px;
    display: block;
    position: relative;
    z-index: 1;
}

/* Leaflet container styling */
.leaflet-container {
    height: 100% !important;
    width: 100% !important;
    background-color: #FFFFFF !important;
}

/* Make sure the map tiles have white background too */
.leaflet-tile-pane {
    background-color: #FFFFFF;
}

/* Land-paden styling */
.country-path {
    cursor: default;
    transition: filter 0.2s ease-in-out;
}

/* Alleen hover effect op landen met de actieve kleuren */
.country-path[fill="#e2edf7"],
.country-path[fill="#004494"] {
    cursor: pointer;
}

.country-path[fill="#e2edf7"]:hover,
.country-path[fill="#004494"]:hover {
    filter: brightness(0.9);
}

/* Label styling - !important nodig vanwege Leaflet's CSS specificity */
.country-label {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 1000 !important;
    pointer-events: none !important;
}

.country-label div {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #000 !important;
    text-shadow: 1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff !important;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none !important;
}

/* Error berichten styling */
.map-error {
    padding: 20px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
}

/* Loading indicator styling */
.map-loading {
    padding: 20px;
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
}

/* Tooltip styling */
.map-tooltip {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive aanpassingen voor mobiel */
@media (max-width: 768px) {
    .flex.results_map {
        height: 400px;
        width: 100%;
        margin: 0;
    }
    
    .safecare-map {
        height: 400px;
    }
    
    .country-label div {
        font-size: 12px !important;
    }
}

/* Print styling */
@media print {
    .safecare-map-container {
        page-break-inside: avoid;
    }
    
    .flex.results_map {
        height: 500px;
        width: 100%;
        margin: 0;
    }
    
    .country-label div {
        opacity: 1 !important;
    }
}