/**
 * Vansy LMS Frontend Styles
 */

:root {
    --vlms-primary: #ed8b33;
    --vlms-primary-dark: #c96d18;
    --vlms-success: #46b450;
    --vlms-error: #dc3232;
    --vlms-text: #1a1a1a;
    --vlms-gray: #666;
    --vlms-light-gray: #f5f5f5;
    --vlms-border: #ddd;
}

/* General */
.vlms-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.vlms-btn-primary {
    background: var(--vlms-primary);
    color: #fff;
}

.vlms-btn-primary:hover {
    background: var(--vlms-primary-dark);
    color: #fff;
}

.vlms-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.vlms-empty {
    text-align: center;
    padding: 40px;
    color: var(--vlms-gray);
}

/* Progress Bar */
.vlms-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--vlms-light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.vlms-progress-fill {
    height: 100%;
    background: var(--vlms-primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.vlms-progress-text {
    font-size: 14px;
    color: var(--vlms-gray);
    margin-top: 5px;
    display: block;
}

/* Login Required */
.vlms-login-required {
    text-align: center;
    padding: 60px 20px;
    background: var(--vlms-light-gray);
    border-radius: 8px;
    margin: 20px 0;
}

/* Access Denied */
.vlms-access-denied {
    text-align: center;
    padding: 40px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: var(--vlms-error);
}

/* Cursus Page */
.vlms-cursus {
    max-width: 900px;
    margin: 0 auto;
}

.vlms-cursus-header {
    margin-bottom: 30px;
}

.vlms-cursus-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.vlms-cursus-info {
    margin-top: 20px;
}

.vlms-cursus-progress {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.vlms-cursus-description {
    margin-bottom: 40px;
    line-height: 1.8;
}

.vlms-cursus-curriculum h2 {
    margin-bottom: 20px;
}

/* Curriculum */
.vlms-curriculum {
    background: #fff;
    border: 1px solid var(--vlms-border);
    border-radius: 8px;
    overflow: hidden;
}

.vlms-module {
    border-bottom: 1px solid var(--vlms-border);
}

.vlms-module:last-child {
    border-bottom: none;
}

.vlms-module-header {
    padding: 15px 20px;
    background: var(--vlms-light-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.vlms-module-header:hover {
    background: #eee;
}

.vlms-module-title {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vlms-module-icon {
    transition: transform 0.2s;
}

.vlms-module-collapsed .vlms-module-icon {
    transform: rotate(-90deg);
}

.vlms-module-count {
    font-weight: normal;
    color: var(--vlms-gray);
    font-size: 14px;
}

.vlms-module-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vlms-module-collapsed .vlms-module-items {
    display: none;
}

.vlms-curriculum-item {
    border-bottom: 1px solid var(--vlms-light-gray);
}

.vlms-curriculum-item:last-child {
    border-bottom: none;
}

.vlms-curriculum-item a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--vlms-text);
    transition: background 0.2s;
}

.vlms-curriculum-item a:hover {
    background: var(--vlms-light-gray);
}

.vlms-item-status {
    width: 30px;
    color: var(--vlms-gray);
}

.vlms-item-completed .vlms-item-status {
    color: var(--vlms-success);
}

.vlms-curriculum-item .vlms-item-title {
    flex: 1;
}

.vlms-item-type {
    font-size: 12px;
    color: var(--vlms-gray);
    background: var(--vlms-light-gray);
    padding: 2px 8px;
    border-radius: 3px;
}

/* Les Page */
.vlms-les {
    max-width: 900px;
    margin: 0 auto;
}

.vlms-les-nav {
    margin-bottom: 20px;
}

.vlms-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--vlms-gray);
    text-decoration: none;
}

.vlms-back-link:hover {
    color: var(--vlms-primary);
}

.vlms-les-video {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.vlms-les-content {
    line-height: 1.8;
    margin-bottom: 40px;
}

.vlms-les-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--vlms-light-gray);
    border-radius: 8px;
}

.vlms-les-completed {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vlms-success);
    font-weight: 600;
}

.vlms-navigation {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.vlms-nav-prev,
.vlms-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid var(--vlms-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--vlms-text);
    transition: all 0.2s;
}

.vlms-nav-prev:hover,
.vlms-nav-next:hover {
    background: var(--vlms-primary);
    border-color: var(--vlms-primary);
    color: #fff;
}

/* Quiz Page */
.vlms-quiz {
    max-width: 800px;
    margin: 0 auto;
}

