/* =============================================================================
   Lesson Learning Page – Full Stylesheet
   flatsome-child/assets/css/lesson-learning.css

   Color palette (direct values – no CSS variables):
     Primary blue   : #2563EB
     Primary dark   : #1D4ED8
     Primary light  : #EFF6FF
     Success green  : #16A34A
     Success bg     : #F0FDF4
     Error red      : #DC2626
     Topbar bg      : #1E293B
     Card bg        : #FFFFFF
     Page bg        : #F8FAFC
     Border         : #E2E8F0
     Text primary   : #0F172A
     Text secondary : #475569
     Text muted     : #94A3B8

   Naming convention: tutor-custom-video-*
   ============================================================================= */

/* ── Reset scoped to lesson page ─────────────────────────────────────────────── */
.tutor-custom-video-page *,
.tutor-custom-video-page *::before,
.tutor-custom-video-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Hide Flatsome header/footer on lesson pages ──────────────────────────────── */
body.single-tutor_lesson .site-header,
body.single-tutor_lesson #top-bar,
body.single-tutor_lesson .header-wrapper,
body.single-tutor_lesson .site-footer,
body.single-tutor_lesson footer {
    display: none !important;
}

body.single-tutor_lesson #wrapper {
    padding-top: 0 !important;
}

body.single-tutor_lesson #main {
    padding: 0 !important;
    margin: 0 !important;
    background: #F8FAFC !important;
    max-width: none !important;
    width: 100% !important;
}

body.single-tutor_lesson .container,
body.single-tutor_lesson .row {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Page wrapper ──────────────────────────────────────────────────────────────── */
.tutor-custom-video-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #F8FAFC;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: #0F172A;
    line-height: 1.6;
}

/* ── Mobile backdrop overlay ──────────────────────────────────────────────────── */
.tutor-custom-video-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
}

.tutor-custom-video-overlay.is-visible {
    display: block;
}

/* ── Two-column layout ─────────────────────────────────────────────────────────── */
.tutor-custom-video-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    height: 100vh;
}

/* ── Main content (left column) ────────────────────────────────────────────────── */
.tutor-custom-video-main {
    flex: 1;
    min-width: 0;
    padding: 28px 20px 48px 0;
}

/* ── VIDEO PLAYER SECTION ──────────────────────────────────────────────────────── */
.tutor-custom-video-player-section {
    margin-bottom: 24px;
}

.tutor-custom-video-player-wrapper {
    position: relative;
    width: 100%;
    border: 4px solid #0F172A;
    border-radius: 16px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* Force 16:9 aspect ratio for all Tutor LMS video embed types */
.tutor-custom-video-player-wrapper iframe,
.tutor-custom-video-player-wrapper video,
.tutor-custom-video-player-wrapper .plyr,
.tutor-custom-video-player-wrapper .tutor-video-player,
.tutor-custom-video-player-wrapper .mejs-container {
    display: block;
    width: 100% !important;
    border-radius: 12px;
}

.tutor-custom-video-player-wrapper .plyr--video {
    border-radius: 12px;
}

/* Placeholder when no video */
.tutor-custom-video-player-placeholder {
    border: 4px solid #0F172A;
    border-radius: 16px;
    overflow: hidden;
    background: #0F172A;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutor-custom-video-player-placeholder img.tutor-custom-video-player-thumbnail {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 480px;
}

.tutor-custom-video-player-no-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px;
    color: #475569;
    text-align: center;
}

.tutor-custom-video-player-no-video svg {
    color: #334155;
}

/* ── NOTES SECTION ─────────────────────────────────────────────────────────────── */
.tutor-custom-video-note-section {
    margin-bottom: 24px;
}

.tutor-custom-video-note-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tutor-custom-video-note-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 12px;
}

.tutor-custom-video-note-card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0F172A;
}

.tutor-custom-video-note-card-title-group svg {
    color: #2563EB;
    flex-shrink: 0;
}

.tutor-custom-video-note-card-title {
    font-weight: 700;
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.01em;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tutor-custom-video-note-button-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px;
    flex-shrink: 0;
}

