/* Base styles for the WebGIS maps */
.olmap {
    width: 100%;
    height: 350px;
}
.controls {
    padding: 1rem;
    background: #f5f5f5;
}
.layer-control {
    margin: 0.5rem 0;
}
.map-info {
    padding: 6px;
    background: rgba(255, 255, 255, 0.8);
    color: rgb(0, 0, 0);
    position: absolute;
    bottom: 10px;
    left: 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
}
.layer-controls {
    max-height: 300px;
    overflow-y: auto;
}
.layer-control-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
    margin-bottom: 8px;
}
.layer-control-item:last-child {
    border-bottom: none;
}
.legend-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0; /* Prevent the circle from shrinking */
    margin-right: 8px;
}

/* Range input styling */
input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 5px;
    outline: none;
}

/* Target layers slider colors (primary blues/greens) */
.target-layer input[type="range"] {
    background: linear-gradient(to right, #e9ecef 0%, #0d6efd 100%);
}
.target-layer input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: 2px solid white;
}
.target-layer input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: 2px solid white;
}

/* Predicted layers slider colors (info teals/cyans) */
.predicted-layer input[type="range"] {
    background: linear-gradient(to right, #e9ecef 0%, #0dcaf0 100%);
}
.predicted-layer input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0dcaf0;
    cursor: pointer;
    border: 2px solid white;
}
.predicted-layer input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0dcaf0;
    cursor: pointer;
    border: 2px solid white;
}

/* Predictor layers slider colors */
.predictor-layer input[type="range"] {
    background: linear-gradient(to right, #e9ecef 0%, #0dcaf0 100%);
}
.predictor-layer input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0dcaf0;
    cursor: pointer;
    border: 2px solid white;
}
.predictor-layer input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0dcaf0;
    cursor: pointer;
    border: 2px solid white;
}

/* XAI layers slider colors */
.xai-layer input[type="range"] {
    background: linear-gradient(to right, #e9ecef 0%, #0dcaf0 100%);
}
.xai-layer input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0dcaf0;
    cursor: pointer;
    border: 2px solid white;
}
.xai-layer input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0dcaf0;
    cursor: pointer;
    border: 2px solid white;
}

.form-range {
    width: 100%;
}

/* CTRL-click feature styles */
/* Loading indicator overlay */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    border-radius: 4px;
}

/* Map position indicator that shows during CTRL hover */
.map-ctrl-indicator {
    position: absolute;
    bottom: 40px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1050;
    pointer-events: none;
}

/* Custom cursor for CTRL hover */
.ctrl-hover {
    cursor: crosshair !important;
}

/* Styling for the layer values table */
.layer-values-table {
    max-height: 300px;
    overflow-y: auto;
}

.layer-values-table th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

/* Tooltip styling for CTRL-click instruction */
.map-instructions {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.olmap:hover .map-instructions {
    opacity: 1;
}


/* Tooltip for combo risks */

.risks-legend-tooltip {
    position: absolute;
    z-index: 1100;
    width: 350px;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.risks-legend-tooltip.show {
    opacity: 1;
}

.tooltip-header {
    padding: 8px 12px;
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px 6px 0 0;
}

.tooltip-body {
    padding: 10px;
}

/* Layer legend tooltip styles */

.legend-tooltip {
        position: absolute;
            background: white;
                border: 1px solid #ccc;
                    border-radius: 5px;
                        padding: 5px;
                            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
                                z-index: 1500;
                                    max-width: 200px;
                                        display: none;
                                        
}

.legend-tooltip img {
        max-width: 100%;
            height: auto;
            
}

.legend-tooltip.active {
        display: block;
        
}

/* Add hover state for layer names */
.layer-name {
        cursor: help;
            text-decoration: underline dotted;
                position: relative;
                
}

/* Extend the existing tooltip system for general legend tooltips */
.general-legend-tooltip {
    position: absolute;
    z-index: 1100;
    width: auto;
    max-width: 300px;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.general-legend-tooltip.show {
    opacity: 1;
}

.general-legend-tooltip .tooltip-header {
    padding: 8px 12px;
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px 6px 0 0;
}

.general-legend-tooltip .tooltip-body {
    padding: 10px;
}

.general-legend-tooltip img {
    max-width: 100%;
    height: auto;
}

/* Add hover effect for layer names */
.layer-hover {
    cursor: help;
}
