/* ========================================
   Lessons
======================================== */
.cce-lesson-list {

    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;

}

.cce-lesson-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 30px;

    padding: 25px;

    background: #fff;

    border: 2px solid #000;

    border-radius: 10px;

}

.cce-lesson-content {

    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;

}

.cce-lesson-content h3 {

    margin: 0 0 10px;

    font-size: 30px;

    color: #a81010;

    line-height: 1.2;

}

.cce-lesson-content p {

    margin: 0;

    font-size: 18px;

    line-height: 1.7;

    color: #000 !important;

    max-width: 700px;

}

.cce-lesson-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    background: #a81010;

    color: #fff !important;

    padding: 12px 20px;

    border-radius: 6px;

    text-decoration: none !important;

    white-space: nowrap;

    flex-shrink: 0;

    font-weight: 600;

}

.cce-lesson-button:hover {

    background: #7d0c0c;

}
/* ========================================
   Lesson navigation
======================================== */
.cce-lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
    flex-wrap: wrap;
}

.cce-nav-left,
.cce-nav-center,
.cce-nav-right {
    flex: 1;
}

.cce-nav-center {
    text-align: center;
}

.cce-nav-right {
    text-align: right;
}

.cce-nav-button {
    display: inline-block;
    box-sizing: border-box;
    padding: 12px 22px;
    background: #000;
    color: #fff;
    border: 2px solid #a81010;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.cce-nav-button:hover {
    background: #a81010;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 768px) {

    .cce-lesson-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cce-lesson-button {
        align-self: flex-start;
    }

    .cce-lesson-navigation {
        flex-direction: column;
        align-items: stretch;
    }

    .cce-nav-left,
    .cce-nav-center,
    .cce-nav-right {
        text-align: center;
    }

    .cce-nav-button {
        width: 100%;
    }
}

/* Shared native lesson player layout; editable content retains its own design. */
.cce-player-layout { display: flex; min-height: 100vh; font-family: var(--cce-body-font); }
.cce-player-layout > .cce-player-sidebar { box-sizing: border-box; flex: 0 0 260px; color: var(--cce-sidebar-link, var(--cce-white)); }
.cce-player-sidebar .cce-player-title { padding-bottom: 15px; border-bottom: 2px solid var(--cce-classroom-divider, var(--cce-red)); }
.cce-player-sidebar .cce-module-title { color: inherit; font-size: 20px; margin-bottom: 15px; }
.cce-player-content { flex: 1; min-width: 0; }
.cce-classroom-document { min-width: 0; }
/* Reuse one sidebar/list across classroom viewports; legacy shortcodes stay intact. */
.cce-player-layout > .cce-player-sidebar { display: block; min-width: 0; }
.cce-player-sidebar .cce-player-title,
.cce-player-sidebar .cce-module-title,
.cce-player-sidebar a { overflow-wrap: anywhere; }
.cce-player-layout .cce-classroom-toggle { display: none; }
.cce-player-layout .cce-player-sidebar ul[hidden] { display: none; }
@media (min-width: 768px) and (max-width: 1023px) {
    .cce-player-layout > .cce-player-sidebar { flex-basis: 220px; width: 220px; }
}
@media (max-width: 767px) {
    .cce-player-layout { flex-direction: column; }
    .cce-player-layout > .cce-player-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        flex: none;
        width: 100%;
        padding: 16px 20px;
        border-bottom: 2px solid var(--cce-classroom-divider, var(--cce-red));
    }
    .cce-player-sidebar .cce-player-title {
        grid-column: 1; grid-row: 1;
        font-size: 22px; margin: 0; padding: 0; border: 0;
    }
    .cce-player-sidebar .cce-module-group { display: contents; }
    .cce-player-sidebar .cce-module-title {
        grid-column: 1; grid-row: 2;
        font-size: 16px; margin: 0;
    }
    .cce-player-layout .cce-classroom-toggle {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        grid-column: 2; grid-row: 1 / 3; align-self: center;
        width: auto; min-height: 44px; padding: 10px 12px;
        font: inherit; font-weight: 600; cursor: pointer;
        background: transparent; color: inherit;
        border-color: var(--cce-classroom-divider, var(--cce-red));
    }
    .cce-classroom-toggle:focus-visible {
        outline: 2px solid currentColor; outline-offset: 3px;
    }
    .cce-player-sidebar .cce-module-group > ul {
        grid-column: 1 / -1; margin-top: 8px; padding-top: 12px;
        border-top: 1px solid var(--cce-classroom-divider, var(--cce-red));
    }
    .cce-player-content { width: 100%; }
    .cce-player-layout .cce-lesson-navigation { flex-direction: column; align-items: stretch; }
    .cce-player-layout .cce-nav-button:not(.cce-classroom-toggle) { width: 100%; }
}
