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

/* Layer control buttons */
.map-control-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    transition: background-color 0.2s, transform 0.1s;
}

.map-control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Active state voor geselecteerde layer */
.map-control-btn.active {
    background: var(--color-brand-primary) !important;
    color: var(--color-white) !important;
    border: none;
    font-weight: 500 !important;
}

.map-control-btn.active:hover {
    background: var(--color-brand-dark) !important;
    color: var(--color-white) !important;
}

/* Layer switcher container styling */
.map-layer-switcher {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: none;
    display: flex;
    flex-direction: column;
}

/* First button - rounded top corners */
.map-control-btn:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

/* Last button - rounded bottom corners */
.map-control-btn:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Borders between buttons */
.map-control-btn:not(:last-child) {
    border-bottom: none;
}

/* Locate button styling */
.map-locate-btn {
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.map-locate-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.map-locate-btn:active {
    transform: scale(0.98);
}

/* MapLibre native controls styling (zoom, navigation) */
.maplibregl-ctrl-group {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
}

.maplibregl-ctrl-group button {
    background: transparent !important;
    border: none !important;
    color: var(--color-text) !important;
    transition: background-color 0.2s, transform 0.1s !important;
}

.maplibregl-ctrl-group button:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px) !important;
}

.maplibregl-ctrl-group button:active {
    transform: scale(0.95) !important;
}

/* Scale control styling */
.maplibregl-ctrl-scale {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 0.25rem 0.5rem !important;
    font-size: var(--font-size-sm) !important;
    color: var(--color-text) !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
}

/* 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: 0.375rem;
        min-width: 2.25rem;
        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: 0.875rem;
    }
    
    .map-locate-btn {
        font-size: 0;
    }
    
    .map-locate-btn i {
        font-size: 0.875rem;
    }
    
    /* Search toggle button mobile styling */
    .map-search-toggle {
        padding: 0.375rem !important;
        min-width: 2.25rem;
    }
    
    /* Search box mobile styling */
    .map-search-box {
        min-width: 280px !important;
    }
}

