/**
 * Mapbox Distributeurs Map Styles
 *
 * @package Mapbox_Distributeurs
 */

/* Map Container */
.mapbox-distributeurs-map {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Error Message */
.mapbox-distributeurs-error {
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    color: #856404;
}

.mapbox-distributeurs-error p {
    margin: 0;
    font-size: 14px;
}

/* Hide Mapbox Close Button */
.mapboxgl-popup-close-button {
    display: none !important;
}

/* Popup Customization */
.mapboxgl-popup-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mapbox-popup-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.mapbox-popup-title:hover {
    color: #3182ce;
}

.mapbox-popup-info {
    margin: 8px 0;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
}

.mapbox-popup-info strong {
    color: #2d3748;
    font-weight: 600;
}

.mapbox-popup-info a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mapbox-popup-info a:hover {
    color: #2c5aa0;
    text-decoration: underline;
}

/* Marker Animation */
.mapbox-marker {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mapbox-marker:hover {
    transform: scale(1.1);
}

/* Map Controls Styling */
.mapboxgl-ctrl-group button {
    background-color: #ffffff !important;
    border: none !important;
}

.mapboxgl-ctrl-group button:hover {
    background-color: #f7fafc !important;
}

/* Loading State */
.mapbox-distributeurs-map.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mapbox-distributeurs-map {
        min-height: 400px;
    }

    .mapboxgl-popup-content {
        max-width: 250px !important;
    }

    .mapbox-popup-title {
        font-size: 16px;
    }

    .mapbox-popup-info {
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .mapbox-distributeurs-map {
        display: none;
    }
}