/* map-component.css */
#map-wrapper {
    display: flex;
    flex-grow: 1; /* Zorgt dat de wrapper de beschikbare ruimte vult */
    height: 100%;
    position: relative; /* Noodzakelijk voor de loader positionering */
}

#map {
    flex-grow: 1;
    height: 100%;
    z-index: 1;
}

#sidebar {
    width: clamp(280px, 30vw, 520px);
    max-height: calc(100vh - 80px); /* Responsive hoogte, rekening houdend met header/footer */
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid #ccc;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    margin: 10px; /* Een beetje ruimte rondom de sidebar */
    flex-shrink: 0;
    position: relative;
}

#sidebar-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
}

@media (max-width: 600px) {
    #sidebar {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        z-index: 1500;
    }
    #sidebar-resizer {
        display: none;
    }
}

/* --- Alle overige stijlen uit je style.css blijven hier ongewijzigd --- */

.sidebar-header { padding: 15px; border-bottom: 1px solid #eee; position: relative; }
.sidebar-content { padding: 15px; overflow-y: auto; flex-grow: 1; }
#sidebar h3 { margin-top: 0; margin-bottom: 10px; color: #333; }
#sidebar h4 { cursor: pointer; margin: 0; }
#info-panel h5,
#legend-container h5 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #0056b3;
}
.rayon-type-badge { font-size: 0.8em; padding: 2px 6px; border-radius: 10px; color: white; margin-left: 8px; }
.rayon-type-badge.whitespot { background-color: #28a745; }
.rayon-type-badge.bestaand { background-color: #6c757d; }
#info-panel table { width: 100%; font-size: 13px; border-collapse: collapse; }
#info-panel td { padding: 6px; border-bottom: 1px solid #f0f0f0; vertical-align: top; word-break: break-word; }
#info-panel td:first-child { font-weight: 700; width: 50%; }
#search-box { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 3px; margin-bottom: 5px; }
#search-results { list-style-type: none; padding: 0; margin-top: 0; position: absolute; top: calc(100% + 5px); left: 0; right: 0; background: #fff; border: 1px solid #ccc; z-index: 1100; max-height: 300px; overflow-y: auto; display: none; }
#search-results > li { padding: 0; border-bottom: none; cursor: default; }
#search-results .group-title { margin: 8px 0 4px; padding: 0 8px; font-size: 12px; font-weight: 600; color: #555; }
#search-results ul { list-style-type: none; padding: 0; margin: 0; }
#search-results .result-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer; border-bottom: 1px solid #eee; }
#search-results .result-item:hover { background-color: #f0f0f0; }
#search-results .result-icon { font-size: 1rem; }
#search-results .result-badge { background-color: #eee; color: #555; font-size: 0.75rem; padding: 2px 4px; border-radius: 4px; }
#legend-container { border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }
#legend-list { list-style-type: none; padding: 0; margin-top: 5px; max-height: 100%; overflow-y: auto; display: none; }
#legend-list li { display: flex; align-items: center; margin-bottom: 5px; font-size: 12px; }
.legend-color-box { width: 15px; height: 15px; border: 1px solid #777; margin-right: 8px; flex-shrink: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; padding: 15px; border-top: 1px solid #eee; background-color: #f8f9fa; }
.export-button { background-color: #007bff; color: white; border: none; padding: 8px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: background-color .2s; }
.export-button:hover { background-color: #0056b3; }
.export-button:disabled { background-color: #ccc; cursor: not-allowed; }

/* Loader Style */
#loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2000;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #3498db;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    display: none; /* Standaard verborgen */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info icon tooltip */
.info-icon {
    display: inline-block;
    margin-left: 4px;
    color: #007bff;
    cursor: help;
}
