/**
 * Map Base Controls Styling
 * 
 * Styling voor kaart controls (layer switcher, locate button, etc.)
 */

/* Layer control buttons */
.map-control-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    transition: background-color 0.2s;
}

.map-control-btn:hover {
    background: #e4ebfc;
}

/* Active state voor geselecteerde layer */
.map-control-btn.active {
    background: #e4ebfc;
}

/* Layer switcher container styling */
.map-layer-switcher {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* First button - rounded top corners */
.map-control-btn:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

/* Last button - rounded bottom corners */
.map-control-btn:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Borders between buttons */
.map-control-btn:not(:last-child) {
    border-bottom: 1px solid #ddd;
}

/* Locate button styling */
.map-locate-btn {
    padding: 8px 12px;
    background: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.map-locate-btn:hover {
    background: #e4ebfc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-locate-btn:active {
    background: #e4ebfc;
}

/* Hover tooltip styling - shared across all map layers */
.maplibregl-popup.hover-tooltip {
    pointer-events: none; /* Don't block mouse events */
    z-index: 10000; /* Ensure tooltips appear above everything */
}

.maplibregl-popup.hover-tooltip .maplibregl-popup-content {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 8px;
    max-width: none !important; /* Allow tooltip to be as wide as needed */
    width: max-content !important; /* Fit content width */
}

.maplibregl-popup.hover-tooltip .maplibregl-popup-tip {
    display: none; /* Hide the arrow for cleaner look */
}

/* Mobile responsive: hide text, show only icons */
@media (max-width: 640px) {
    .map-control-btn,
    .map-locate-btn {
        padding: 10px;
        min-width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide text on small screens, keep only icons */
    .map-control-btn i,
    .map-locate-btn i {
        margin: 0;
    }
    
    /* Hide text nodes (everything except the icon) */
    .map-control-btn {
        font-size: 0;
    }
    
    .map-control-btn i {
        font-size: 14px;
    }
    
    .map-locate-btn {
        font-size: 0;
    }
    
    .map-locate-btn i {
        font-size: 14px;
    }
}

