:root {
    --outlook-blue: #7ba4c4;
    --header-bg: #4a7694;
    --bg-color: #f8f9fa;
    --now-color: #e67e22;
}

body { 
    font-family: 'Arial', sans-serif; 
    margin: 0; padding: 10px; 
    background-color: var(--bg-color);
    overflow: hidden; 
}

#kiosk-wrapper { position: relative; height: 95vh; width: 100%; }

#calendar-container { 
    background: white; padding: 15px; border-radius: 12px; 
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    height: 100%; display: flex; flex-direction: column;
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;
}

.fc-view-harness { height: 100% !important; }
.fc .fc-daygrid-body, .fc .fc-daygrid-body table, .fc .fc-scrollgrid-sync-table { height: 100% !important; width: 100% !important; }
.fc-view-dayGrid .fc-daygrid-body tr { display: flex; flex: 1; }
.fc-view-dayGrid .fc-daygrid-day { flex: 1; height: auto !important; }
.fc-view-dayGrid .fc-daygrid-day-frame { height: 100% !important; overflow: hidden; }

.fc .fc-daygrid-week-number {
    padding: 2px;
    font-size: 0.85em;
    color: var(--header-bg);
    text-decoration: none !important;
}

#media-container {
    position: fixed; inset: 0;
    display: none; z-index: 5;
    overflow: hidden; justify-content: center; align-items: center; background: #000;
}
#media-container img { width: 100%; height: 100%; object-fit: contain; }

#sbb-logo {
    position: absolute; top: 5px; right: 15px;
    max-height: 100px; z-index: 10; cursor: pointer;
}

.fc-theme-standard .fc-col-header-cell { background-color: var(--header-bg) !important; }
.fc-col-header-cell-cushion { color: white !important; text-transform: uppercase; font-weight: bold; padding: 8px 0 !important; display: block !important; text-decoration: none !important; }
.fc-timegrid-slot { height: 1.87em !important; }
.fc-timegrid-now-indicator-line { border-color: var(--now-color) !important; border-width: 2px !important; }

.fc-event { cursor: pointer; border: none !important; }
.fc-daygrid-event, .fc-timegrid-event, .fc-list-event, .fc-event-title, .fc-event-main, .fc-event-time { 
    font-weight: normal !important; 
}

.fc-event-main {
    display: block !important; padding: 0 4px !important; overflow: hidden;
    width: 100%; color: #2c3e50 !important; font-family: 'Arial', sans-serif !important;
    white-space: normal !important;
}

#event-popup {
    position: absolute; display: none; z-index: 9999;
    padding: 15px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 350px; pointer-events: none; font-family: 'Arial', sans-serif; background: white;
}

#sync-status { font-size: 0.8rem; color: #999; margin-bottom: 5px; text-align: left; min-height: 1.2em; }
.fc-header-toolbar { padding-right: 180px; }
.fc-daygrid-event-dot, .fc-list-event-dot { display: none !important; }

/* --- Hijskraan kolommen (weekweergave, zelf getekend, geen FullCalendar resource-plugin) --- */
.kraan-strip { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; pointer-events: none; }
.kraan-blok {
    position: absolute; border-radius: 2px; pointer-events: auto; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
}
.kraan-header-strip {
    position: absolute; top: 0; right: 0; bottom: 0; display: flex; z-index: 2;
}
.kraan-header-label {
    flex: 1; display: flex; align-items: center; justify-content: center;
    font-size: 0.55rem; color: white; font-weight: bold; writing-mode: vertical-rl;
}

/* --- Kraanschema: volledige K1/K2/K3-kolommen i.p.v. de "Hele dag"-rij --- */
.kraanschema-header-labels { display: flex; width: 100%; }
.kraanschema-header-label {
    flex: 1; text-align: center; font-size: 0.72rem; font-weight: 700; color: white;
    padding: 3px 0; border-right: 1px solid rgba(255,255,255,0.4);
}
.kraanschema-header-label:last-child { border-right: none; }
.kraanschema-header-chip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }

.kraanschema-lanes { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; z-index: 4; }
.kraanschema-lane { position: relative; flex: 1; border-right: 1px dashed rgba(0,0,0,0.12); }
.kraanschema-lane:last-child { border-right: none; }
.kraanschema-blok {
    position: absolute; left: 2px; right: 2px; border-radius: 3px; color: white;
    overflow: hidden; padding: 2px 4px; box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
    cursor: pointer;
}
.kraanschema-blok .tijd { font-size: 0.68rem; font-weight: 700; }
.kraanschema-blok .titel { font-size: 0.68rem; opacity: 0.95; }
.kraanschema-leeg {
    position: absolute; top: 40%; left: 0; right: 0; text-align: center;
    color: #999; font-size: 0.9rem;
}

/* Vangnet: in de Kraanschema-weergave mag NOOIT een originele agenda-afspraak zichtbaar zijn, wat JS ook doet */
.fc-kraanSchema-view .fc-timegrid-event-harness,
.fc-kraanSchema-view .fc-daygrid-event-harness,
.fc-kraanSchema-view .fc-list-event {
    display: none !important;
}

#admin-overlay, #login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 10000;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(4px);
}
#admin-panel, #numpad-container {
    background: white; padding: 25px; border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
#admin-panel { width: 550px; max-height: 85vh; overflow-y: auto; font-family: Arial; }

#numpad-container { width: 320px; text-align: center; }
.pin-display { display: flex; justify-content: center; gap: 10px; margin: 20px 0; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--header-bg); }
.pin-dot.filled { background: var(--header-bg); }
.numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.num-btn { 
    padding: 20px; font-size: 1.5rem; font-weight: bold; border-radius: 10px; border: 1px solid #ddd;
    background: #fdfdfd; cursor: pointer; user-select: none;
}
.num-btn:active { background: #eee; transform: scale(0.95); }
.num-btn.action { background: #f8f8f8; color: #e74c3c; font-size: 1rem; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.shake { animation: shake 0.2s ease-in-out 2; }

.admin-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 8px; border-bottom: 1px solid #eee; gap: 10px; }
input[type="text"], input[type="number"], select { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.color-rule-row { display: flex; gap: 5px; margin-bottom: 5px; align-items: center; }
.btn-add { background: #27ae60; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; margin-top: 5px; }
.btn-del { background: #e74c3c; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.system-rule { background: #f0f0f0; border-radius: 4px; padding: 5px; opacity: 0.7; }
#media-preview { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 3px; min-height: 76px; }
.media-preview-item { position: relative; flex: 0 0 110px; height: 68px; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; background: #f4f4f4; }
.media-preview-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-preview-index { position: absolute; top: 3px; left: 3px; min-width: 19px; padding: 2px 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.75); color: white; font-size: 0.7rem; font-weight: bold; text-align: center; }
