/**
 * CC Map Info Réseau - Frontend Styles
 *
 * @package CC_Map_Info_Reseau
 */

/* Map Container */
.cc-map-info-reseau-wrapper {
    position: relative;
    width: 100%;
}

.cc-map-info-reseau-container {
    width: 100%;
    height: 600px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Ensure Leaflet controls are visible */
.cc-map-info-reseau-container .leaflet-control-zoom {
    z-index: 1000;
}

.cc-map-info-reseau-container .leaflet-control-attribution {
    z-index: 1000;
}

/* Custom Markers */
.cc-map-marker {
    transition: transform 0.2s ease;
}

.cc-map-marker:hover {
    transform: scale(1.1);
    z-index: 1000 !important;
}

/* Popup Styles */
.cc-map-popup {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    min-width: 200px;
    max-width: 300px;
}

.cc-map-popup-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.cc-map-popup-description {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.cc-map-popup-status {
    margin: 10px 0 0 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.cc-map-popup-status strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.cc-map-popup-status-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

.cc-map-popup-status-name {
    font-weight: 500;
    vertical-align: middle;
}

/* Status-specific colors */
.cc-map-status-en-attente,
.cc-map-marker-en-attente {
    color: #ff9800;
}

.cc-map-status-en-cours,
.cc-map-marker-en-cours {
    color: #2196f3;
}

.cc-map-status-resolu,
.cc-map-marker-resolu {
    color: #4caf50;
}

.cc-map-status-urgent,
.cc-map-marker-urgent {
    color: #f44336;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 15px;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

/* Loading State */
.cc-map-info-reseau-container.loading {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-map-info-reseau-container.loading::before {
    content: "Chargement de la carte...";
    color: #666;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .cc-map-info-reseau-container {
        height: 400px;
    }
    
    .cc-map-popup {
        max-width: 250px;
    }
    
    .cc-map-popup-title {
        font-size: 14px;
    }
    
    .cc-map-popup-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cc-map-info-reseau-container {
        height: 300px;
    }
    
    .cc-map-popup {
        max-width: 200px;
    }
}

/* Accessibility */
.cc-map-info-reseau-container:focus {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .cc-map-info-reseau-container {
        height: 500px !important;
        page-break-inside: avoid;
    }
    
    .leaflet-control-zoom {
        display: none;
    }
}
