/* === MODAL BACKDROP === */
.modal-indeling-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(18,18,18,0.46);
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    animation: fadeinbg 0.18s;
}
@keyframes fadeinbg {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* === MODAL CONTAINER === */
.modal-indeling-container {
    background: #1b1b1b;
    color: #fffbe8;
    border-radius: 20px;
    box-shadow: 0 12px 44px rgba(0,0,0,0.5);
    padding: 0;
    width: 95vw;
    max-width: 830px;
    min-width: 0;
    height: auto;
    max-height: 95vh;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    animation: fadeinmodal 0.25s;
    margin: 1.5vw 0;
}
@keyframes fadeinmodal {
    from { opacity: 0; transform: translateY(40px) scale(.97);}
    to   { opacity: 1; transform: translateY(0) scale(1);}
}
/* === RESPONSIVE MODAL CONTAINER === */
@media (max-width: 900px), (max-height: 600px) {
    .modal-indeling-container {
        width: 99vw; max-width: 99vw; border-radius: 9px; max-height: 98vh; margin: 1vw 0;
    }
}
@media (max-width: 600px) {
    .modal-indeling-container {
        width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; margin: 0;
        display: flex; flex-direction: column; /* Belangrijk voor flex-chain */
        min-height: 0;
    }
    .modal-indeling-headerblock { padding: 12px 7px 3px 7px; }
}

/* === SLUITKNOP === */
.modal-indeling-close {
    position: absolute; top: 13px; right: 19px;
    font-size: 2.1em;
    background: transparent;
    color: orange;
    border: none;
    cursor: pointer;
    z-index: 22;
    opacity: 0.84;
    transition: color 0.13s, opacity 0.14s;
    line-height: 1;
}
.modal-indeling-close:hover { color: #fff; opacity: 1; }

/* === HEADER FLEX: AFDELING + DATUM + DROPDOWN === */
.modal-indeling-headerblock {
    width: 100%;
    text-align: left;
    padding: 18px 22px 6px 20px;
    flex: 0 0 auto;
    background: transparent;
}
.modal-indeling-headerflex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 26px;
}
.modal-indeling-header-naamdatum {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 1.14em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
    gap: 8px;
}
.modal-indeling-header-afdeling {
    color: #fff;
    font-weight: 700;
    font-size: 1.05em;
}
.modal-indeling-header-sep {
    color: orange;
    font-size: 1.14em;
    margin: 0 5px;
    font-weight: 500;
}
.modal-indeling-header-datum {
    color: orange;
    font-weight: 500;
    font-size: 1em;
}

/* === SHIFT DROPDOWN (modern zwart/wit/klein) === */
.modal-indeling-dropdown-wrapper.small-dropdown {
    margin: 0 18px 0 0;
    padding: 0;
    width: auto;
    display: flex;
    align-items: flex-start;
}
.modal-indeling-dropdown.small-dropdown {
    min-width: 64px; max-width: 130px;
    font-size: 0.95em;
    padding: 3.5px 20px 3.5px 10px;
    border-radius: 7px;
    border: 1.5px solid #353535;
    height: 28px;
    margin-right: 0;
    background: #171717;
    color: #fff;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.14);
    transition: border 0.17s, box-shadow 0.18s;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.01em;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 13px 13px;
    padding-right: 32px;
}
.modal-indeling-dropdown.small-dropdown:focus,
.modal-indeling-dropdown.small-dropdown:active {
    border: 1.5px solid orange;
    box-shadow: 0 0 0 2px rgba(255,168,0,0.16);
    outline: none;
}
.modal-indeling-dropdown.small-dropdown option {
    background: #232323;
    color: #fff;
    font-size: 0.98em;
}
@media (max-width: 900px) {
    .modal-indeling-dropdown.small-dropdown {
        font-size: 0.89em; min-width: 54px; height: 24px; padding: 2.5px 18px 2.5px 7px;
    }
}
@media (max-width: 600px) {
    .modal-indeling-dropdown.small-dropdown {
        font-size: 0.84em; min-width: 44px; height: 21px; padding: 2px 13px 2px 7px; border-radius: 6px;
    }
}

.modal-indeling-hr {
    width: 98%;
    border: none;
    border-top: 2.5px solid orange;
    margin: 10px 0 7px 0;
    opacity: 0.89;
}

/* === FLEX: TWEE KANTEN === */
.modal-indeling-flex {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 0;
    min-height: 0;
    background: transparent;
    max-height: calc(100vh - 48px);
}
@media (max-width: 600px) {
    .modal-indeling-flex {
        flex-direction: column;
        flex: 1 1 0;
        min-height: 0;
        height: auto;
    }
}

/* === LINKS / RECHTS GEDEELTE === */
.modal-indeling-deel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 13px 0 13px;
    box-sizing: border-box;
    background: transparent;
    justify-content: flex-start;
    overflow: hidden;
}
.modal-indeling-deel-links {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    /* height: 100%; <-- niet meer forceren, dit mag weg! */
    padding: 0 13px 0 13px;
    box-sizing: border-box;
    background: transparent;
    justify-content: flex-start;
    overflow: hidden;
}
@media (max-width: 600px) {
    .modal-indeling-deel-links,
    .modal-indeling-deel-rechts {
        flex: 1 1 0;
        min-width: 0;
        min-height: 0;
        max-height: 100%;
        /* height: 100%; <-- niet meer forceren, dit mag weg! */
        padding: 0 4px;
    }
}
.modal-indeling-block-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.07em;
    color: #fff;
    margin-bottom: 18px;
    margin-top: 0;
    padding-bottom: 6px;
    border-bottom: 2.5px solid orange;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.02em;
    width: 92%;
    background: #181818;
    box-shadow: 0 2px 10px rgba(255,144,0,0.04);
    flex: 0 0 auto;
    align-self: center;
}

