/**
 * WPForms Heatmap Styles
 */

.wpforms-heatmap-container {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wpforms-heatmap-header {
    margin-bottom: 20px;
    text-align: center;
}

.wpforms-heatmap-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.wpforms-heatmap-description {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

#wpforms-heatmap {
    border: 1px solid #ccc;
    border-radius: 4px;
    position: relative;
    background: #f9f9f9;
}

.wpforms-heatmap-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.wpforms-heatmap-loading p {
    margin: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wpforms-heatmap-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.wpforms-heatmap-stats {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.wpforms-heatmap-legend {
    margin: 0;
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.legend-low {
    background: rgba(0, 255, 0, 0.6);
}

.legend-medium {
    background: rgba(255, 255, 0, 0.8);
}

.legend-high {
    background: rgba(255, 0, 0, 0.9);
}

/* Responsive design */
@media (max-width: 768px) {
    .wpforms-heatmap-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .wpforms-heatmap-header h3 {
        font-size: 20px;
    }
    
    .wpforms-heatmap-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .wpforms-heatmap-legend {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Leaflet map customizations */
.leaflet-container {
    background: #f8f9fa;
}

.leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.8);
}

/* Custom popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 6px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 13px;
    line-height: 1.4;
}



/* Additional styles for map controls and error states */
.info-control {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
}

.info-control h4 {
    margin: 0 0 5px;
    color: #777;
    font-size: 16px;
    font-weight: bold;
}

.wpforms-heatmap-error {
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.wpforms-heatmap-error p {
    margin: 0;
    font-size: 16px;
}

.no-data-message {
    text-align: center;
    padding: 10px;
    min-width: 200px;
}

.heatmap-popup {
    font-size: 13px;
    line-height: 1.4;
}

.heatmap-popup strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* Leaflet control customizations */
.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.leaflet-control-layers-toggle {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgNkg5VjEySDNWNloiIGZpbGw9IiMzMzMiLz4KPHA+dGggZD0iTTE1IDZIMjFWMTJIMTVWNloiIGZpbGw9IiMzMzMiLz4KPHA+dGggZD0iTTkgMTJIMTVWMThIOVYxMloiIGZpbGw9IiMzMzMiLz4KPC9zdmc+');
}

/* Responsive adjustments for map */
@media (max-width: 768px) {
    .info-control {
        font-size: 12px;
    }
    
    .info-control h4 {
        font-size: 14px;
    }
    
    .leaflet-control-layers {
        max-width: 200px;
    }
}

