/* ==========================================================
   Brainy Projectbeheer - Cassiopeia_extended
   Header, navigatie, actieoverzichten en mobiele weergave
   ========================================================== */

/* 1. Header en logo --------------------------------------- */
.container-header {
    background: #F4F5F7;
    background-image: none;
    border-bottom: 1px solid #e4e9ef;
    box-shadow: 0 2px 12px rgba(0, 35, 80, 0.06);
}

.container-header .navbar-brand img {
    width: auto;
    max-width: 280px;
    max-height: 75px;
    object-fit: contain;
}

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
    color: #092f6e;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.container-header .mod-menu > li > a:hover {
    color: #35a916;
}

.container-header .mod-menu > li.active > a {
    color: #092f6e;
    font-weight: 700;
}

/* 2. Actietabellen ---------------------------------------- */
table[data-brainy-sortable="1"] {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

table[data-brainy-sortable="1"] thead th {
    background: #edf3f9;
    color: #092f6e;
    font-weight: 600;
    white-space: nowrap;
}

table[data-brainy-sortable="1"] th,
table[data-brainy-sortable="1"] td {
    padding: 12px 14px;
    vertical-align: middle;
    border-color: #e2e8f0;
}

table[data-brainy-sortable="1"] tbody tr:hover > * {
    background: #f0f6fc;
}

/* 3. Statuskleuren ---------------------------------------- */
table[data-brainy-sortable="1"] td[data-brainy-cell="status"] {
    font-weight: 600;
    border-left: 4px solid transparent;
}

/* Nieuw */
td[data-brainy-cell="status"][data-sort-value="Nieuw"] {
    background-color: #E8F2FF;
    color: #14518A;
    border-left-color: #3085D6;
}

/* In uitvoering */
td[data-brainy-cell="status"][data-sort-value="In uitvoering"] {
    background-color: #E8F7ED;
    color: #176B38;
    border-left-color: #28A745;
}

/* Wachten op klant */
td[data-brainy-cell="status"][data-sort-value="Wachten op klant"] {
    background-color: #FFF3DF;
    color: #875400;
    border-left-color: #F0A020;
}

/* Wachten op bestuur */
td[data-brainy-cell="status"][data-sort-value="Wachten op bestuur"] {
    background-color: #F3EBFA;
    color: #68348A;
    border-left-color: #9060BA;
}

/* Geparkeerd */
td[data-brainy-cell="status"][data-sort-value="Geparkeerd"] {
    background-color: #F0F2F4;
    color: #475569;
    border-left-color: #94A3B8;
}

/* Afgerond */
td[data-brainy-cell="status"][data-sort-value="Afgerond"] {
    background-color: #E0F3E7;
    color: #176B38;
    border-left-color: #18834A;
}

/* 4. Desktop: vaste linkerzijbalk ------------------------- */
@media (min-width: 992px) {
    .container-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 30px;
        padding: 12px 30px 12px 0;
    }

    .container-header > .grid-child {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .container-header .navbar-brand img {
        max-height: 65px;
    }

    /* De aparte menumodule in de header is uitsluitend mobiel. */
    .container-header .container-nav {
        display: none !important;
    }

    body.has-sidebar-left .site-grid {
        width: 100%;
        max-width: none;
        margin: 0;
        column-gap: 0;
        grid-template-columns:
            [full-start] 0
            [main-start] 220px
            repeat(3, minmax(0, 1fr))
            [main-end] 0
            [full-end];
    }

    .container-sidebar-left {
        background: #EDF3F7;
        border-right: 1px solid #DCE5ED;
        border-radius: 0;
        padding: 18px 12px;
        min-height: calc(100vh - 110px);
    }

    .container-sidebar-left .card {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .container-sidebar-left .mod-menu {
        padding: 0;
    }

    .container-header .container-brand {
        margin-left: 0;
        padding-left: 0;
    }

    .site-grid .container-component {
        padding-left: 28px;
        padding-right: 28px;
        min-width: 0;
    }

    .container-sidebar-left .mod-menu a {
        display: block;
        padding: 10px 14px;
        color: #173B63;
        text-decoration: none;
        border-radius: 6px;
        transition: background 0.2s, color 0.2s;
    }

    .container-sidebar-left .mod-menu a:hover {
        background: #DDEAF3;
        color: #0066B3;
    }

    .container-sidebar-left .mod-menu li.current > a,
    .container-sidebar-left .mod-menu li.active > a {
        background: #D6E9F5;
        color: #0059A3;
        font-weight: 600;
        border-left: 3px solid #0066B3;
    }

    .container-sidebar-left .mod-menu .mod-menu__sub a {
        padding-left: 24px;
        font-size: 0.9rem;
    }
}

/* 5. Mobiel: logo, hamburger en uitschuivend menu --------- */
@media (max-width: 991px) {
    .container-sidebar-left {
        display: none !important;
    }

    .container-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 12px 18px;
        position: relative;
    }

    .container-header .navbar-brand img {
        width: auto;
        max-width: min(190px, calc(100vw - 110px));
        max-height: 52px;
    }

    .container-header .container-brand {
        order: 0;
        flex: 0 1 auto;
        min-width: 0;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .container-header .container-nav {
        order: 1;
        flex: 0 0 auto;
        width: auto;
        margin: 0 0 0 auto;
        padding: 0;
        justify-content: flex-end;
        position: static !important;
    }

    .container-header .container-nav .navbar {
        position: static !important;
    }

    .container-header .navbar-toggler {
        color: #092F6E;
        border: 1px solid #092F6E;
        background: transparent;
        border-radius: 6px;
    }

    .container-header .navbar-toggler:hover {
        background: #EDF3F7;
    }

    .container-header .mod-menu .mm-toggler {
        margin-left: 12px;
    }

    /* Wordt door /js/user.js aan het mobiele menu toegevoegd. */
    .container-header .navbar-collapse.brainy-mobile-panel {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: min(320px, 88vw) !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        display: block !important;
        visibility: hidden;
        transform: translateX(105%);
        transition: transform 0.3s ease, visibility 0.3s;
        padding: 75px 20px 25px;
        box-sizing: border-box;
        overflow-y: auto;
        background: #ffffff;
        border: none;
        border-radius: 0;
        box-shadow: -5px 0 30px rgba(0, 35, 80, 0.15);
        z-index: 1102;
    }

    .container-header .navbar-collapse.brainy-open {
        visibility: visible;
        transform: translateX(0);
    }

    body.brainy-menu-open {
        overflow: hidden;
    }

    body.brainy-menu-open .container-header {
        position: relative;
        z-index: 1101;
    }

    .brainy-mobile-close {
        position: absolute;
        top: 18px;
        right: 22px;
        border: 0;
        background: transparent;
        color: #092F6E;
        font-size: 32px;
        cursor: pointer;
    }

    .container-header .brainy-mobile-panel .mod-menu {
        width: 100%;
    }

    .container-header .brainy-mobile-panel .mod-menu > li {
        margin-bottom: 8px;
    }

    /* Breed houden; horizontaal vegen in plaats van smalle cellen. */
    .brainy-table-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .brainy-table-scroll table {
        min-width: 950px;
    }
}

/* 6. Donkere overlay achter het mobiele menu -------------- */
.brainy-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 55, 0.45);
    z-index: 1100;
}

