/* Visualize MK Plugin Styles */
.vmk-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Controls Section */
.vmk-controls {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    padding: 20px;
    color: white;
}

.vmk-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.vmk-search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.vmk-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vmk-search-input::placeholder {
    color: #666;
}

.vmk-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.vmk-select {
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    font-size: 14px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.vmk-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vmk-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vmk-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.vmk-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.vmk-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.vmk-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Statistics Dashboard */
.vmk-stats-dashboard {
    background: #f8f9fa;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}

.vmk-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.vmk-stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.vmk-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.vmk-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #2c5aa0, #1e3a5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vmk-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.vmk-charts {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.vmk-chart-container {
    position: relative;
    height: 300px;
}

/* Map Styles */
.vmk-map {
    border: none;
    border-radius: 0 0 12px 12px;
    z-index: 1;
}

/* Popup Styles */
.vmk-popup {
    font-family: inherit;
    min-width: 250px;
}

.vmk-popup-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c5aa0;
}

.vmk-popup-content {
    font-size: 0.9rem;
    line-height: 1.5;
}

.vmk-popup-row {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vmk-popup-row strong {
    color: #495057;
    margin-right: 8px;
    min-width: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vmk-controls {
        padding: 16px;
    }
    
    .vmk-search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vmk-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vmk-select,
    .vmk-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .vmk-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .vmk-stat-card {
        padding: 16px;
    }
    
    .vmk-stat-number {
        font-size: 2rem;
    }
    
    .vmk-stats-dashboard {
        padding: 16px;
    }
    
    .vmk-popup {
        min-width: 200px;
    }
    
    .vmk-popup-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vmk-popup-row strong {
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    .vmk-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .vmk-chart-container {
        height: 250px;
    }
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
}

.leaflet-popup-tip {
    background: white;
    border: 1px solid #e9ecef;
}

/* Loading States */
.vmk-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
    font-style: italic;
}

.vmk-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Animations */
.vmk-container * {
    transition: all 0.3s ease;
}

/* Focus States for Accessibility */
.vmk-search-input:focus,
.vmk-select:focus,
.vmk-btn:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .vmk-container {
        border: 2px solid #000;
    }
    
    .vmk-stat-number {
        -webkit-text-fill-color: #000;
        color: #000;
    }
}