.vlms-quiz-nav {
    margin-bottom: 20px;
}

.vlms-quiz-intro {
    margin-bottom: 30px;
    line-height: 1.8;
}

.vlms-quiz-info {
    background: var(--vlms-light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.vlms-quiz-info p {
    margin: 0;
}

.vlms-question {
    background: #fff;
    border: 1px solid var(--vlms-border);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.vlms-question-header {
    padding: 15px 20px;
    background: var(--vlms-light-gray);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.vlms-question-number {
    background: var(--vlms-primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.vlms-question-text {
    flex: 1;
    font-weight: 600;
}

.vlms-question-points {
    font-size: 12px;
    color: var(--vlms-gray);
}

.vlms-answers {
    padding: 15px 20px;
}

.vlms-answer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid var(--vlms-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.vlms-answer:hover {
    border-color: var(--vlms-primary);
    background: rgba(237, 139, 51, 0.05);
}

.vlms-answer input {
    margin-top: 3px;
}

.vlms-answer-label {
    font-weight: 600;
    color: var(--vlms-primary);
}

.vlms-answer-text {
    flex: 1;
}

.vlms-quiz-submit {
    text-align: center;
    margin-top: 30px;
}

/* Quiz Results */
.vlms-quiz-results {
    text-align: center;
}

.vlms-quiz-result {
    background: #fff;
    border: 2px solid var(--vlms-border);
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.vlms-quiz-passed {
    border-color: var(--vlms-success);
}

.vlms-quiz-failed {
    border-color: var(--vlms-error);
}

.vlms-quiz-result-header {
    margin-bottom: 30px;
}

.vlms-quiz-result-header .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
}

.vlms-quiz-passed .vlms-quiz-result-header .dashicons {
    color: var(--vlms-success);
}

.vlms-quiz-failed .vlms-quiz-result-header .dashicons {
    color: var(--vlms-error);
}

.vlms-quiz-result-header h3 {
    margin: 15px 0 5px;
    font-size: 24px;
}

.vlms-quiz-result-header p {
    color: var(--vlms-gray);
    margin: 0;
}

.vlms-quiz-result-score {
    margin-bottom: 30px;
}

.vlms-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--vlms-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.vlms-quiz-passed .vlms-score-circle {
    background: rgba(70, 180, 80, 0.1);
}

.vlms-quiz-failed .vlms-score-circle {
    background: rgba(220, 50, 50, 0.1);
}

.vlms-score-value {
    font-size: 32px;
    font-weight: 700;
}

.vlms-quiz-passed .vlms-score-value {
    color: var(--vlms-success);
}

.vlms-quiz-failed .vlms-score-value {
    color: var(--vlms-error);
}

.vlms-passing-score {
    color: var(--vlms-gray);
    font-size: 14px;
}

.vlms-quiz-result-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Kenisbank */
.vlms-kennisbank {
    max-width: 1000px;
    margin: 0 auto;
}

.vlms-kb-search {
    margin-bottom: 40px;
}

.vlms-kb-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.vlms-kb-search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--vlms-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.vlms-kb-search-input:focus {
    outline: none;
    border-color: var(--vlms-primary);
}

.vlms-kb-search-btn {
    padding: 15px 25px;
    background: var(--vlms-primary);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 16px;
}

.vlms-kb-search-btn:hover {
    background: var(--vlms-primary-dark);
}

.vlms-kb-search-results {
    margin-top: 20px;
}

.vlms-kb-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.vlms-kb-category {
    background: #fff;
    border: 1px solid var(--vlms-border);
    border-radius: 8px;
    padding: 25px;
}

.vlms-kb-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 18px;
}

.vlms-kb-category-title .dashicons {
    color: var(--vlms-primary);
}

.vlms-kb-count {
    font-weight: normal;
    color: var(--vlms-gray);
    font-size: 14px;
}

.vlms-kb-category-desc {
    color: var(--vlms-gray);
    margin-bottom: 15px;
}

.vlms-kb-articles {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vlms-kb-article {
    border-bottom: 1px solid var(--vlms-light-gray);
    padding: 10px 0;
}

.vlms-kb-article:last-child {
    border-bottom: none;
}

.vlms-kb-article a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vlms-text);
    text-decoration: none;
}

.vlms-kb-article a:hover {
    color: var(--vlms-primary);
}

.vlms-kb-article .dashicons {
    color: var(--vlms-gray);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Kennisbank Article */
.vlms-kb-article-content {
    line-height: 1.8;
    margin-bottom: 40px;
}

.vlms-kb-breadcrumb {
    margin-bottom: 30px;
}

.vlms-kb-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 14px;
}

.vlms-kb-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 5px;
    color: var(--vlms-gray);
}

.vlms-kb-breadcrumb a {
    color: var(--vlms-gray);
    text-decoration: none;
}

.vlms-kb-breadcrumb a:hover {
    color: var(--vlms-primary);
}

.vlms-kb-breadcrumb li[aria-current="page"] {
    color: var(--vlms-text);
}

.vlms-kb-related {
    background: var(--vlms-light-gray);
    padding: 25px;
    border-radius: 8px;
}

.vlms-kb-related h3 {
    margin-top: 0;
}

.vlms-kb-related ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vlms-kb-related li {
    padding: 8px 0;
}

.vlms-kb-related a {
    color: var(--vlms-text);
    text-decoration: none;
}

.vlms-kb-related a:hover {
    color: var(--vlms-primary);
}

/* Cursus Overzicht Cards */
.vlms-cursussen {
    display: grid;
    gap: 25px;
}

.vlms-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.vlms-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.vlms-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.vlms-cursus-card {
    background: #fff;
    border: 1px solid var(--vlms-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.vlms-cursus-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.vlms-cursus-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.vlms-cursus-card-content {
    padding: 20px;
}

.vlms-cursus-card-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.vlms-cursus-card-title a {
    color: var(--vlms-text);
    text-decoration: none;
}

.vlms-cursus-card-title a:hover {
    color: var(--vlms-primary);
}

.vlms-cursus-card-excerpt {
    color: var(--vlms-gray);
    font-size: 14px;
    margin-bottom: 15px;
}

/* Mijn Cursussen */
.vlms-mijn-cursussen {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vlms-mijn-cursus {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--vlms-border);
    border-radius: 8px;
}

.vlms-mijn-cursus-title {
    flex: 1;
    margin: 0;
}

.vlms-mijn-cursus-title a {
    color: var(--vlms-text);
    text-decoration: none;
}

.vlms-mijn-cursus-title a:hover {
    color: var(--vlms-primary);
}

.vlms-mijn-cursus-progress {
    width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vlms-mijn-cursus-progress .vlms-progress-bar {
    flex: 1;
}

/* Video Wrapper */
.vlms-video-wrapper {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .vlms-cols-2,
    .vlms-cols-3,
    .vlms-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .vlms-quiz-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .vlms-mijn-cursus {
        flex-direction: column;
        text-align: center;
    }
    
    .vlms-mijn-cursus-progress {
        width: 100%;
    }
    
    .vlms-les-actions {
        flex-direction: column;
        text-align: center;
    }
    
    .vlms-navigation {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Cursus hero banner — titel vlak
   ========================================================================== */

/* Headings op LMS-pagina's: oranje achtergrond + zwarte tekst */
.single-vlms_cursus h1,
.single-vlms_cursus h2,
.single-vlms_cursus h3,
.single-vlms_cursus h4,
.single-vlms_les h1,
.single-vlms_les h2,
.single-vlms_les h3,
.single-vlms_les h4,
.single-vlms_quiz h1,
.single-vlms_quiz h2,
.single-vlms_quiz h3,
.single-vlms_quiz h4 {
    background-color: #ed8b33 !important;
    color: #1a1a1a !important;
    padding: 8px 20px !important;
    border-radius: 5px !important;
}

/* Post-titel (de grote cursusnaam in de hero) iets dikker padding */
.single-vlms_cursus .wp-block-post-title {
    padding: 14px 28px !important;
    border-radius: 6px !important;
}

/* ==========================================================================
   Block-editor blokken — frontend weergave
   ========================================================================== */

/* Wrapper voor alle blokken */
.vlms-les-content > .vlms-block-tekst,
.vlms-les-content > .vlms-block-koptekst,
.vlms-les-content > .vlms-block-video,
.vlms-les-content > .vlms-block-afbeelding,
.vlms-les-content > .vlms-block-quiz {
    margin-bottom: 28px;
}

/* ── Tekst ── */
.vlms-block-tekst {
    font-size: 16px;
    line-height: 1.85;
    color: #2d2d2d;
}
.vlms-block-tekst p   { margin: 0 0 14px; }
.vlms-block-tekst p:last-child { margin-bottom: 0; }
.vlms-block-tekst ul,
.vlms-block-tekst ol  { padding-left: 24px; margin: 0 0 14px; }
.vlms-block-tekst li  { margin-bottom: 6px; }
.vlms-block-tekst a   { color: #ed8b33; text-decoration: underline; }

/* ── Koptekst ── */
.vlms-block-koptekst {
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.3;
}
h2.vlms-block-koptekst { font-size: 26px; }
h3.vlms-block-koptekst { font-size: 20px; }

/* ── Video (Vimeo) ── */
.vlms-block-video {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    max-width: 640px;
}
.vlms-block-video .vlms-video-wrapper {
    border-radius: 10px;
    overflow: hidden;
}
.vlms-block-video .vlms-video-wrapper iframe {
    border: none;
}

/* ── Afbeelding ── */
.vlms-block-afbeelding {
    margin: 0;
    text-align: center;
}
/* Wrapper voor afbeelding + zoom-knop */
.vlms-img-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.vlms-block-afbeelding img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
}
/* Zoom-knop rechtsonder op de afbeelding */
.vlms-zoom-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    padding: 0;
    pointer-events: all;
}
.vlms-img-wrap:hover .vlms-zoom-btn,
.vlms-img-wrap:focus-within .vlms-zoom-btn {
    opacity: 1;
}
.vlms-zoom-btn:hover { background: rgba(0, 0, 0, 0.85); }
.vlms-zoom-btn .dashicons { font-size: 18px; width: 18px; height: 18px; line-height: 1; }
/* Fallback tekst als dashicons niet laden */
.vlms-zoom-btn::after {
    content: '\2922';
    font-size: 18px;
    line-height: 1;
    display: none;
}

/* ── Lightbox overlay ── */
.vlms-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.vlms-lightbox.vlms-lightbox-open {
    opacity: 1;
    pointer-events: all;
}
.vlms-lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 110px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    display: block;
}
.vlms-lightbox-caption {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    max-width: 700px;
}
.vlms-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}
.vlms-lightbox-close:hover { background: rgba(255,255,255,.15); }
.vlms-lightbox-close .dashicons { font-size: 28px; width: 28px; height: 28px; }

.vlms-block-afbeelding figcaption {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}

/* ── Quiz blok ── */
.vlms-block-quiz {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff7ed;
    border: 2px solid #ed8b33;
    border-radius: 12px;
    padding: 22px 24px;
    flex-wrap: wrap;
}
.vlms-quiz-icon {
    font-size: 32px;
    flex-shrink: 0;
}
.vlms-quiz-info {
    flex: 1;
    min-width: 180px;
}
.vlms-quiz-info strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}
.vlms-quiz-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ── Les pagina layout fixen ── */
.vlms-les {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .vlms-les {
        padding: 0 12px;
    }

    h2.vlms-block-koptekst { font-size: 21px; }
    h3.vlms-block-koptekst { font-size: 17px; }

    .vlms-block-tekst { font-size: 15px; line-height: 1.75; }

    .vlms-block-video {
        border-radius: 6px;
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
    }

    .vlms-block-quiz {
        flex-direction: column;
        gap: 14px;
        padding: 18px 16px;
    }
    .vlms-quiz-info { min-width: unset; width: 100%; }
    .vlms-block-quiz .vlms-btn { width: 100%; text-align: center; }
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR TRAINING LAYOUT
   ════════════════════════════════════════════════════════════ */

/*
 * WordPress FSE / block-layout sets `display: block` on direct
 * children of `.is-layout-flow`, which overrides our flex.
 * Use !important to win that specificity battle.
 */
.vlms-training-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: 100%;
    position: relative;
    /* Cancel default block-gap margin added by WP layout */
    margin-block-start: 0 !important;
}

/* ── Sidebar (desktop: fixed on the left) ─────────────────── */
.vlms-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 300px;
    min-width: 300px;
    max-height: 100vh;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    box-sizing: border-box;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #e0d8cf transparent;
    order: -1;
}
.admin-bar .vlms-sidebar {
    top: 32px;
    max-height: calc(100vh - 32px);
}
.vlms-sidebar::-webkit-scrollbar { width: 4px; }
.vlms-sidebar::-webkit-scrollbar-thumb { background: #e0d8cf; border-radius: 2px; }

/* Sidebar header met cursus-naam en sluit-knop */
.vlms-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px;
    border-bottom: 1px solid #e8e8e8;
    background: #f9f6f2;
    position: sticky;
    top: 0;
    z-index: 2;
}
.vlms-sidebar-cursus-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.4;
    flex: 1;
    margin-right: 8px;
}
.vlms-sidebar-cursus-title:hover { color: #ed8b33; }

.vlms-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #888;
    border-radius: 4px;
    line-height: 1;
}
.vlms-sidebar-close:hover { color: #333; background: #ede8e1; }
.vlms-sidebar-close .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Voortgangsbalk */
.vlms-sidebar-progress {
    padding: 12px 14px;
    border-bottom: 1px solid #e8e8e8;
}
.vlms-sidebar-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}
.vlms-sidebar-progress-pct {
    font-weight: 700;
    color: #ed8b33;
}
.vlms-sidebar-progress-bar {
    height: 7px;
    background: #ede8e1;
    border-radius: 4px;
    overflow: hidden;
}
.vlms-sidebar-progress-fill {
    height: 100%;
    background: #ed8b33;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 0;
}

/* Module-labels en les-links */
.vlms-sidebar-nav { padding: 6px 0 24px; }
.vlms-sidebar-module { margin-bottom: 2px; }
.vlms-sidebar-module-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #aaa;
    padding: 10px 14px 4px;
}
.vlms-sidebar-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.vlms-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    text-decoration: none;
    color: #444;
    font-size: 13px;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}
.vlms-sidebar-item a:hover {
    background: #fef7ee;
    color: #ed8b33;
}
.vlms-sidebar-item-active > a {
    background: #fff3e3;
    color: #ed8b33;
    font-weight: 600;
    border-left-color: #ed8b33;
}
.vlms-sidebar-item-completed > a { color: #888; }
.vlms-sidebar-item-completed > a .dashicons { color: #4caf50; }
.vlms-sidebar-item-active.vlms-sidebar-item-completed > a { color: #ed8b33; font-weight: 600; }

.vlms-sidebar-item-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}
.vlms-sidebar-item-icon .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1.1;
}
.vlms-sidebar-item-title { flex: 1; min-width: 0; }

/* ── Hoofdinhoud rechts van sidebar ──────────────────────── */
.vlms-training-main {
    flex: 1;
    min-width: 0;
}

/* Les en quiz binnen de main */
.vlms-training-layout .vlms-les,
.vlms-training-layout .vlms-quiz {
    max-width: 100%;
    padding-left: 28px;
    padding-right: 16px;
    box-sizing: border-box;
}

/* Breed scherm: iets meer padding */
@media (min-width: 1100px) {
    .vlms-training-layout .vlms-les,
    .vlms-training-layout .vlms-quiz {
        padding-left: 40px;
        padding-right: 24px;
    }
}

/* Verberg les max-width override op training pagina's */
.vlms-training-layout .vlms-les { max-width: none; margin: 0; }
.vlms-training-layout .vlms-quiz { max-width: none; margin: 0; }

/* ── Drijvende toggle-knop (verborgen op desktop) ─────────── */
.vlms-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 1000;
    background: #ed8b33;
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 18px rgba(237,139,51,.45);
    transition: background .2s, box-shadow .2s;
}
.vlms-sidebar-toggle:hover {
    background: #d47a1e;
    box-shadow: 0 6px 22px rgba(237,139,51,.55);
}
.vlms-sidebar-toggle .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Overlay */
.vlms-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.42);
    z-index: 9998;
    display: none;
}
.vlms-sidebar-overlay.vlms-overlay-active { display: block; }

/* ── Responsive (≤ 820px): sidebar als slide-in overlay ───── */
@media (max-width: 820px) {
    .vlms-training-layout {
        display: block !important;
    }
    .vlms-training-main {
        padding: 0;
    }
    .vlms-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        max-height: none;
        width: 300px;
        max-width: 88vw;
        z-index: 9999;
        transform: translateX(-110%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        box-shadow: 4px 0 24px rgba(0,0,0,.18);
        border-right: none;
    }
    .admin-bar .vlms-sidebar { top: 46px; height: calc(100dvh - 46px); }
    .vlms-sidebar.vlms-sidebar-open { transform: translateX(0); }
    .vlms-sidebar-close { display: flex; align-items: center; justify-content: center; }
    .vlms-sidebar-toggle { display: flex; }
    .vlms-training-layout .vlms-les,
    .vlms-training-layout .vlms-quiz {
        padding-left: 0;
        padding-right: 0;
    }
}