/* Edit button – gradient text + gradient border */
.tutor-custom-video-note-edit-button {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    padding: 8px 22px;
    position: relative;
    border: none;
    border-radius: 40px;
    text-transform: none;
    text-align: center;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Gradient border via mask — CSS cannot apply gradient directly to border-color */
.tutor-custom-video-note-edit-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1.5px solid transparent;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* Save button (primary solid) – hidden in view mode */
.tutor-custom-video-note-save-button {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 45px;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
    color: #FFFFFF;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.tutor-custom-video-note-save-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner inside save button (hidden until saving) */
.tutor-custom-video-note-save-spinner {
    display: none;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: tutor-custom-video-spin 0.7s linear infinite;
}

/* View area */
.tutor-custom-video-note-view-area {
    padding: 16px;
}

.tutor-custom-video-note-view-content {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
}

.tutor-custom-video-note-empty-message {
    font-size: 14px;
    color: rgba(96, 96, 96, 0.35);
    min-height: 164px;
    font-weight: 400;
    border-radius: 8px;
    padding: 12px;
    background-color: #EFEFEF;
}

/* Edit area (hidden by default, shown in .is-editing mode) */
.tutor-custom-video-note-edit-area {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 20px 24px;
}

.tutor-custom-video-note-hint-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.tutor-custom-video-note-hint-list li {
    font-size: 13px;
    color: #94A3B8;
    line-height: 1.7;
}

.tutor-custom-video-note-textarea {
    width: 100%;
    min-height: 140px;
    padding: 14px 16px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 14px;
    color: #0F172A;
    line-height: 1.7;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.tutor-custom-video-note-textarea:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tutor-custom-video-note-char-count {
    font-size: 12px;
    color: #94A3B8;
    text-align: right;
}

/* Status message */
.tutor-custom-video-note-status-message {
    font-size: 13px;
    padding: 0 24px 14px;
    min-height: 0;
    transition: all 0.2s ease;
}

.tutor-custom-video-note-status-message.is-saving {
    color: #475569;
}

.tutor-custom-video-note-status-message.is-success {
    color: #16A34A;
}

.tutor-custom-video-note-status-message.is-error {
    color: #DC2626;
}

/* ── Editing state: toggle via parent class ──────────────────────────────────── */
.tutor-custom-video-note-section.is-editing .tutor-custom-video-note-view-area {
    display: none;
}

.tutor-custom-video-note-section.is-editing .tutor-custom-video-note-edit-area {
    display: flex;
}

.tutor-custom-video-note-section.is-editing .tutor-custom-video-note-edit-button {
    display: none;
}

.tutor-custom-video-note-section.is-editing .tutor-custom-video-note-save-button {
    display: inline-flex;
}

/* ── Saving spinner state ────────────────────────────────────────────────────── */
.tutor-custom-video-note-save-button.is-saving .tutor-custom-video-note-save-label {
    display: none;
}

.tutor-custom-video-note-save-button.is-saving .tutor-custom-video-note-save-spinner {
    display: inline-block;
}

/* ── LESSON BODY (content + tabs) ──────────────────────────────────────────────── */

.tutor-custom-video-lesson-content-inner {
    background-color: #EFEFEF;
    border-radius: 12px;
    padding: 16px;
    color: #000000;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
}

.tutor-custom-video-lesson-content {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    padding: 16px;
}

.tutor-custom-video-lesson-body-header {
    padding: 22px 28px 0;
}

.tutor-custom-video-lesson-title {
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

/* Lesson post content */
.tutor-custom-video-lesson-content-inner {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: #334155;
    padding: 20px 28px 28px;
}

.tutor-custom-video-lesson-content-inner h1,
.tutor-custom-video-lesson-content-inner h2,
.tutor-custom-video-lesson-content-inner h3,
.tutor-custom-video-lesson-content-inner h4 {
    color: #0F172A;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}

.tutor-custom-video-lesson-content-inner p {
    margin-bottom: 16px;
}

.tutor-custom-video-lesson-content-inner ul,
.tutor-custom-video-lesson-content-inner ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.tutor-custom-video-lesson-content-inner li {
    margin-bottom: 6px;
}

.tutor-custom-video-lesson-content-inner a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tutor-custom-video-lesson-content-inner a:hover {
    color: #1D4ED8;
}

.tutor-custom-video-lesson-content-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Tab navigation */
.tutor-custom-video-lesson-tabs {
    display: flex;
    gap: 0;
    padding: 0 28px;
    border-bottom: 1px solid #E2E8F0;
    margin-top: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tutor-custom-video-lesson-tabs::-webkit-scrollbar {
    display: none;
}

.tutor-custom-video-lesson-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tutor-custom-video-lesson-tab-link:hover {
    color: #2563EB;
    text-decoration: none;
}

.tutor-custom-video-lesson-tab-link.is-active {
    color: #2563EB;
    border-bottom-color: #2563EB;
    font-weight: 600;
}

/* Tab panels – Tutor LMS manages the is-active class */
.tutor-custom-video-lesson-tab-panels {
    padding: 16px;
}

/* Tutor LMS tab panel system */
.tutor-custom-video-lesson-tab-panels .tutor-tab-item {
    display: none;
}

.tutor-custom-video-lesson-tab-panels .tutor-tab-item.is-active {
    display: block;
}

/* Override Tutor's default content container spacing */
.tutor-custom-video-lesson-tab-panels .tutor-container {
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.tutor-custom-video-lesson-tab-panels .tutor-row {
    margin: 0 !important;
}

.tutor-custom-video-lesson-tab-panels .tutor-col-xl-8 {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
}

/* Lesson text content styling */
.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #334155;
    padding: 16px;
    background-color: #EFEFEF;
    border-radius: 12px;
}

.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper h1,
.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper h2,
.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper h3,
.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper h4 {
    color: #0F172A;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 24px;
}

.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper p {
    margin-bottom: 16px;
}

.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper ul,
.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper li {
    margin-bottom: 8px;
}

.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.tutor-custom-video-lesson-tab-panels .tutor-lesson-wrapper a:hover {
    color: #1D4ED8;
}

/* Attachments */
.tutor-custom-video-lesson-tab-panels .tutor-attachments-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tutor-custom-video-lesson-tab-panels .tutor-attachments-list li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2563EB;
    text-decoration: none;
    padding: 8px 16px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.tutor-custom-video-lesson-tab-panels .tutor-attachments-list li a:hover {
    background: #DBEAFE;
}

/* Force-show tab-item panels (we pass is_active=true, no tab UI) */
.tutor-custom-video-lesson-body .tutor-tab-item {
    display: block !important;
}

/* ── Attachments section (separate from lesson content) ──────────────────────── */
.tutor-custom-video-lesson-attachments {
    margin-top: 28px;
}

.tutor-custom-video-lesson-attachments-title {
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 14px;
}

/* Plain link list — no boxes, no bullets */
.tutor-custom-video-lesson-attachments-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tutor-custom-video-lesson-attachments-link {
    display: block;
    font-weight: 400;
    font-size: 16px;
    color: #0200B9 !important;
    text-decoration: none;
    word-break: break-all;
}

/* ── Prev / Next navigation ─────────────────────────────────────────────────────── */
.tutor-custom-video-lesson-navigation {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 16px;
}

.tutor-custom-video-lesson-nav-button {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    text-decoration: none;
    color: #0F172A;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.tutor-custom-video-lesson-nav-button:hover {
    border-color: #2563EB;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    text-decoration: none;
    color: #0F172A;
}

.tutor-custom-video-lesson-nav-disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.tutor-custom-video-lesson-nav-disabled:hover {
    transform: none;
    border-color: #E2E8F0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.tutor-custom-video-lesson-nav-previous svg {
    flex-shrink: 0;
    color: #2563EB;
}

.tutor-custom-video-lesson-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.tutor-custom-video-lesson-nav-next svg {
    flex-shrink: 0;
    color: #2563EB;
}

.tutor-custom-video-lesson-nav-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tutor-custom-video-lesson-nav-label small {
    font-size: 11px;
    font-weight: 500;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tutor-custom-video-lesson-nav-label strong {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: block;
}

/* ── ACCESS DENIED ──────────────────────────────────────────────────────────────── */
.tutor-custom-video-access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 32px;
    gap: 20px;
    min-height: 400px;
}

.tutor-custom-video-access-denied-icon {
    width: 96px;
    height: 96px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
}

.tutor-custom-video-access-denied-title {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
}

.tutor-custom-video-access-denied-description {
    font-size: 15px;
    color: #64748B;
    max-width: 360px;
    line-height: 1.7;
}

.tutor-custom-video-access-denied-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: #2563EB;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.15s ease;
}

.tutor-custom-video-access-denied-button:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
    color: #FFFFFF;
    text-decoration: none;
}

/* ── SIDEBAR (right column) ─────────────────────────────────────────────────────── */
.tutor-custom-video-sidebar {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: sticky;
    top: 58px;
    height: calc(100vh - 58px);
    overscroll-behavior: contain;
    margin-top: 28px;
}

/* Sidebar header */
.tutor-custom-video-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 2;
    flex-shrink: 0;
}

.tutor-custom-video-sidebar-header-title {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tutor-custom-video-sidebar-close-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    color: #64748B;
    transition: background 0.2s ease, color 0.2s ease;
}

.tutor-custom-video-sidebar-close-button:hover {
    background: #F1F5F9;
    color: #0F172A;
}

/* Sidebar progress */
.tutor-custom-video-sidebar-progress {
    padding: 20px;
    background-color: #F5FCFF;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #020207;
    margin-bottom: 8px;
    box-shadow: 0px 1px 3.1px 0px #00000012;
}

.tutor-custom-video-sidebar-progress-bar {
    height: 5px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tutor-custom-video-sidebar-progress-fill {
    height: 100%;
    background: #2563EB;
    border-radius: 999px;
    transition: width 0.4s ease;
    width: 0;
}

.tutor-custom-video-sidebar-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
}

/* Scroll area */
.tutor-custom-video-sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.tutor-custom-video-sidebar-empty-message {
    padding: 32px 20px;
    color: #94A3B8;
    font-size: 14px;
    text-align: center;
}

/* ── Sidebar accordion section ───────────────────────────────────────────────── */
.tutor-custom-video-sidebar-section {
    margin-bottom: 8px;
}

.tutor-custom-video-sidebar-section:last-child {
    border-bottom: none;
}

/* Section header button */
.tutor-custom-video-sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    background: #F8FAFC;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.tutor-custom-video-sidebar-section-header:hover {
    background: #EFF6FF;
}

.tutor-custom-video-sidebar-section .tutor-custom-video-sidebar-section-header {
    background-color: #F5FCFF;
    border: 1px solid #020207;
    border-radius: 8px;
}

.tutor-custom-video-sidebar-section-open .tutor-custom-video-sidebar-section-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Section info: label + title on ONE horizontal line */
.tutor-custom-video-sidebar-section-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.tutor-custom-video-sidebar-section-info span {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    text-transform: none;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tutor-custom-video-sidebar-section-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tutor-custom-video-sidebar-section-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    background: #E2E8F0;
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.tutor-custom-video-sidebar-section-count {
    background: #DBEAFE;
    color: #1D4ED8;
}

/* Chevron arrow */
.tutor-custom-video-sidebar-section-chevron {
    color: #94A3B8;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.tutor-custom-video-sidebar-section-open .tutor-custom-video-sidebar-section-chevron {
    transform: rotate(180deg);
    color: #2563EB;
}

/* Section items container */
.tutor-custom-video-sidebar-section-items {
    background: #FFFFFF;
}

.tutor-custom-video-hidden {
    display: none;
}

/* ── Individual lesson item ──────────────────────────────────────────────────── */
.tutor-custom-video-lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    text-decoration: none;
    color: #334155;
    border: 1px solid #020207;
    border-top: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.tutor-custom-video-lesson-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.tutor-custom-video-lesson-item:hover {
    background: #F8FAFC;
    color: #0F172A;
    text-decoration: none;
}

/* Active / current lesson */
.tutor-custom-video-lesson-item-active {
    background: #EFF6FF;
    border-left: 3px solid #020207;
}

.tutor-custom-video-lesson-item-active:hover {
    background: #DBEAFE;
}

/* Completed lesson – green filled circle with white checkmark */
.tutor-custom-video-lesson-item-done .tutor-custom-video-lesson-item-state-icon {
    width: 18px;
    height: 18px;
    background: #16A34A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tutor-custom-video-lesson-item-done .tutor-custom-video-lesson-item-state-icon svg {
    color: #FFFFFF;
    stroke: #FFFFFF;
}

/* Locked lesson */
.tutor-custom-video-lesson-item-locked {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.tutor-custom-video-lesson-item-locked .tutor-custom-video-lesson-item-state-icon {
    color: #94A3B8;
}

/* Type icon */
.tutor-custom-video-lesson-item-type-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #94A3B8;
}

.tutor-custom-video-lesson-item-active .tutor-custom-video-lesson-item-type-icon {
    color: #2563EB;
}

/* Body: title + duration on same row */
.tutor-custom-video-lesson-item-body {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.tutor-custom-video-lesson-item-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tutor-custom-video-lesson-item-duration {
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* State icon (check / lock) */
.tutor-custom-video-lesson-item-state-icon {
    flex-shrink: 0;
    margin-left: auto;
    margin-top: 1px;
    display: flex;
    align-items: center;
}

/* ── Keyframes ──────────────────────────────────────────────────────────────────── */
@keyframes tutor-custom-video-spin {
    to { transform: rotate(360deg); }
}

/* ── RESPONSIVE: TABLET (≤ 1024px) ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tutor-custom-video-sidebar {
        width: 300px;
    }

    .tutor-custom-video-main {
        padding: 20px 20px 40px;
    }
}

/* ── RESPONSIVE: MOBILE (≤ 768px) ───────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Layout stacks vertically. .tutor-custom-video-main is flattened with
       display:contents so its children (video/notes/lesson content/nav) sit
       in the same flex flow as the curriculum sidebar and can be reordered
       with `order`, letting the sidebar appear right below the notes card. */
    .tutor-custom-video-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        padding: 16px 16px 32px;
    }

    .tutor-custom-video-main {
        display: contents;
    }

    .tutor-custom-video-access-denied,
    .tutor-custom-video-player-section {
        order: 1;
    }

    .tutor-custom-video-note-section {
        order: 2;
    }

    .tutor-custom-video-lesson-body {
        order: 4;
    }

    .tutor-custom-video-lesson-navigation {
        order: 5;
    }

    /* Curriculum sidebar: inline section below the notes card instead of an off-canvas drawer */
    .tutor-custom-video-sidebar {
        order: 3;
        position: static;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        transform: none;
        box-shadow: none;
        z-index: auto;
        margin-top: 0;
        margin-bottom: 24px;
    }

    /* Video player */
    .tutor-custom-video-player-wrapper {
        border-width: 3px;
        border-radius: 12px;
    }

    .tutor-custom-video-player-wrapper iframe,
    .tutor-custom-video-player-wrapper video,
    .tutor-custom-video-player-wrapper .plyr {
        min-height: 220px;
    }

    /* Prev/Next nav stacks vertically */
    .tutor-custom-video-lesson-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .tutor-custom-video-lesson-nav-previous,
    .tutor-custom-video-lesson-nav-next {
        justify-content: flex-start;
    }

    .tutor-custom-video-lesson-nav-label strong {
        max-width: 100%;
    }

    /* Notes */
    .tutor-custom-video-note-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Lesson content */
    .tutor-custom-video-lesson-body-header {
        padding: 18px 18px 0;
    }

    .tutor-custom-video-lesson-title {
        font-size: 18px;
    }

    .tutor-custom-video-lesson-tabs {
        padding: 0 18px;
    }

    .tutor-custom-video-lesson-tab-panels {
        padding: 18px 18px 22px;
    }

    /* Sidebar progress meta */
    .tutor-custom-video-sidebar-progress-meta {
        font-size: 11px;
    }
}

/* ── RESPONSIVE: SMALL MOBILE (≤ 480px) ────────────────────────────────────────── */
@media (max-width: 480px) {
    .tutor-custom-video-layout {
        padding: 12px 12px 28px;
    }

    .tutor-custom-video-lesson-title {
        font-size: 16px;
    }

    .tutor-custom-video-player-wrapper {
        border-radius: 10px;
    }
}

/* ── Tutor LMS compatibility overrides ─────────────────────────────────────────── */

/* Ensure Tutor LMS video player iframe fills wrapper */
.tutor-custom-video-player-wrapper .tutor-ratio {
    border-radius: 0;
}

/* Tutor LMS plyr player */
.tutor-custom-video-player-wrapper .plyr__control--overlaid {
    background: rgba(37, 99, 235, 0.85);
}

.tutor-custom-video-player-wrapper .plyr--full-ui input[type=range] {
    color: #2563EB;
}

/* Tutor LMS nav link system (used inside tabs) */
.tutor-custom-video-lesson-tab-link.tutor-nav-link {
    background: transparent;
    box-shadow: none;
}

/* Tutor LMS spotlight tab item (used with data-tutor-nav-target) */
#tutor-course-spotlight-overview,
#tutor-course-spotlight-files,
#tutor-course-spotlight-q_and_a,
#tutor-course-spotlight-comment {
    padding: 0;
}

/* ── Hide floating contact widget on lesson and quiz pages ───────────────────── */
body.single-lesson .cf-widget.cf-widget--bottom-right,
body.single-quiz .cf-widget.cf-widget--bottom-right {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}
