/**
 * soil-map.css - Styles for soil classification map
 */

/* Soil Legend Styles */
.soil-legend {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-width: 250px;
    font-family: Arial, sans-serif;
}

.soil-legend h6 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #2ba8d2;
    padding-bottom: 5px;
}

.soil-legend-items {
    max-height: 400px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 15px;
    border: 1px solid #666;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

.legend-label {
    color: #333;
    line-height: 1.3;
}

/* Soil Tooltip Styles */
.soil-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
}

.soil-tooltip::before {
    border-top-color: rgba(0, 0, 0, 0.8);
}

/* Soil Popup Styles */
.soil-popup {
    font-family: Arial, sans-serif;
    min-width: 200px;
}

.soil-popup h6 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: bold;
}

.soil-popup p {
    margin: 5px 0;
    font-size: 13px;
    color: #333;
}

.soil-popup p strong {
    color: #2ba8d2;
}

/* Scrollbar styling for legend */
.soil-legend-items::-webkit-scrollbar {
    width: 6px;
}

.soil-legend-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.soil-legend-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.soil-legend-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .soil-legend {
        max-width: 180px;
        padding: 10px 12px;
    }
    
    .soil-legend h6 {
        font-size: 12px;
    }
    
    .legend-item {
        font-size: 11px;
    }
    
    .legend-color {
        width: 16px;
        height: 12px;
    }
}

/* Position adjustment when multiple legends are present */
.dem-legend + .soil-legend {
    bottom: 180px;
}