.brainy-mobile-backdrop[hidden] {
    display: none !important;
}
/* Brainy - Submenu pijltje rechts uitlijnen */

@media (min-width: 992px) {

    .container-sidebar-left .mod-menu > li.deeper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .container-sidebar-left .mod-menu > li.deeper > a {
        grid-column: 1;
        min-width: 0;
    }

    .container-sidebar-left .mod-menu > li.deeper > button {
        grid-column: 2;
        margin-left: 4px;
        color: #092F6E;
    }

    .container-sidebar-left .mod-menu > li.deeper > ul {
        grid-column: 1 / -1;
    }
}
/* Brainy - Header gradient */

.container-header {
    background: linear-gradient(
        115deg,
        #F4F5F7 0%,
        #E8F1F8 55%,
        #D5E5F2 100%
    );
    border-bottom: 1px solid #D2DFEA;
    box-shadow: 0 3px 14px rgba(0, 35, 80, 0.08);
}
/* Kolomtitel Actie bewerken normaal weergeven */
table[data-brainy-sortable="1"] th#categorylist_header_edit {
    font-weight: 400;
}
/* Brainy - Tabelkop Alle acties */

#brainy-all-actions thead th {
    background-color: #EDF3F9;
    color: #092F6E;
}

/* Kolomtitel Actiepunt bewerken */
#brainy-all-actions thead th:last-child {
    font-weight: 400;
}
/* BRAINY - Klantoverzicht corrigeren */

