/**
 * VERMISSINGEN.CSS - Styling voor vermissingen markers en popups
 * Versie: 1.0
 * Unieke class names met 'vm-' prefix om conflicten te voorkomen
 */

/* ====== MARKER CONTAINERS ====== */
.vm-icon-container {
    background: transparent !important;
    border: none !important;
    position: relative;
}

.vm-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====== PULSERENDE RINGEN ====== */
.vm-pulse-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    opacity: 0;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
}

/* Urgente vermissingen - snelle puls */
.vm-pulse-urgent {
    animation: vmPulseUrgent 1.5s infinite;
}

/* Normale vermissingen - gemiddelde puls */
.vm-pulse-normal {
    animation: vmPulseNormal 2.5s infinite;
}

/* Overleden - langzame puls */
.vm-pulse-slow {
    animation: vmPulseSlow 4s infinite;
}

/* Opgeloste vermissingen - korte puls die stopt */
.vm-pulse-success {
    animation: vmPulseSuccess 1s ease-out 3;
}

/* ====== PULSE ANIMATIES ====== */
@keyframes vmPulseUrgent {
    0% {
        transform: scale(0.1);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes vmPulseNormal {
    0% {
        transform: scale(0.1);
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes vmPulseSlow {
    0% {
        transform: scale(0.1);
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes vmPulseSuccess {
    0% {
        transform: scale(0.1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ====== CENTRAL DOTS ====== */
.vm-dot {
    position: absolute;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
    transition: all 0.2s ease;
}

/* Hover effect voor dots 
.vm-dot:hover {
    transform: translate(-50%, -50%) scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}*/

/* ====== SIMPLIFIED MARKERS ====== */
.vm-simple-marker {
    background: transparent !important;
    border: none !important;
}

.vm-simple-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ====== POPUP STYLING ====== */
.vm-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vm-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 0;
    overflow: hidden;
}

.vm-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.vm-popup .leaflet-popup-tip {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ====== POPUP CONTENT ====== */
.vm-popup-content {
    min-width: 250px;
    max-width: 300px;
}

.vm-popup-header {
    color: white;
    padding: 12px 15px;
    background-color: #3498db; /* Fallback color */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vm-popup-title {
    font-weight: bold;
    font-size: 14px;
    flex: 1;
}

.vm-popup-type {
    font-size: 11px;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.vm-popup-body {
    padding: 15px;
}

.vm-popup-info {
    margin-bottom: 12px;
}

.vm-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.vm-info-icon {
    width: 20px;
    font-size: 12px;
    margin-right: 8px;
    text-align: center;
}

.vm-info-text {
    flex: 1;
    color: #2c3e50;
}

.vm-popup-description {
    background: #f8f9fa;
    border-left: 3px solid #e74c3c;
    padding: 10px 12px;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #2c3e50;
    border-radius: 0 4px 4px 0;
}

.vm-popup-footer {
    text-align: center;
    margin-top: 15px;
}

.vm-popup-link {
    display: inline-block;
    background-color: #3498db;
    color: white !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vm-popup-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0.9;
}

.vm-popup-link:active {
    transform: translateY(0);
}

/* ====== RESPONSIVE STYLING ====== */
@media (max-width: 768px) {
    .vm-popup-content {
        min-width: 220px;
        max-width: 280px;
    }
    
    .vm-popup-header {
        padding: 10px 12px;
    }
    
    .vm-popup-title {
        font-size: 13px;
    }
    
    .vm-popup-body {
        padding: 12px;
    }
    
    .vm-info-row {
        font-size: 12px;
    }
    
    .vm-popup-description {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    /* Kleinere dots op mobiel */
    .vm-dot {
        border-width: 1px;
    }
    
    /* Minder intensieve pulse op mobiel (batterij besparing) */
    .vm-pulse-urgent {
        animation-duration: 2s;
    }
    
    .vm-pulse-normal {
        animation-duration: 3s;
    }
}

/* ====== HOVER EFFECTS ====== 
.vm-marker:hover .vm-pulse-ring {
    animation-play-state: paused;
    opacity: 0.3;
}

.vm-marker:hover .vm-dot {
    transform: translate(-50%, -50%) scale(1.1);
}*/

/* ====== ACCESSIBILITY ====== */
@media (prefers-reduced-motion: reduce) {
    .vm-pulse-ring {
        animation: none;
    }
    
    .vm-dot {
        transition: none;
    }
    
    .vm-popup-link {
        transition: none;
    }
}

/* ====== DARK MODE SUPPORT ====== */
@media (prefers-color-scheme: dark) {
    .vm-popup .leaflet-popup-content-wrapper {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .vm-popup .leaflet-popup-tip {
        background: #2c3e50;
    }
    
    .vm-info-text {
        color: #ecf0f1;
    }
    
    .vm-popup-description {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .vm-dot {
        border-color: #2c3e50;
    }
    
    .vm-simple-dot {
        border-color: #2c3e50;
    }
}

/* ====== LEAFLET OVERRIDES ====== */
.vm-popup .leaflet-popup-close-button {
    color: rgba(255,255,255,0.8) !important;
    font-size: 18px !important;
    font-weight: bold !important;
    padding: 8px !important;
}

.vm-popup .leaflet-popup-close-button:hover {
    color: white !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 3px;
}