/**
 * Map Styles
 * Custom styling for Leaflet maps
 */

/* Map Container */
.lcai-map-container {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.lcai-map-container.map-large {
    height: 600px;
}

.lcai-map-container.map-small {
    height: 300px;
}

/* Sidebar Map Widget */
.lcai-map-widget .lcai-map-container {
    height: 300px;
    margin: 10px 0;
}

/* Marker Popup Styles */
.lcai-marker-popup {
    min-width: 200px;
    max-width: 300px;
}

.lcai-marker-popup .popup-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.lcai-marker-popup h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.lcai-marker-popup h4 a {
    color: #333;
    text-decoration: none;
}

.lcai-marker-popup h4 a:hover {
    color: #667eea;
}

.lcai-marker-popup .popup-location {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #666;
}

.lcai-marker-popup .popup-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

.lcai-marker-popup .popup-link:hover {
    color: #764ba2;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.leaflet-popup-content {
    margin: 15px;
}

.leaflet-popup-tip {
    background: white;
}

/* Cluster Customization */
.marker-cluster-small {
    background-color: rgba(102, 126, 234, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(102, 126, 234, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(118, 75, 162, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(118, 75, 162, 0.8);
}

.marker-cluster-large {
    background-color: rgba(231, 76, 60, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(231, 76, 60, 0.8);
}

/* Map Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leaflet-control-zoom a {
    border: none !important;
    background-color: white;
    color: #333;
}

.leaflet-control-zoom a:hover {
    background-color: #f0f0f0;
}

/* Map Loading State */
.lcai-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f0f0f0;
    color: #666;
    font-size: 1.1em;
}

.lcai-map-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 768px) {
    .lcai-map-container {
        height: 400px;
    }
    
    .lcai-map-container.map-large {
        height: 450px;
    }
    
    .lcai-marker-popup {
        min-width: 180px;
        max-width: 250px;
    }
    
    .lcai-marker-popup .popup-thumbnail {
        height: 120px;
    }
}

/* Map Legend */
.lcai-map-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
}

.lcai-map-legend h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #333;
}

.lcai-map-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lcai-map-legend li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.lcai-map-legend li:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Category Colors */
.legend-color.monumenti { background-color: #e74c3c; }
.legend-color.musei { background-color: #3498db; }
.legend-color.eventi { background-color: #f39c12; }
.legend-color.natura { background-color: #27ae60; }
.legend-color.enogastronomia { background-color: #9b59b6; }
.legend-color.default { background-color: #95a5a6; }
