/* ==========================================================================
   RDF Live Multi-Peilingen Kaart — Tactische Stylesheet — Versie 8.9.2
   ========================================================================== */

/* 1. Volledig scherm herstel voor kaart en body */
html, body {
    margin: 0;
    padding: 0;
    width: 100% !important;
    height: 100% !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background-color: #0f172a;
}

#map {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0;
    left: 0;
    z-index: 1;
}

/* =========================================================================
   Specifieke Leaflet Map overschrijvingen voor nachtmodus & tooltips
   ========================================================================= */
html.nacht-modus, 
html.nacht-modus body,
html.nacht-modus .leaflet-container {
    background-color: #0f172a !important; 
}

html.nacht-modus .leaflet-tile-container img {
    filter: brightness(0.6) contrast(1.2) saturate(0.8) invert(1) hue-rotate(180deg);
}

.leaflet-container { background: #f8fafc !important; }

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155;
}

.tracker-tooltip {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    padding: 4px 8px;
}

.tracker-tooltip::before {
    border-top-color: #334155 !important;
}

/* =========================================================================
   Uniforme Modale Pop-up Vensters & Overlays
   ========================================================================= */
.modal-overlay, .chat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-content, .chat-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    height: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

/* Modifiers voor grotere modals (Database & Handleiding) */
.modal-db {
    width: 98% !important;
    max-width: 1200px !important;
    height: 90vh !important;
}

.modal-doc {
    width: 98% !important;
    max-width: 900px !important;
    height: 85vh !important;
}

.modal-iframe {
    width: 100% !important;
    height: 100% !important; /* Dwingt het iframe om de volle hoogte van de modal te pakken */
    border: none;
    border-radius: 6px;
    background: #0f172a;
    display: block; /* Voorkomt kleine spleetjes onderaan */
}
.modal-header, .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
    color: #f8fafc;
}

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.modal-close-btn {
    background: #334155;
    color: #94a3b8;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background: #ef4444;
    color: white;
}

/* =========================================================================
   Zwevend Tactisch Menu aan de rechterkant
   ========================================================================= */
#menu {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important; 
    width: 320px !important; 
    max-height: calc(100% - 40px) !important;
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(4px);
    color: #cbd5e1 !important;
    z-index: 1000 !important; 
    padding: 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #334155 !important;
    overflow-y: auto;
    box-sizing: border-box !important;
    transition: all 0.3s ease-in-out !important;
}

#menu.collapsed {
    width: 90px !important; 
    max-height: 50px !important;
    padding: 5px !important;
    overflow: hidden !important;
    background: #2563eb !important; 
    border-color: #3b82f6 !important;
}

#menu.collapsed > *:not(#toggle-btn) { display: none !important; }

#toggle-btn {
    width: 100%;
    padding: 8px;
    background: #475569;
    color: white;
    border: 1px solid #64748b;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

#toggle-btn:hover { background: #334155; }
#menu.collapsed #toggle-btn { margin-bottom: 0 !important; background: #2563eb !important; border: none !important; font-size: 13px !important; padding: 6px !important; }
#menu.collapsed #toggle-btn:hover { background: #1d4ed8 !important; }

/* Accordeons / Uitklapbare panelen */
details { margin-bottom: 10px; border: 1px solid #334155; border-radius: 6px; background: #1e293b; overflow: hidden; }
summary { padding: 10px; font-weight: bold; font-size: 13px; color: #f8fafc; cursor: pointer; background: #1e293b; user-select: none; outline: none; display: flex; justify-content: space-between; align-items: center; }
summary:hover { background: #273549; }
details[open] summary { background: #273549; border-bottom: 1px solid #334155; }
.details-content { padding: 12px; background: #111827; }

/* Sliders en Jager rijen */
input[type="range"] { width: 100%; margin: 8px 0; accent-color: #3b82f6; cursor: pointer; }
input[type="range"]:disabled { opacity: 0.3; cursor: not-allowed; }
.jager-row { display: flex; align-items: center; margin-bottom: 8px; background: #1f2937; padding: 4px; border-radius: 4px; }
.jager-row select { flex: 1; padding: 6px; background: #111827; color: #f8fafc; border: 1px solid #334155; border-radius: 4px; font-size: 13px; outline: none; }

/* Universele Knopstijlen */
.btn-add { width: 100%; padding: 8px; background: #2563eb; color: white; border: none; border-radius: 4px; font-size: 12px; margin-top: 5px; font-weight: bold; cursor: pointer; }
.btn-add:hover { background: #1d4ed8; }
.btn-remove { background: #ef4444; color: white; border: none; border-radius: 4px; padding: 6px 10px; margin-left: 5px; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-remove:hover { background: #dc2626; }
.status-badge { background: #3b82f6; color: white; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-family: monospace; }
.radio-groep { margin-bottom: 8px; }
.radio-label { display: flex; align-items: center; font-size: 12px; margin: 6px 0; cursor: pointer; }
.radio-label input { margin-right: 6px; accent-color: #3b82f6; }

