/* MEK Kalender CSS - Versie 22.181 */

/* === BASIS === */
#mek-app { font-family: 'Roboto', 'Google Sans', 'Segoe UI', sans-serif; background: #222; color: #eee; padding: 20px; border-radius: 16px; width: 100%; box-sizing: border-box; position: relative; padding-bottom: 20px; }
#mek-app.light { background: #fff; color: #222; border: 1px solid #ccc; }
#mek-app * { box-sizing: border-box; }

#mk-debug { display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 150px; background: #000; color: #0f0; font-family: monospace; font-size: 12px; padding: 10px; overflow-y: auto; z-index: 999999; border-top: 2px solid #0f0; opacity: 0.95; line-height: 1.4; }
.dbg-err { color: #ff0000; font-weight: bold; background: rgba(255,0,0,0.2); display:block; padding: 2px;} .dbg-ok { color: #27ae60; } .dbg-info { color: #3498db; }

#mk-tip { position: fixed; display: none; z-index: 10000000; background: rgba(0,0,0,0.9); color: #fff; padding: 12px; border-radius: 8px; border: 1px solid #555; font-size: 12px; line-height: 1.5; box-shadow: 0 10px 25px rgba(0,0,0,0.8); pointer-events: none; max-width: 280px; backdrop-filter: blur(4px); }
#mek-app.light #mk-tip { background: rgba(255,255,255,0.95); color: #000; border-color: #ccc; }

/* === FORMULIER-ELEMENTEN === */
.inp { display: block; width: 100%; background: #333 !important; color: #fff !important; border: 1px solid #555 !important; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; font-family: 'Roboto', sans-serif; font-size: 13px; }
#mek-app.light .inp { background: #f0f0f0 !important; color: #000 !important; border-color: #ccc !important; }

.grp-lbl { display: block; font-size: 11px; color: #888; margin-bottom: 4px; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
#mek-app.light .grp-lbl { color: #666; }

.radio-wrapper { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.radio-lbl { font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 4px; }

/* === KNOPPEN === */
.btn { padding: 8px 14px; cursor: pointer; border: none; border-radius: 8px; font-size: 13px; font-weight: bold; font-family: 'Roboto', sans-serif; background: #444; color: #fff; }
.btn:hover { opacity: 0.85; }
.btn-prm { background: #4a90e2; color: #fff; }
#mek-app.light .btn { background: #ddd; color: #333; }
#mek-app.light .btn-prm { background: #4a90e2; color: #fff; }

/* === NAVIGATIE-BALK === */
.top-bar { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.btn-nav { padding: 10px 12px; cursor: pointer; background: #444; color: #fff; border: 1px solid #666; border-radius: 8px; font-size: 13px; font-weight:bold; font-family: 'Roboto', sans-serif; }
.btn-nav:hover { background: #555; }
#mek-app.light .btn-nav { background: #eee; color: #333; border-color: #ccc; }

/* === DROPDOWN === */
.dropdown { position: relative; display: flex; align-items: center; }
.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background-color: #333; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5); z-index: 100000; border-radius: 8px; overflow: hidden; margin-top: 5px; }
.dropdown-content a { color: white; padding: 12px 16px; text-decoration: none; display: block; font-size: 13px; cursor: pointer; }
.dropdown-content a:hover { background-color: #555; }
.dropdown-content.show { display: block; }
#mek-app.light .dropdown-content { background-color: #eee; }
#mek-app.light .dropdown-content a { color: #333; }
#mek-app.light .dropdown-content a:hover { background-color: #ddd; }

.lamp-icon { font-size: 18px; margin-left: 5px; display: none; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* === KALENDER === */
#mk-cal-con { transition: opacity 0.3s ease; }
table.mk-cal { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
table.mk-cal th { background: #333; color: #ccc; padding: 5px; font-size: 12px; border-radius: 4px; }
table.mk-cal td { background: #2a2a2a; border: 1px solid #444; height: 100px; vertical-align: top; padding: 2px; border-radius: 6px; cursor: pointer; overflow: hidden; }
table.mk-cal td.today { border: 2px solid #4a90e2; }
/* Weeknummer kolom */
table.mk-cal th.wk-num-th { width: 16px; min-width: 16px; max-width: 16px; padding: 0; background: transparent; border: none; }
table.mk-cal td.wk-num-td { width: 16px; min-width: 16px; max-width: 16px; padding: 0; background: transparent !important; border: none !important; text-align: center; vertical-align: top; font-size: 9px; font-weight: bold; color: #fff !important; cursor: default; line-height: 1; padding-top: 4px; }
#mek-app.light table.mk-cal td.wk-num-td { color: #222 !important; }

#mek-app.light table.mk-cal th { background: #eee; color: #555; }
#mek-app.light table.mk-cal td { background: #fff; border-color: #ddd; }

.day-num { font-size: 14px; font-weight: bold; margin-bottom: 2px; text-align: center; }

/* === EVENEMENT-ITEMS === */
.evt-item { display: block; width: 100%; margin-bottom: 2px; padding: 3px 4px; border-radius: 4px; color: #fff; font-size: 11px; cursor: pointer; background: #e53935; pointer-events: auto !important; text-align:left; white-space: normal; line-height: 1.3; box-sizing: border-box; }
.evt-time { font-weight: 700; margin-bottom: 1px; }
.evt-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; }
.bg-rent { background: #1565c0 !important; }

/* === MODALS & BOX === */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; justify-content: center; align-items: center; z-index: 9999; }
.box { background: #1e252b; color: #fff !important; padding: 20px; width: 95%; max-width: 500px; max-height: 80vh; overflow-y: auto; border-radius: 12px; border: 1px solid #4a90e2; }
#mek-app.light .box { background: #fff; color: #000 !important; border-color: #ccc; }

/* === LIJSTEN IN MODALS === */
.row-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #444; font-size: 13px; }
#mek-app.light .row-item { border-color: #ddd; }

.checklist { border: 1px solid #555; border-radius: 6px; padding: 6px; max-height: 120px; overflow-y: auto; margin-bottom: 8px; width: 100%; }
.checklist .radio-lbl { justify-content: center; }
#mek-app.light .checklist { border-color: #ccc; }

.filter-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 13px; cursor: pointer; }
.filter-row:hover { background: rgba(255,255,255,0.05); }

/* === PERSONEN & ICONEN === */
.person-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px; font-size: 13px; }
.person-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.list-actions { display: flex; gap: 6px; align-items: center; }

.icon-link { font-size: 16px; text-decoration: none; cursor: pointer; opacity: 0.8; }
.icon-link:hover { opacity: 1; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 2px; }

/* Bel-icoon alleen op mobiel tonen */
.mobile-only { display: none; }
@media (max-width: 600px) { .mobile-only { display: inline; } }

/* === RUIMTE-TARIEF RIJEN === */
.set-row { display: flex; gap: 10px; }
.set-row > div { flex: 1; }

/* === JAAROVERZICHT === */
.year-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 600px) { .year-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.year-tile { background: #2a2a2a; border-radius: 10px; padding: 16px 8px; text-align: center; cursor: pointer; transition: background 0.15s; }
.year-tile:hover { background: #3a3a3a; }
.year-tile-today { border: 2px solid #4a90e2; }
.year-tile-name { font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.year-tile-count { font-size: 11px; color: #888; }
.year-tile-bar { height: 4px; border-radius: 2px; margin: 6px auto 0; width: 60%; }
#mek-app.light .year-tile { background: #f0f0f0; }
#mek-app.light .year-tile:hover { background: #e0e0e0; }

/* =============================================
   MOBIEL (max 600px)
   - #mek-app padding: 20px → 8px
   - td padding: 2px → 1px
   - font evt-item: 11px → 8px (~11 karakters)
   - pijlknoppen, Vandaag en Excel verborgen (swipe navigatie)
   - verder NIETS gewijzigd
   ============================================= */
@media (max-width: 600px) {
    #mek-app { padding: 8px; }
    table.mk-cal td { padding: 1px; }
    .evt-item { font-size: 8px; padding: 2px 3px; }
    .evt-time { font-size: 8px; }
    .evt-title {
        font-size: 8px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        max-height: calc(8px * 1.3 * 2);
    }
    #btn-prev, #btn-next, #btn-today, #btn-excel { display: none; }
}

/* Dagschema tabs */
.day-tab { flex:1; padding:6px; border:none; background:transparent; color:#888; font-size:12px; font-weight:600; border-radius:6px; cursor:pointer; font-family:inherit; }
.day-tab-active { background:#4a90e2; color:#fff; }
#mek-app.light .day-tab { color:#999; }
#mek-app.light .day-tab-active { background:#4a90e2; color:#fff; }