/* Status: witte lijn verwijderen en tekst gelijkmaken */
table.com-content-category__table[data-brainy-sortable="1"]
td[data-brainy-cell="status"] {
    border-left: 1px solid #e2e8f0 !important;
    font-weight: 400;
}

/* Kolombreedtes desktop */
@media (min-width: 992px) {

    table.com-content-category__table[data-brainy-sortable="1"] {
        width: 100%;
        table-layout: fixed;
    }

    /* Onderwerp */
    table.com-content-category__table th:nth-child(1) {
        width: 30%;
    }

    /* Werkgebied */
    table.com-content-category__table th:nth-child(2) {
        width: 16%;
    }

    /* Status */
    table.com-content-category__table th:nth-child(3) {
        width: 12%;
    }

    /* Actie bij */
    table.com-content-category__table th:nth-child(4) {
        width: 9%;
    }

    /* Actiehouder */
    table.com-content-category__table th:nth-child(5) {
        width: 9%;
    }

    /* Opvolgdatum */
    table.com-content-category__table th:nth-child(6) {
        width: 11%;
    }

    /* Actiepunt bewerken */
    table.com-content-category__table th:nth-child(7) {
        width: 13%;
    }
}
/* Brainy - Uitloggen scheiden van navigatie */

.container-sidebar-left .mod-menu > li:last-child,
.brainy-mobile-panel .mod-menu > li:last-child {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid #CBD5E1;
}

/* Brainy - Duidelijke veldtitels bij Klantinformatie (veldgroep 3) */
#fieldset-fields-3 .control-group {
    display: flex;
    flex-direction: column;
    margin: 0 0 28px;
}
#fieldset-fields-3 .control-label {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
#fieldset-fields-3 .control-label label {
    display: block;
    margin: 0;
    padding: 10px 16px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
    color: #173B63;
    background: #EDF3F7;
    border: 1px solid #DCE5ED;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
}
#fieldset-fields-3 .controls {
    width: 100%;
    margin: 0;
}
#fieldset-fields-3 .js-editor-tinymce {
    display: flow-root;
}
#fieldset-fields-3 .tox-tinymce {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}


/* Brainy - Compacte knoppen in het werkgebied */
.container-component .btn {
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 0.375rem 0.75rem;
}

/* Artikelbewerking: originele Joomla-acties bovenaan, zichtbaar tijdens scrollen. */
.edit.item-page #adminForm {
    display: flex;
    flex-direction: column;
}
.edit.item-page #adminForm > .d-grid:has(> button[data-submit-task]) {
    order: -1;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px !important;
    position: sticky;
    top: 108px;
    z-index: 30;
    margin: 0 0 16px !important;
    padding: 10px 12px;
    background: #F4F7FA;
    border: 1px solid #DCE5ED;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,35,80,0.08);
}
.edit.item-page #adminForm > fieldset {
    min-width: 0;
}

@media (max-width: 991px) {
    .edit.item-page #adminForm > .d-grid:has(> button[data-submit-task]) {
        top: 8px;
    }
}