/* === DIVIDER === */
.modal-indeling-divider {
    width: 2.7px;
    min-width: 2.5px;
    max-width: 3.3px;
    background: linear-gradient(to bottom, orange 89%, #ffce7e 100%);
    margin: 0;
    height: 100%;
    align-self: stretch;
    opacity: 0.93;
    border-radius: 8px;
    box-shadow: 0 0 5px 0px rgba(255,165,0,0.10);
}

/* === VAKKEN EN MEDEWERKERSLIJST === */
.modal-indeling-vakkenlijst {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 18px;
    min-height: 0;
    max-height: none; /* geen max-height meer, flex regelt het */
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    scrollbar-width: thin;
}
@media (max-width: 1366px) {
    .modal-indeling-vakkenlijst { gap: 5px; }
}
@media (max-width: 800px) {
    .modal-indeling-vakkenlijst { gap: 3px; }
}
@media (max-width: 600px) {
    .modal-indeling-vakkenlijst {
        gap: 2px;
        max-height: none !important;
        min-height: 0;
        flex: 1 1 0;
    }
}

/* === ADAPTIEVE VAK-KNOPPEN === */
.modal-indeling-vak {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #232323;
    border-radius: 9px;
    min-width: 0;
    max-width: 100%;
    color: #fff;
    font-size: clamp(0.95em, 1.4vw, 1.12em);
    font-weight: 500;
    box-shadow: 0 1.5px 8px rgba(255,144,0,0.04);
    border: 1.2px solid rgba(255,165,0,0.13);
    margin-bottom: 0;
    cursor: pointer;
    opacity: 1;
    padding: 10px 0;
    min-height: 56px;
    transition: background 0.16s, box-shadow 0.16s, min-height 0.15s, font-size 0.15s, padding 0.15s;
    height: auto;
    max-height: 94px;
    overflow: hidden;
}
@media (max-width: 1366px) {
    .modal-indeling-vak {
        font-size: clamp(0.82em, 1.09vw, 0.98em);
        min-height: 45px;
        max-height: 74px;
        padding: 8px 0;
    }
}
@media (max-width: 800px) {
    .modal-indeling-vak {
        font-size: clamp(0.75em, 1vw, 0.91em);
        min-height: 36px;
        max-height: 55px;
        padding: 6px 0;
    }
}

.modal-indeling-vak:hover,
.modal-indeling-vak.actief {
    background: linear-gradient(90deg, #ffe7b7 2%, #ffe1b7 99%);
    color: #181818;
}
/* Naamblokjes in geselecteerd/hovered vak worden donkergrijs met wit */
.modal-indeling-vak.actief .modal-ingedeeld-naam,
.modal-indeling-vak:hover .modal-ingedeeld-naam {
    background: #232323;
    color: #ffffff;
    border-color: #4a4a4a;
    font-weight: 600;
}
/* MAAR niet voor leegmelding! */
.modal-indeling-vak.actief .modal-ingedeeld-leeg,
.modal-indeling-vak:hover .modal-ingedeeld-leeg {
    background: none !important;
    color: #232322 !important;
    border: none !important;
    font-style: italic !important;
    opacity: 0.82;
    font-weight: 500;
}

.modal-indeling-vak-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2px 10px 0 10px;
    min-height: 16px;
    gap: 7px;
    width: 100%;
    box-sizing: border-box;
}
.modal-indeling-vak-titel {
    color: inherit;
    font-weight: 600;
    font-size: 1em;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    text-align: left;
    letter-spacing: 0.01em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5px;
    margin-top: -6px;
    max-width: 92%;
}
.modal-indeling-vak-titel::after {
    content: '';
    display: block;
    width: 32px;
    height: 2.5px;
    background: linear-gradient(90deg, orange 80%, #ffe0a2 100%);
    border-radius: 3px;
    margin-top: 3px;
    opacity: 0.78;
}
.modal-indeling-plus {
    background: rgba(255,165,0,0.18);
    color: orange;
    border-radius: 50%;
    font-size: 1.14em;
    border: 1.2px solid transparent;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-weight: 900;
    margin-left: 12px;
    box-shadow: 0 1px 3px rgba(255,165,0,0.07);
    flex-shrink: 0;
    outline: none;
    transition: background 0.14s, color 0.13s, border 0.13s;
    z-index: 2;
    position: relative;
}
.modal-indeling-plus:hover,
.modal-indeling-plus.actief {
    background: orange;
    color: #232323;
    border-color: orange;
}
.modal-indeling-vak.actief .modal-indeling-vak-titel {
    color: #181818 !important;
    font-weight: 700;
}
.modal-indeling-vak.actief .modal-indeling-plus {
    background: #fffbe4;
    color: orange;
    border: 2px solid orange;
}

/* NAMEN-lijst met extra ruimte ONDER en BOVEN de namen */
.modal-ingedeeld-names {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px 18px 12px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 0.91em;
    line-height: 1.15;
    min-height: 35px;
}
@media (max-width: 1366px) {
    .modal-ingedeeld-names { gap: 5px; padding-bottom: 12px; }
}
@media (max-width: 950px) {
    .modal-ingedeeld-names { gap: 4px; padding-bottom: 10px; }
}
@media (max-width: 800px) {
    .modal-ingedeeld-names { gap: 3px; padding-bottom: 8px; }
}
@media (max-width: 600px) {
    .modal-ingedeeld-names { gap: 2px; padding-bottom: 7px; }
}

/* LABEL/BLOKJE voor een naam */
.modal-ingedeeld-naam {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    color: #232323;
    background: #eec3a0;
    border-radius: 7px;
    padding: 5px 15px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.18;
    margin: 0;
    box-shadow: 0 1px 2.5px rgba(255,144,0,0.09);
    border: 1px solid #f3d382;
    white-space: nowrap;
    min-width: 32px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: background 0.14s, color 0.12s;
}
@media (max-width: 1366px) { .modal-ingedeeld-naam { font-size: 0.82em; padding: 3.5px 8px; max-width: 110px; } }
@media (max-width: 950px) { .modal-ingedeeld-naam { font-size: 0.75em; padding: 3px 7px; max-width: 90px; } }
@media (max-width: 800px) { .modal-ingedeeld-naam { font-size: 0.69em; padding: 2.5px 5px; max-width: 74px; } }
@media (max-width: 600px) { .modal-ingedeeld-naam { font-size: 0.62em; padding: 2px 4px; max-width: 55px; } }

/* Speciaal voor leeg-melding: meerdere regels toegestaan, geen ellipsis, geen achtergrond */
.modal-ingedeeld-leeg {
    background: none;
    color: #b7a88a !important;
    border: none;
    font-style: italic;
    opacity: 0.82;
    padding: 0;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: left;
    font-size: 0.98em;
}

/* MEDEWERKER BLOKJE (RECHTS) */
.modal-indeling-medewerker-blok {
    display: flex;
    align-items: center;
    background: #232323;
    border-radius: 9px;
    height: 36px;
    min-width: 90px;
    color: #fff;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 1.5px 8px rgba(255,144,0,0.04);
    border: 1.2px solid rgba(255,165,0,0.13);
    word-break: break-word;
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transition: background 0.16s, box-shadow 0.12s, border 0.12s, opacity 0.22s;
    text-align: left;
    white-space: nowrap;
    padding: 0 7px 0 13px;
    gap: 0;
    position: relative;
    box-sizing: border-box;
}
.modal-indeling-medewerker-blok:hover {
    background: #272727;
    box-shadow: 0 2px 13px rgba(255,144,0,0.15);
    border-color: #ffaa19;
}
.modal-indeling-medewerker-naam {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;   /* naam/tijd links, icoon rechts */
    color: #fff;
    font-weight: 500;
    font-size: 1em;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 100%;
    padding-right: 0;
    gap: 0;
}
@media (max-width: 1366px) {
    .modal-indeling-medewerker-blok { font-size: 0.93em; height: 31px; }
    .modal-indeling-medewerker-naam { font-size: 0.93em; }
}
@media (max-width: 950px) {
    .modal-indeling-medewerker-blok { font-size: 0.89em; height: 27px; }
    .modal-indeling-medewerker-naam { font-size: 0.89em; }
}
@media (max-width: 800px) {
    .modal-indeling-medewerker-blok { font-size: 0.81em; height: 23px; }
    .modal-indeling-medewerker-naam { font-size: 0.81em; }
}
@media (max-width: 600px) {
    .modal-indeling-medewerker-blok { font-size: 0.74em; height: 18px; }
    .modal-indeling-medewerker-naam { font-size: 0.74em; }
}

/* STATUS EFFECTEN */
.modal-indeling-plus.actief,
.modal-indeling-plus:focus-visible {
    background: orange !important;
    color: #232323 !important;
    border-color: orange !important;
    outline: 2px solid orange !important;
    outline-offset: 1px;
}
.modal-indeling-medewerker-blok.modal-ingedeeld {
    background: #ffd394 !important;
    color: #3e3d3d !important;
    border-color: #ffbe44 !important;
    opacity: 1 !important;
}
.modal-indeling-medewerker-blok.modal-ingedeeld .modal-indeling-medewerker-naam {
    color: #4d2a0f !important;
}
.modal-ingedeeld {
    background: #384327 !important;
    color: #a7ffa7 !important;
    opacity: 0.87 !important;
    cursor: pointer !important;
}

.modal-indeling-medewerker-blok.modal-ingedeeld-elders {
    color: #a7ffa7 !important;
    border-color: #8fe19a !important;
    opacity: 1 !important;
}
.modal-indeling-medewerker-blok.modal-ingedeeld-elders .modal-indeling-medewerker-naam {
    color: #c0ffd0 !important;
}


/* Busy / Disabled */
.modal-indeling-busy {
    opacity: 0.39 !important;
    pointer-events: none;
}
.modal-indeling-medewerker-blok.modal-indeling-busy {
    cursor: wait !important;
    background: #999 !important;
}

/* LEEGMELDING (rechter lijst) */
.modal-indeling-leeg {
    color: #ddd;
    font-size: 0.99em;
    padding: 6px 0;
    text-align: center;
    letter-spacing: 0.01em;
}

/* MEDEWERKERLIJST CONTAINER */
.modal-indeling-medewerker-list {
    margin-top: 2px;
    min-height: 30px;
    font-size: 1em;
    flex: 1 1 auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    padding-bottom: 16px;
}
@media (max-width: 1366px) { .modal-indeling-medewerker-list { gap: 10px; padding-bottom: 13px; } }
@media (max-width: 950px) { .modal-indeling-medewerker-list { gap: 6px; padding-bottom: 9px; } }
@media (max-width: 800px) { .modal-indeling-medewerker-list { gap: 4px; padding-bottom: 6px; } }
@media (max-width: 600px) { .modal-indeling-medewerker-list { gap: 2px; padding-bottom: 3px; } }

/* === MOOIE SCROLLBAR === */
.modal-indeling-vakkenlijst::-webkit-scrollbar {
    width: 7px; background: #24211c;
}
.modal-indeling-vakkenlijst::-webkit-scrollbar-thumb {
    background: orange; border-radius: 5px;
}

/* Tijd-styling */
.starttijd-label {
    color: #bbb;
    background: none !important;
    font-size: 0.98em;
    font-weight: 700;
    margin-right: 14px;
    margin-left: 0;
    padding: 0;
    border-radius: 0;
    letter-spacing: 0.02em;
    display: inline-block;
    min-width: 0;
    text-align: left;
    vertical-align: middle;
}
@media (max-width: 800px) {
    .starttijd-label {
        font-size: 0.90em;
        margin-right: 8px;
    }
}

/* Skill badge icoon altijd RECHTS en met marge rechts */
.skill-icoon-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.80em;
    font-weight: 600;
    color: #fff;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-left: 0;
    margin-right: 14px;    /* ruimte rechts van het icoon */
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    letter-spacing: 0.01em;
    vertical-align: middle;
    transition: background 0.16s;
    border: none;
}
@media (max-width: 800px) {
    .skill-icoon-label {
        font-size: 0.74em;
        width: 14px;
        height: 14px;
        min-width: 14px;
        margin-right: 7px;
    }
}