/* Brainy - Alle klanten: aantallen in een vaste kolom rechts van de knoppen. */
body.itemid-128 .com-content-categories__item-title {
    display: grid;
    grid-template-columns: minmax(0, 15rem) max-content;
    column-gap: 0.75rem;
    align-items: center;
}
body.itemid-128 .com-content-categories__item-title > a {
    min-width: 0;
    overflow-wrap: anywhere;
}
body.itemid-128 .com-content-categories__item-title > .badge {
    justify-self: start;
}


/* Brainy - Gelijke dashboardknoppen (29 november 2026). */
.brainy-dashboard .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 15rem;
    max-width: 100%;
    min-height: 2.75rem;
    flex: 0 0 auto;
    text-align: center;
    white-space: normal;
}
.brainy-dashboard .card-body {
    display: flex;
    flex-direction: column;
}
.brainy-dashboard .card-body > .btn {
    align-self: flex-start;
    margin-top: auto;
}
@media (max-width: 575.98px) {
    .brainy-dashboard .btn {
        width: 100%;
    }
    .brainy-dashboard .d-flex {
        width: 100%;
    }
}

/* Brainy - Alle acties: vier gelijke knoppen op dezelfde rij. */
.brainy-action-toolbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 13rem;
    max-width: 100%;
    min-height: 2.75rem;
    text-align: center;
    white-space: normal;
}
@media (max-width: 575.98px) {
    .brainy-action-toolbar .btn {
        width: 100%;
    }
}

/* Brainy: collapsible dark navigation, 2 December 2026. */
body.brainy-shell { --brainy-nav-width: 232px; --brainy-nav-bg:#182b49; }
.brainy-nav-icon { width:20px; height:20px; flex:0 0 20px; display:inline-block; }
.brainy-nav-label { min-width:0; }
.brainy-desktop-toggle { display:none; }
.brainy-sidebar-brand { display:none; }
@media (min-width:992px) {
 body.brainy-shell.brainy-nav-collapsed { --brainy-nav-width:76px; }
 body.brainy-shell .container-header { margin-left:var(--brainy-nav-width); width:calc(100% - var(--brainy-nav-width)); min-height:64px; padding:10px 28px; gap:14px; z-index:40; }
 body.brainy-shell .container-header > .grid-child:not(.container-nav) { display:none; }
 body.brainy-shell .brainy-desktop-toggle { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; flex:0 0 42px; padding:0; border:1px solid #d5dfea; border-radius:7px; color:#173b63; background:#fff; cursor:pointer; }
 body.brainy-shell .brainy-desktop-toggle:hover { background:#e8eff7; }
 body.brainy-shell .brainy-desktop-toggle:focus-visible { outline:3px solid #2678bc; outline-offset:3px; }
 body.brainy-shell.has-sidebar-left .site-grid { display:block; width:calc(100% - var(--brainy-nav-width)); margin:0 0 0 var(--brainy-nav-width); }
 body.brainy-shell .container-sidebar-left { position:fixed; inset:0 auto 0 0; width:var(--brainy-nav-width); height:100vh; height:100dvh; min-height:0; padding:0 10px 20px; overflow-y:auto; overflow-x:hidden; background:var(--brainy-nav-bg); border:0; z-index:45; }
 body.brainy-shell .container-sidebar-left .card-body { padding:0; }
 body.brainy-shell .brainy-sidebar-brand { display:flex; flex-direction:column; justify-content:center; min-height:84px; padding:12px 15px; margin:0 -10px 16px; border-bottom:1px solid #ffffff20; color:#fff; text-decoration:none; white-space:nowrap; }
 .brainy-brand-name { font-size:26px; font-weight:750; letter-spacing:.02em; }
 .brainy-brand-detail { font-size:12px; color:#bdcce1; }
 body.brainy-shell .container-sidebar-left .mod-menu { display:flex; flex-direction:column; gap:5px; width:100%; }
 body.brainy-shell .container-sidebar-left .mod-menu > li { width:100%; }
 body.brainy-shell .container-sidebar-left .mod-menu a { display:flex; align-items:center; gap:12px; min-height:46px; padding:11px 14px; color:#d5e0ef; border:0; border-radius:7px; font-size:14px; line-height:1.4; font-weight:500; white-space:nowrap; }
 body.brainy-shell .container-sidebar-left .mod-menu a:hover { background:#263e60; color:#fff; }
 body.brainy-shell .container-sidebar-left .mod-menu li.active > a,
 body.brainy-shell .container-sidebar-left .mod-menu li.current > a { background:#314c70; color:#fff; border:0; box-shadow:inset 3px 0 #75b9ed; font-weight:650; }
 body.brainy-shell .container-sidebar-left .mod-menu a:focus-visible { outline:2px solid #a7d7ff; outline-offset:-2px; }
 body.brainy-shell .container-sidebar-left .mod-menu > li:last-child { border-color:#ffffff26; margin-top:24px; }
 body.brainy-shell .container-component { width:100%; max-width:none; padding:24px 28px; }
 body.brainy-shell.brainy-nav-collapsed .brainy-sidebar-brand { align-items:center; padding-inline:0; }
 body.brainy-shell.brainy-nav-collapsed .brainy-brand-name { font-size:0; }
 body.brainy-shell.brainy-nav-collapsed .brainy-brand-name::before { content:"B"; font-size:28px; }
 body.brainy-shell.brainy-nav-collapsed .brainy-brand-detail,
 body.brainy-shell.brainy-nav-collapsed .brainy-nav-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
 body.brainy-shell.brainy-nav-collapsed .container-sidebar-left .mod-menu a { justify-content:center; padding-inline:0; gap:0; }
 body.brainy-shell .edit.item-page #adminForm > .d-grid:has(> button[data-submit-task]) { top:76px; }
}
@media (max-width:991px) {
 body.brainy-shell .container-header .navbar-collapse.brainy-mobile-panel { background:var(--brainy-nav-bg); color:#d5e0ef; }
 body.brainy-shell .brainy-mobile-close { color:#fff; width:44px; height:44px; top:12px; right:14px; }
 body.brainy-shell .brainy-mobile-panel .mod-menu { display:flex; flex-direction:column; gap:5px; }
 body.brainy-shell .container-header .brainy-mobile-panel .mod-menu > li { width:100%; margin:0; }
 body.brainy-shell .container-header .brainy-mobile-panel .mod-menu a { display:flex; align-items:center; gap:12px; width:100%; min-height:48px; padding:12px; border-radius:7px; color:#d5e0ef; font-size:15px; text-decoration:none; }
 body.brainy-shell .container-header .brainy-mobile-panel .mod-menu li.active > a { background:#314c70; color:#fff; box-shadow:inset 3px 0 #75b9ed; }
 body.brainy-shell .container-header .brainy-mobile-panel .mod-menu a:hover { background:#263e60; color:#fff; }
 body.brainy-shell .brainy-mobile-panel .mod-menu > li:last-child { margin-top:24px; padding-top:14px; border-top:1px solid #ffffff26; }
 body.brainy-shell .brainy-mobile-panel a:focus-visible, body.brainy-shell .brainy-mobile-close:focus-visible { outline:2px solid #a7d7ff; outline-offset:2px; }
}
@media (prefers-reduced-motion:reduce) {
 body.brainy-shell .brainy-mobile-panel { transition:none !important; }
}

/* Brainy: retain the original logo in the desktop sidebar. */
@media (min-width:992px) {
 body.brainy-shell .brainy-sidebar-brand { padding:12px 10px; align-items:center; }
 .brainy-sidebar-logo-frame { display:block; width:212px; max-width:100%; overflow:hidden; background:#f4f5f7; border-radius:6px; padding:6px; box-sizing:border-box; }
 .brainy-sidebar-logo { display:block; width:200px; max-width:none; height:60px; object-fit:contain; }
 body.brainy-shell.brainy-nav-collapsed .brainy-sidebar-logo-frame { width:56px; padding:6px; }
}

@media (min-width:992px) { body.brainy-shell.brainy-nav-collapsed .brainy-sidebar-logo { width:150px; } }
