/* =========================================================
   Courses Module — Skyler Network / Sunshine Theme
   ========================================================= */

/* ── Variables (inherits from main theme) ───────────────── */
:root {
    --cr-radius:    12px;
    --cr-radius-sm: 8px;
    --cr-gap:       20px;
    --cr-sidebar-w: 280px;
    --cr-card-bg:   var(--wow_content_bg, #fff);
    --cr-border:    var(--border-color, #e8e8e8);
    --cr-accent:    var(--main-color, #6366f1);
    --cr-text:      var(--main-text, #1a1a2e);
    --cr-muted:     var(--light-text, #888);
    --cr-success:   #22c55e;
    --cr-danger:    #ef4444;
    --cr-warning:   #f59e0b;
}

/* ── Course Grid (listing page) ─────────────────────────── */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-top: var(--cr-gap);
}
@media (max-width: 768px) {
    .courses-grid { grid-template-columns: 1fr; }
}

/* ── Course Card ─────────────────────────────────────────── */
.course-card {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    overflow: hidden;
    border: 1px solid var(--cr-border);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: box-shadow .25s, transform .25s;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.course-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f3f4f6;
}
.course-card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.course-card:hover .course-card-cover img {
    transform: scale(1.04);
}
.course-card-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.course-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.course-card-badge.free   { background: var(--cr-success); color: #fff; }
.course-card-badge.paid   { background: var(--cr-accent); color: #fff; }
.course-card-ribbon {
    position: absolute;
    top: 14px;
    right: -32px;
    width: 130px;
    padding: 4px 0;
    background: var(--cr-success);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: center;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.course-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.course-card-title {
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--cr-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-card-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--cr-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--cr-muted);
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cr-border);
}
.course-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.course-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--cr-accent);
}
.course-card-price.free {
    color: var(--cr-success);
}
.course-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--cr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.course-card-footer .btn {
    border-radius: 20px;
    font-weight: 600;
    padding-top: 9px;
    padding-bottom: 9px;
}

.course-card-progress {
    flex: 1;
}
.course-progress-bar {
    height: 5px;
    background: var(--cr-border);
    border-radius: 3px;
    overflow: hidden;
}
.course-progress-fill {
    height: 100%;
    background: var(--cr-accent);
    border-radius: 3px;
    transition: width .4s;
}
.course-progress-label {
    font-size: 11px;
    color: var(--cr-muted);
    margin-top: 3px;
}

/* ── Course Detail / Landing ─────────────────────────────── */
.course-detail-layout {
    display: flex;
    gap: var(--cr-gap);
    align-items: flex-start;
}
@media (max-width: 900px) {
    .course-detail-layout { flex-direction: column; }
    .course-detail-sidebar { width: 100% !important; }
}
.course-detail-main { flex: 1; min-width: 0; }
.course-detail-sidebar {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.course-hero {
    border-radius: var(--cr-radius);
    overflow: hidden;
    background: var(--cr-card-bg);
    border: 1px solid var(--cr-border);
    margin-bottom: var(--cr-gap);
}
.course-hero-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}
.course-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.course-hero-body { padding: 24px; }
.course-hero-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--cr-text);
    margin: 0 0 10px;
}
.course-hero-desc {
    font-size: 15px;
    color: var(--cr-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}
.course-hero-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.course-hero-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--cr-muted);
}
.course-hero-stat strong { color: var(--cr-text); }

.course-purchase-card {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    overflow: hidden;
    padding: 24px;
}
.course-purchase-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--cr-text);
    margin-bottom: 16px;
}
.course-purchase-price.free { color: var(--cr-success); }
.course-purchase-price small {
    font-size: 14px;
    font-weight: 400;
    color: var(--cr-muted);
}
.course-purchase-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--cr-radius-sm);
    background: var(--cr-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity .2s;
    margin-bottom: 12px;
}
.course-purchase-btn:hover { opacity: .9; }
.course-purchase-btn.enrolled {
    background: var(--cr-success);
}
.course-coupon-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.course-coupon-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    font-size: 13px;
    background: var(--input-bg, #f9f9f9);
    color: var(--cr-text);
}
.course-coupon-row button {
    padding: 8px 14px;
    border-radius: var(--cr-radius-sm);
    border: 1px solid var(--cr-accent);
    background: transparent;
    color: var(--cr-accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.course-includes {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--cr-border);
}
.course-includes h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--cr-text);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.course-includes ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.course-includes li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--cr-muted);
}
.course-includes li svg { color: var(--cr-success); flex-shrink: 0; }

/* ── Curriculum (outline accordion) ─────────────────────── */
.course-curriculum { margin-top: var(--cr-gap); }
.course-curriculum-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cr-text);
    margin-bottom: 12px;
}
.curriculum-section {
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}
.curriculum-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    cursor: pointer;
    background: var(--cr-card-bg);
    border: none;
    font: inherit;
    text-align: left;
    user-select: none;
}
.curriculum-section-header:hover { background: var(--hover-bg, #f9f9f9); }
.curriculum-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--cr-text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.curriculum-section-meta {
    font-size: 12px;
    color: var(--cr-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.chevron {
    flex-shrink: 0;
    color: var(--cr-muted);
    transition: transform .2s;
}
.curriculum-section.open .chevron { transform: rotate(180deg); }
.curriculum-lessons {
    border-top: 1px solid var(--cr-border);
    display: none;
}
.curriculum-lessons.open { display: block; }
.curriculum-lesson {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--cr-border);
    text-decoration: none;
    color: var(--cr-text);
    transition: background .15s;
}
.curriculum-lesson:last-child { border-bottom: none; }
.curriculum-lesson:hover { background: var(--hover-bg, #f9f9f9); }
.curriculum-lesson.locked { color: var(--cr-muted); cursor: default; }
.curriculum-lesson.completed .lesson-icon { color: var(--cr-success); }
.lesson-icon {
    width: 20px;
    flex-shrink: 0;
    color: var(--cr-muted);
    display: flex;
    align-items: center;
}
.lesson-title {
    flex: 1;
    font-size: 13px;
}
.lesson-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.lesson-badge.preview { background: #dbeafe; color: #2563eb; }
.lesson-badge.drip    { background: #fef3c7; color: #92400e; }
.lesson-duration {
    font-size: 12px;
    color: var(--cr-muted);
}

/* ── Lesson Player ───────────────────────────────────────── */
.lesson-player-layout {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-height: calc(100vh - 60px);
}
.lesson-player-sidebar {
    width: var(--cr-sidebar-w);
    max-width: 240px;
    flex-shrink: 0;
    border-left: 1px solid var(--cr-border);
    border-right: none;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    background: var(--cr-card-bg);
    order: 2;
    margin-left: 10px;
    border-radius: 10px;
}
@media (max-width: 900px) {
    .lesson-player-layout { flex-direction: column; }
    .lesson-player-sidebar { width: 100%; height: auto; position: relative; top: 0; border-right: none; border-bottom: 1px solid var(--cr-border); }
}
.lesson-player-main { flex: 1; min-width: 0; padding: var(--cr-gap); order: 1; background-color: #fff; border-radius: 10px; }

.lesson-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--cr-border);
    font-size: 14px;
    font-weight: 700;
    color: var(--cr-text);
}
.lesson-sidebar-progress {
    padding: 10px 16px;
    border-bottom: 1px solid var(--cr-border);
}
.lesson-sidebar-section-title {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--cr-muted);
    background: var(--hover-bg, #f9f9f9);
}
.lesson-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--cr-border);
    text-decoration: none;
    color: var(--cr-text);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.lesson-sidebar-item:hover  { background: var(--hover-bg, #f9f9f9); }
.lesson-sidebar-item.active { background: rgba(99,102,241,.08); color: var(--cr-accent); font-weight: 600; }
.lesson-sidebar-item.locked { color: var(--cr-muted); cursor: not-allowed; }
.lesson-sidebar-item .check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--cr-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson-sidebar-item.done .check { background: var(--cr-success); border-color: var(--cr-success); color: #fff; }

.lesson-video-wrap {
    border-radius: var(--cr-radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
    margin-bottom: 20px;
}
.lesson-video-wrap video,
.lesson-video-wrap iframe {
    width: 100%;
    height: 100%;
    display: block;
}
.lesson-audio-wrap {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}
.lesson-audio-wrap audio { width: 100%; margin-top: 12px; }
.lesson-audio-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cr-bg, #f5f6f8);
    border-radius: 999px;
    padding: 8px 18px;
    margin-top: 12px;
}
.lesson-audio-play {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    border: none;
    background: var(--main-color, #1a1a1a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.lesson-audio-time { font-size: 12px; color: var(--cr-muted); min-width: 34px; }
.lesson-audio-seek-wrap {
    position: relative;
    flex: 1;
    height: 4px;
    background: var(--cr-border);
    border-radius: 2px;
}
.lesson-audio-seek-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--main-color, #1a1a1a);
    border-radius: 2px;
    pointer-events: none;
}
.lesson-audio-seek {
    position: absolute;
    inset: -8px 0;
    width: 100%;
    height: calc(100% + 16px);
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.lesson-text-content {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    padding: 24px;
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--cr-text);
}
/* Shared with feed post cards elsewhere in the theme, whose height:100%/display:grid
   rules stretch this box to match the (much taller) outline sidebar next to it. */
.lesson-text-content.wow_content {
    height: auto;
    display: block;
}
.lesson-pdf-wrap {
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    overflow: hidden;
    margin-bottom: 20px;
    height: 600px;
}
.lesson-pdf-wrap iframe { width: 100%; height: 100%; border: none; }
.lesson-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cr-accent);
    color: #fff;
    border-radius: var(--cr-radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.lesson-player-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    margin-top: 16px;
}
.lesson-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cr-success);
    color: #fff;
    border: none;
    border-radius: var(--cr-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.lesson-complete-btn:hover { opacity: .85; }
.lesson-complete-btn.done  { background: var(--cr-border); color: var(--cr-muted); cursor: default; }
.lesson-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--cr-border);
    background: var(--cr-card-bg);
    color: var(--cr-text);
    border-radius: var(--cr-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.lesson-nav-btn:hover { background: var(--hover-bg, #f9f9f9); }

/* ── Quiz ────────────────────────────────────────────────── */
.quiz-wrap {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    padding: 24px;
    margin-bottom: 20px;
}
.quiz-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--cr-text);
}
.quiz-meta { font-size: 13px; color: var(--cr-muted); margin-bottom: 20px; }
.quiz-question {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cr-border);
}
.quiz-question:last-of-type { border-bottom: none; }
.quiz-question-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--cr-text);
    margin-bottom: 12px;
}
.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--cr-text);
}
.quiz-option:hover { border-color: var(--cr-accent); background: rgba(99,102,241,.04); }
.quiz-option.selected { border-color: var(--cr-accent); background: rgba(99,102,241,.08); }
.quiz-option.correct  { border-color: var(--cr-success); background: rgba(34,197,94,.08); }
.quiz-option.wrong    { border-color: var(--cr-danger);  background: rgba(239,68,68,.08); }
.quiz-submit-btn {
    padding: 12px 28px;
    background: var(--cr-accent);
    color: #fff;
    border: none;
    border-radius: var(--cr-radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.quiz-submit-btn:hover { opacity: .9; }
.quiz-result {
    text-align: center;
    padding: 24px;
    border-radius: var(--cr-radius);
    margin-top: 16px;
}
.quiz-result.passed { background: rgba(34,197,94,.1); border: 1px solid var(--cr-success); }
.quiz-result.failed { background: rgba(239,68,68,.1); border: 1px solid var(--cr-danger); }
.quiz-result-score {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 4px;
}
.quiz-result.passed .quiz-result-score { color: var(--cr-success); }
.quiz-result.failed .quiz-result-score { color: var(--cr-danger); }

/* ── Course Builder ──────────────────────────────────────── */
.builder-layout {
    display: flex;
    gap: var(--cr-gap);
    align-items: flex-start;
}
.builder-main { flex: 1; min-width: 0; }
.builder-sidebar { width: 260px; flex-shrink: 0; }
@media (max-width: 900px) {
    .builder-layout { flex-direction: column; }
    .builder-sidebar { width: 100%; }
}

.builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--cr-gap);
    flex-wrap: wrap;
    gap: 10px;
}
.builder-title { font-size: 20px; font-weight: 800; color: var(--cr-text); margin: 0; }
.builder-actions { display: flex; gap: 8px; }

.builder-section {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    border: 1px solid var(--cr-border);
    margin-bottom: 12px;
    overflow: hidden;
}
.builder-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--hover-bg, #f9f9f9);
    cursor: grab;
}
.builder-section-header:active { cursor: grabbing; }
.builder-drag-handle { color: var(--cr-muted); flex-shrink: 0; cursor: grab; }
.builder-section-name {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: var(--cr-text);
}
.builder-section-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.builder-action-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--cr-muted);
    transition: background .15s, color .15s;
}
.builder-action-btn:hover { background: var(--cr-border); color: var(--cr-text); }
.builder-action-btn.danger:hover { background: rgba(239,68,68,.1); color: var(--cr-danger); }

.builder-lessons { padding: 8px; }
.builder-lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    margin-bottom: 6px;
    background: var(--cr-card-bg);
    cursor: grab;
}
.builder-lesson:active { cursor: grabbing; }
.lesson-type-icon { font-size: 16px; }
.builder-lesson-title { flex: 1; font-size: 13px; color: var(--cr-text); }
.builder-lesson-type-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--hover-bg, #f3f4f6);
    color: var(--cr-muted);
    text-transform: uppercase;
}
.builder-add-lesson {
    margin-top: 8px;
    width: 100%;
    padding: 8px;
    border: 2px dashed var(--cr-border);
    background: none;
    border-radius: var(--cr-radius-sm);
    color: var(--cr-muted);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.builder-add-lesson:hover { border-color: var(--cr-accent); color: var(--cr-accent); }
.builder-add-section {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--cr-border);
    background: none;
    border-radius: var(--cr-radius);
    color: var(--cr-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    margin-top: 8px;
}
.builder-add-section:hover { border-color: var(--cr-accent); color: var(--cr-accent); }

/* ── Certificate ─────────────────────────────────────────── */
.course-certificate {
    background: linear-gradient(135deg, #667eea22, #764ba222);
    border: 2px solid var(--cr-accent);
    border-radius: var(--cr-radius);
    padding: 32px;
    text-align: center;
    margin-top: var(--cr-gap);
}
.certificate-icon { font-size: 48px; margin-bottom: 12px; }
.certificate-title { font-size: 20px; font-weight: 800; color: var(--cr-text); margin-bottom: 4px; }
.certificate-subtitle { font-size: 14px; color: var(--cr-muted); margin-bottom: 16px; }
.certificate-number { font-size: 12px; font-family: monospace; color: var(--cr-accent); letter-spacing: 1px; }

/* ── Create / Edit Course Form ───────────────────────────── */
.course-form-wrap {
    width: 100%;
}
.course-form-wrap .wow_form_fields {
    margin: 0 0 22px;
}
.course-form-wrap .wow_form_fields label {
    margin-bottom: 8px;
}

/* ── Form error / success text (no background) ──────────── */
.course-form-error {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}
.course-form-success {
    color: var(--main-color, #27ae60);
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}
.course-form-wrap .form-control.field-error {
    border-color: #e74c3c !important;
    box-shadow: none !important;
}
.course-form-section {
    background: var(--cr-card-bg);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 24px;
    margin-bottom: var(--cr-gap);
}
.course-form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--cr-text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cr-border);
}
.course-cover-upload {
    border: 2px dashed var(--cr-border);
    border-radius: var(--cr-radius-sm);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
    position: relative;
    overflow: hidden;
}
.course-cover-upload:hover { border-color: var(--cr-accent); }
.course-cover-upload input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.course-cover-preview {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--cr-radius-sm);
    display: none;
}
.price-type-tabs {
    display: flex;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}
.price-type-tab {
    flex: 1;
    padding: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    border: none;
    background: none;
    color: var(--cr-muted);
}
.price-type-tab.active {
    background: var(--cr-accent);
    color: #fff;
}

/* ── My Courses (student library) ────────────────────────── */
.my-courses-list { display: flex; flex-direction: column; gap: 12px; }
.my-course-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--cr-card-bg);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    text-decoration: none;
    transition: box-shadow .2s;
}
.my-course-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.my-course-thumb {
    width: 90px;
    height: 60px;
    border-radius: var(--cr-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
}
.my-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-course-info { flex: 1; min-width: 0; }
.my-course-title { font-size: 14px; font-weight: 700; color: var(--cr-text); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-course-meta { font-size: 12px; color: var(--cr-muted); margin-bottom: 6px; }
.my-course-pct { font-size: 12px; color: var(--cr-accent); font-weight: 600; }

/* ── Offer Cards ─────────────────────────────────────────── */
.offer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; margin-top: 12px; }
.offer-card {
    border: 2px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.offer-card:hover, .offer-card.selected { border-color: var(--cr-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.offer-card-name { font-size: 14px; font-weight: 700; color: var(--cr-text); margin-bottom: 4px; }
.offer-card-price { font-size: 22px; font-weight: 800; color: var(--cr-accent); margin-bottom: 4px; }
.offer-card-price.free { color: var(--cr-success); }
.offer-card-period { font-size: 12px; color: var(--cr-muted); }

/* ── Offer free/paid toggle ──────────────────────────────── */
.offer-price-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid var(--cr-border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--cr-muted);
    transition: border-color .15s, color .15s, background .15s;
    user-select: none;
}
.offer-price-toggle input[type="radio"] { display: none; }
.offer-price-toggle:has(input:checked) {
    border-color: var(--cr-accent);
    color: var(--cr-accent);
    background: rgba(var(--cr-accent-rgb, 59,130,246), .06);
}

/* ── Modals used by the builder ──────────────────────────── */
.course-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}
.course-modal-overlay.open { display: flex; }
.course-modal,
.course-modal-box {
    background: var(--cr-card-bg);
    border-radius: var(--cr-radius);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    z-index: 9999;
}
.course-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.course-modal-title { font-size: 16px; font-weight: 700; color: var(--cr-text); }
.course-modal-close {
    background: none;
    border: none;
    font-size: 25px;
    cursor: pointer;
    color: var(--cr-muted);
    padding: 0;
    line-height: 1;
}
.course-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--cr-border);
}

/* ── Lesson editor — right-side slide-in panel ───────────── */
.lesson-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9998;
}
.lesson-panel-overlay.open { display: block; }
.lesson-panel {
    position: fixed;
    top: 0;
    right: -680px;
    width: 640px;
    max-width: 100vw;
    height: 100%;
    background: var(--cr-card-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 28px rgba(0,0,0,.18);
    transition: right .3s cubic-bezier(.4,0,.2,1);
}
.lesson-panel.open { right: 0; }
.lesson-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--cr-border);
    flex-shrink: 0;
}
.lesson-panel-title { font-size: 17px; font-weight: 700; color: var(--cr-text); margin: 0; }
.lesson-panel-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--cr-muted);
    padding: 0;
    line-height: 1;
}
.lesson-panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
}
.lesson-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--cr-border);
    flex-shrink: 0;
}
body.lesson-panel-open { overflow: hidden; }
@media (max-width: 767px) {
    .lesson-panel { width: 100%; right: -100%; }
}
/* TinyMCE appends its floating toolbar-overflow drawer, menus and dialogs to
   a .tox-tinymce-aux container on <body> with its own default z-index (~1300),
   which renders behind the panel's z-index: 9999. Push it above. */
.tox-tinymce-aux { z-index: 10600 !important; }

/* ── Alert / feedback ────────────────────────────────────── */
.course-alert {
    padding: 12px 16px;
    border-radius: var(--cr-radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 14px;
    display: none;
    align-items: center;
}
.course-alert.show { display: flex; }
.course-alert .course-alert-icon { flex-shrink: 0; }
.course-alert.success { background: rgba(34,197,94,.1);  color: #15803d; border: 1px solid rgba(34,197,94,.3); }
.course-alert.error   { background: rgba(239,68,68,.1);  color: #b91c1c; border: 1px solid rgba(239,68,68,.3); }
.course-alert.success .course-alert-icon { color: #22c55e; }
.course-alert.error   .course-alert-icon { color: #ef4444; }

/* ── AI Outline Modal ────────────────────────────────────── */
.ai-outline-list { list-style: none; margin: 0; padding: 0; }
.ai-outline-list li { padding: 6px 0; border-bottom: 1px solid var(--cr-border); font-size: 13px; color: var(--cr-text); }
.ai-outline-list li:last-child { border-bottom: none; }
.ai-section-label { font-weight: 700; margin-bottom: 4px; }
.ai-lesson-item { padding-left: 16px; color: var(--cr-muted); }

/* ── Drip badge on lesson sidebar ────────────────────────── */
.drip-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: #fef9c3;
    color: #854d0e;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Course Detail Page ───────────────────────────────────── */
/* .course-detail-header { margin-bottom: 0; }
.course-detail-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--cr-radius); margin-bottom: 16px; }
.course-detail-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.course-detail-meta-row .course-card-badge { position: static; }
.course-detail-title { font-size: 26px; font-weight: 800; color: var(--cr-text); margin: 0 0 8px; }
.course-detail-subtitle { font-size: 15px; color: var(--cr-muted); margin: 0 0 12px; }
.course-detail-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--cr-muted); margin-top: 10px; }
.course-detail-stats span { display: flex; align-items: center; gap: 4px; }
.course-progress-bar-wrap { padding: 14px 20px; } */
.course-detail-header { margin-bottom: 0; }
.course-detail-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--cr-radius); margin-bottom: 16px; }
.course-detail-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.course-detail-meta-row .course-card-badge { position: static; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }
.course-detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cd-share-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #93c5fd !important; color: #2563eb !important; background: #fff !important; border-radius: 999px !important; padding: 6px 16px !important; font-weight: 600; font-size: 13px; }
.cd-share-btn:hover { background: #eff6ff !important; }
.course-detail-title { font-size: 26px; font-weight: 800; color: #0f172a; margin: 0 0 10px; padding-bottom: 12px; position: relative; }
.course-detail-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; border-radius: 4px; background: #3b82f6; }
.course-detail-subtitle { font-size: 15px; color: #64748b; margin: 0 0 18px; line-height: 1.5; }
.course-detail-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #475569; }
.course-detail-stats span { display: flex; align-items: center; gap: 6px; }
.course-detail-stats svg { color: #3b82f6; stroke: #3b82f6; }
.course-type-badge { font-size: 12px; padding: 5px 14px; border-radius: 999px; background: #f1f3f7; color: #555; font-weight: 600; }
.course-completion-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0 0;
    margin-top: 12px;
}
.course-completion-icon { font-size: 32px; line-height: 1; }
.course-completion-info { flex: 1; min-width: 200px; }
.course-completion-info h3 { margin: 0 0 2px; font-size: 15px; font-weight: 700; color: var(--cr-success); }
.course-completion-info p { margin: 0; font-size: 13px; color: var(--cr-muted); }
.course-section-card { padding: 20px; margin-bottom: var(--cr-gap); }
.course-section-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.course-description { font-size: 14px; line-height: 1.6; }
.course-learn-list { font-size: 14px; line-height: 1.8; }
.course-enroll-share-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-enroll-panel .course-enroll-share-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee; justify-content: center; }
/* Instructor / Community footer */
.course-people-row { display: flex; gap: 32px; flex-wrap: wrap; }
.course-people-col { display: flex; flex-direction: column; gap: 8px; }
.course-people-label { font-size: 12px; font-weight: 600; color: var(--cr-muted); text-transform: uppercase; letter-spacing: .03em; }
.course-people-item { display: flex; align-items: center; gap: 8px; color: var(--cr-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.course-people-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--hover-bg, #f3f4f6); }
.course-offers-grid { display: flex; flex-direction: column; background: var(--cr-bg, #f5f6f8); border-radius: 14px; padding: 4px 16px; margin-bottom: 16px; }
.course-offer-card-inline { width: 100%; max-width: none; border: none; border-bottom: 1px solid var(--cr-border); border-radius: 0; padding: 14px 44px 14px 4px; background: transparent; display: block; cursor: pointer; position: relative; transition: background-color .15s; }
.course-offer-card-inline:last-child { border-bottom: none; }
.course-offer-card-inline input[type="radio"] { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 18px; height: 18px; accent-color: var(--cr-accent); cursor: pointer; }
.course-offer-card-inline:hover { background-color: rgba(var(--cr-accent-rgb, 59,130,246), .04); }
.course-offer-card-inline:has(input:checked) { background-color: rgba(var(--cr-accent-rgb, 59,130,246), .08); border-radius: 10px; }
.offer-card-header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.offer-card-header h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--light-text); text-transform: uppercase; letter-spacing: .02em; }
.offer-price { font-size: 26px; font-weight: 800; color: var(--cr-accent); white-space: nowrap; line-height: 1.2; }
.offer-period { font-size: 14px; font-weight: 500; color: var(--cr-muted); }
.offer-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.offer-meta-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--light-text); background: var(--cr-bg, #f5f5f5); border: 1px solid var(--cr-border); border-radius: 20px; padding: 3px 9px; }
.offer-meta-pill svg { flex-shrink: 0; opacity: .7; }
.course-coupon-row { display: flex; gap: 6px; }
/* legacy sidebar selectors kept for backwards compat */
.course-purchase-sidebar { display: none; }
.course-offer-sidebar { display: flex; flex-direction: column; gap: 12px; }
.course-offer-card { padding: 16px; }
.course-alert-global { position: fixed; bottom: 20px; right: 20px; z-index: 9999; min-width: 260px; }
.course-type-badge { font-size: 11px; padding: 3px 10px; border-radius: 12px; background: var(--hover-bg, #f3f4f6); color: var(--cr-muted); font-weight: 600; }

/* ── Lesson Player extras ─────────────────────────────────── */
.lesson-main-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.lesson-main-header h1 { margin: 0; font-size: 20px; font-weight: 800; }
.lesson-back-link { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cr-text); text-decoration: none; padding: 12px 16px; border-bottom: 1px solid var(--cr-border); }
.lesson-back-link:hover { color: var(--cr-accent); }
.lesson-done-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cr-success); padding: 6px 14px; border-radius: 20px; background: rgba(34,197,94,.1); }
.lesson-navigation { display: flex; justify-content: space-between; align-items: center;  }
.lesson-complete-msg { font-size: 14px; color: var(--cr-success); font-weight: 600; }
.lesson-pdf-frame { width: 100%; height: 600px; border: none; border-radius: var(--cr-radius); }
.lesson-assignment-wrap { background: var(--cr-card-bg); border-radius: var(--cr-radius); border: 1px solid var(--cr-border); padding: 24px; }
.assignment-submit-wrap { margin-top: 20px; }
.lesson-text-content { font-size: 15px; line-height: 1.7; padding: 20px; }
.quiz-submit-row { margin-top: 20px; }

/* ── My Courses list ─────────────────────────────────────── */
.my-course-row { display: flex; align-items: center; gap: 16px; padding: 16px; }
.my-course-thumb { width: 100px; height: 68px; flex-shrink: 0; border-radius: var(--cr-radius-sm); overflow: hidden; background: var(--hover-bg, #f3f4f6); }
.my-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-course-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.my-course-info { flex: 1; min-width: 0; }
.my-course-info h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--cr-text); }
.my-course-subtitle { font-size: 12px; color: var(--cr-muted); margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-course-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 600px) {
    .my-course-row { flex-wrap: wrap; }
    .my-course-thumb { width: 100%; height: 140px; }
    .my-course-actions { width: 100%; }
}

/* ── Builder extras ──────────────────────────────────────── */
.offer-mini-card { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--cr-border); border-radius: var(--cr-radius-sm); margin-bottom: 8px; font-size: 13px; }
.offer-mini-card span { flex: 1; }
.course-publish-status { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.course-publish-status.published { background: rgba(34,197,94,.12); color: var(--cr-success); }
.course-publish-status.draft     { background: rgba(239,68,68,.1);  color: var(--cr-danger); }
.builder-empty { text-align: center; padding: 40px; color: var(--cr-muted); }
.builder-empty svg { margin-bottom: 12px; opacity: .4; }

/* ── Create/Edit form extras ─────────────────────────────── */
.course-form-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.course-ai-outline-preview { margin: 16px 0; border: 1px solid var(--cr-accent); border-radius: var(--cr-radius); overflow: hidden; }
.ai-outline-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: rgba(99,102,241,.06); font-size: 13px; font-weight: 600; }
.ai-outline-content { padding: 12px 16px; }
.ai-section { margin-bottom: 10px; font-size: 13px; }
.ai-section ul { margin: 4px 0 0 16px; padding: 0; }
.ai-section li { margin-bottom: 2px; color: var(--cr-muted); }

/* ── Paywall gate ────────────────────────────────────────── */
.lesson-paywall-gate { position: relative; margin-top: 20px; background: var(--bg-secondary, #f5f7fa); border: 2px dashed var(--cr-border); border-radius: var(--cr-radius); padding: 48px 24px; text-align: center; }
.lesson-paywall-gate h3 { margin: 0 0 8px; }
.lesson-paywall-gate p  { color: var(--cr-muted); margin: 0 0 4px; }

/* ── Live room banner ────────────────────────────────────── */
.lesson-live-banner { background: linear-gradient(90deg, #ff4e50, #f9d423); color: #fff; border-radius: var(--cr-radius); padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; }
.live-dot { width: 10px; height: 10px; background: #fff; border-radius: 50%; flex-shrink: 0; animation: livepulse 1.2s ease-in-out infinite; margin-right: 10px; }
@keyframes livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }
.lesson-live-banner .btn { margin-left: auto; background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.6); color: #fff; }
.lesson-live-banner .btn:hover { background: rgba(255,255,255,.4); }

/* ── Comments (lesson) ───────────────────────────────────── */
.lesson-comments-wrap {
    margin-top: 20px;
    background: var(--cr-card-bg);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 24px;
}
.lesson-comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 800;
    color: var(--cr-text);
}
.lesson-comments-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--cr-muted);
    background: var(--hover-bg, #f3f4f6);
    border-radius: 20px;
    padding: 2px 9px;
}
.lesson-comments-empty {
    color: var(--cr-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}
.lesson-comments-list:not(:empty) { margin-bottom: 4px; }

.lesson-comment-item { display: flex; gap: 10px; margin-bottom: 18px; }
.lesson-comment-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--hover-bg, #f3f4f6); }
.lesson-comment-body { flex: 1; min-width: 0; }
.lesson-comment-bubble {
    display: inline-block;
    max-width: 100%;
    background: var(--hover-bg, #f2f3f5);
    border-radius: 16px;
    padding: 8px 14px;
}
.lesson-comment-name { display: block; font-size: 13px; font-weight: 700; color: var(--cr-text); }
.lesson-comment-text { font-size: 14px; line-height: 1.5; color: var(--cr-text); margin-top: 1px; word-break: break-word; }
.lesson-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 0 14px;
    font-size: 12px;
    color: var(--cr-muted);
}
.lesson-comment-reply-btn {
    background: none; border: none; padding: 0;
    color: var(--cr-accent); font-size: 12px; font-weight: 600; cursor: pointer;
}
.lesson-comment-reply-btn:hover { text-decoration: underline; }

.lesson-comment-icon-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--cr-muted);
    cursor: pointer;
    line-height: 0;
}
.lesson-comment-icon-btn svg.feather {
    width: 14px;
    height: 14px;
    margin-top: 0;
}
.lesson-comment-icon-btn.lesson-comment-edit-btn:hover { color: var(--cr-accent); }
.lesson-comment-icon-btn.lesson-comment-delete-btn:hover { color: #e0245e; }

.lesson-comment-replies {
    margin: 0 0 0 48px;
    display: flex;
    flex-direction: column;
}
.lesson-comment-replies:not(:empty) { margin-top: 12px; }
.lesson-comment-replies .lesson-comment-item { margin-bottom: 12px; }
.lesson-comment-replies .lesson-comment-item:last-child { margin-bottom: 0; }
.lesson-comment-replies .lesson-comment-avatar { width: 28px; height: 28px; }

.lesson-comment-composer { display: flex; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--cr-border); }
.lesson-comment-input-wrap { flex: 1; min-width: 0; }
.lesson-comment-textarea.form-control {
    width: 100%;
    border: 1px solid var(--cr-border);
    border-radius: 16px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cr-text);
    background: var(--cr-card-bg);
    resize: vertical;
    min-height: 44px;
    transition: border-color .15s, box-shadow .15s;
}
.lesson-comment-textarea.form-control:focus {
    outline: none;
    border-color: var(--cr-accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.lesson-comment-error { color: var(--cr-danger); font-size: 12px; margin-top: 5px; }
.lesson-comment-actions { text-align: right; margin-top: 8px; }
.lesson-comment-note { color: var(--cr-muted); font-size: 14px; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--cr-border); }
.lesson-reply-form { margin-top: 10px; }

/* ── Builder toggle switches ─────────────────────────────── */
/* Double class beats ".wow_form_fields>label{display:block}" in style.css, which otherwise wins on specificity and breaks this flex row */
.sn-toggle-label.sn-toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; margin-bottom: 6px; }
.sn-toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.sn-toggle-switch input { opacity: 0; width: 0; height: 0; }
.sn-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: .3s; }
.sn-toggle-slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.sn-toggle-switch input:checked + .sn-toggle-slider { background: var(--cr-accent); }
.sn-toggle-switch input:checked + .sn-toggle-slider:before { transform: translateX(18px); }
/* Rows with a stacked title + hint keep the switch pinned to the first line instead of centering across both */
.sn-toggle-label:has(> div) { align-items: flex-start; }
.sn-toggle-label:has(> div) .sn-toggle-switch { margin-top: 2px; }

/* ── Kajabi-style Course Builder ─────────────────────────── */

/* Header */
.cb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 0;
    border-radius: var(--cr-radius) var(--cr-radius) 0 0;
    gap: 16px;
}
.cb-header-left  { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.cb-header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.cb-cover-thumb-wrap { flex-shrink: 0; display: block; }
.cb-cover-thumb {
    width: 64px; height: 42px;
    border-radius: 6px; object-fit: cover;
    display: block;
}
.cb-cover-placeholder {
    background: var(--cr-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.cb-course-title { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-header-info  { min-width: 0; }

/* Offer editor header */
.cb-offer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--cr-radius) var(--cr-radius) 0 0;
}
.cb-offer-title { margin: 0; font-size: 20px; font-weight: 600; }
.cb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--cr-muted);
    text-decoration: none;
}
.cb-back-link:hover { color: var(--cr-accent); text-decoration: none; }

/* Publish status badge */
.course-publish-status {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.course-publish-status.published { background: #dcfce7; color: #16a34a; }
.course-publish-status.draft     { background: #fef3c7; color: #d97706; }

/* Tab bar */
.cb-tab-bar {
    padding: 0 20px;
    border-bottom: 1px solid var(--cr-border);
    border-radius: 0;
    margin-bottom: 0;
}
.cb-tab-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cb-tab-nav::-webkit-scrollbar { display: none; }
.course-tab-link {
    display: inline-block;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cr-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.course-tab-link:hover { color: var(--cr-text); text-decoration: none; }
.course-tab-link.active {
    color: var(--cr-accent);
    border-bottom-color: var(--cr-accent);
    font-weight: 600;
}

/* Tab panels */
.course-tab-content { margin-top: 20px; }
.course-tab-content > .wow_content { margin-bottom: 16px; }

/* Offer pricing: Free / Paid mode toggle */
.offer-price-mode-btn {
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cr-muted);
    background: var(--cr-card-bg);
    border: none;
    cursor: pointer;
    transition: color .15s, background-color .15s;
}
.offer-price-mode-btn + .offer-price-mode-btn { border-left: 1px solid var(--cr-border); }
.offer-price-mode-btn:hover { color: var(--cr-text); }
.offer-price-mode-btn.active {
    color: #fff;
    background: var(--cr-accent);
    font-weight: 600;
}

/* Outline tab builder */
.course-builder-wrap { padding: 20px; }
.course-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.course-builder-header h4 { margin: 0; }

.builder-section {
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}
.builder-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-secondary, #f7f8fa);
    font-weight: 600;
    font-size: 14px;
}
.builder-section-name { flex: 1; min-width: 0; }

.builder-lessons { padding: 0 14px 8px; }
.builder-lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--cr-border);
    font-size: 13px;
}
.builder-lesson:last-child { border-bottom: none; }
.builder-lesson-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-type-icon { font-size: 14px; flex-shrink: 0; }
.lesson-preview-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    background: #dbeafe; color: #2563eb;
    padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.builder-drag-handle { color: var(--cr-muted); cursor: grab; font-size: 16px; flex-shrink: 0; }
.builder-section-header-actions,
.builder-lesson-actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.builder-section-header-actions .btn,
.builder-lesson-actions .btn {
    min-width: 60px;
    height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: normal;
    display: none;
}
.builder-section-header-actions .btn svg,
.builder-lesson-actions .btn svg {
    width: 12px;
    height: 12px;
}
.builder-section-header-actions .btn-danger,
.builder-lesson-actions .btn-danger {
    margin-right: 10px;
}

.builder-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--cr-muted);
}
.builder-empty svg { margin-bottom: 12px; opacity: .4; }
.builder-empty p  { margin: 0; font-size: 14px; }

/* Customize tab form */
.course-form-wrap { padding: 24px; }
.course-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.course-form-error   { color: var(--cr-danger); font-size: 13px; }
.course-form-success { color: var(--cr-success); font-size: 13px; }

/* Section header (title + action button), used above Offers/Coupons tables */
.cb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

/* Data tables (Offers / Customers / Certificates) */
.cb-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.cb-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.cb-data-table th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid var(--cr-border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--cr-muted);
    white-space: nowrap;
}
.cb-data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--cr-border);
    vertical-align: middle;
    white-space: nowrap;
}
.cb-data-table tr:last-child td { border-bottom: none; }

@media (max-width: 640px) {
    .cb-table-scroll { margin: 0 -12px; padding: 0 12px; }
    .cb-data-table { min-width: 560px; }
}

/* Offer thumbnail placeholder */
.cb-offer-thumb {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: #ede9fe;
    display: flex; align-items: center; justify-content: center;
    color: var(--cr-accent);
    flex-shrink: 0;
}

/* Access badges */
.cb-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.cb-badge-full    { background: #dcfce7; color: #16a34a; }
.cb-badge-limited { background: #fef3c7; color: #d97706; }

/* Offer price mode radios */
.offer-price-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }

/* Settings tab */
.cb-checkout-fields-grid { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.cb-checkout-field-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.checkout-required { color: var(--cr-danger); }

/* Settings tab — single-column section cards (Course Details / Paywall / Live Rooms / Comments) */
.cb-settings-card { padding: 24px 20px; }
.cb-settings-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cr-border);
}
.cb-settings-card-header h4 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--cr-text); }
.cb-settings-card-header p  { margin: 0; font-size: 13px; color: var(--cr-muted); line-height: 1.5; }
.cb-settings-card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--cr-border);
    text-align: right;
}

@media (max-width: 640px) {
    .cb-header { flex-wrap: wrap; }
    .cb-header-actions { width: 100%; justify-content: flex-end; }
    .course-tab-link { padding: 10px 12px; font-size: 13px; }

    /* Outline: section/lesson rows don't have room for name + action buttons on one
       line, and .builder-section clips overflow — wrap the actions onto their own
       row instead of letting them get cut off at the screen edge. */
    .builder-section-header,
    .builder-lesson { flex-wrap: wrap; row-gap: 8px; }
    .builder-section-header-actions,
    .builder-lesson-actions { flex-basis: 100%; justify-content: flex-end; margin-left: 0; }
    .course-builder-header { flex-wrap: wrap; row-gap: 8px; }
}

/* Global floating alert */
.course-alert-global {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: max-content;
    max-width: 90vw;
    
    pointer-events: none;
}
.course-alert-global .alert {
    border-radius: var(--cr-radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    padding: 16px 26px;
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.course-alert-icon { flex-shrink: 0; }

/* Progress bar (reused in Customers table) */
.course-progress-bar {
    height: 6px;
    background: var(--cr-border);
    border-radius: 99px;
    overflow: hidden;
}
.course-progress-fill {
    height: 100%;
    background: var(--cr-accent);
    border-radius: 99px;
    transition: width .3s;
}

/* ── Kajabi-style Creator Management Table ───────────────────── */
.cb-mgmt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cr-muted);
    text-decoration: none;
    transition: color .15s;
    color:#3f86ed;
}
.cb-mgmt-link:hover { color: var(--cr-accent); }

.btn-dark {
    background: #1a1a1a;
    color: #fff;
    border: none;
}
.btn-dark:hover { background: #333; color: #fff; }
.btn-pill { border-radius: 99px; padding-left: 18px; padding-right: 18px; }

.cb-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.cb-search-icon {
    position: absolute;
    left: 12px;
    color: var(--cr-muted);
    pointer-events: none;
}
.cb-search-input {
    width: 100%;
    padding: 8px 32px 8px 36px;
    border: 1px solid var(--cr-border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: var(--cr-card-bg);
    color: var(--cr-text);
}
.cb-search-input:focus { border-color: var(--cr-accent); }
.cb-search-clear {
    position: absolute;
    right: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: #e02424;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.cb-search-clear:hover { background: var(--cr-border); color: #b91c1c; }
.cb-search-wrap.has-value .cb-search-clear { display: flex; }

.cb-courses-table { width: 100%; border-collapse: collapse; }
.cb-courses-table thead th {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cr-muted);
    text-align: left;
    border-bottom: 1px solid var(--cr-border);
    white-space: nowrap;
}
.cb-courses-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--cr-border);
    vertical-align: middle;
}
.cb-courses-table tbody tr:last-child td { border-bottom: none; }
.cb-courses-table tbody tr:hover { background: var(--wow_content_bg_hover, #fafafa); }

.course-row-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.course-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-row-thumb-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #9ca3af; }

.course-type-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
    color: var(--cr-accent);
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .2);
    white-space: nowrap;
}

/* Three-dot action menu */
.cb-row-actions { position: relative; display: inline-block; }
.cb-three-dot-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cr-muted);
    padding: 4px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.cb-three-dot-btn:hover { background: var(--cr-border); color: var(--cr-text); }
.cb-row-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--cr-card-bg);
    border: 1px solid var(--cr-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    min-width: 170px;
    z-index: 300;
    padding: 4px 0;
}
.cb-dropdown-item {
    display: block;
    width: 100%;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--cr-text);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background .1s;
}
.cb-dropdown-item:hover { background: var(--cr-border); color: var(--cr-text); }
.cb-dropdown-danger { color: var(--cr-danger) !important; }
.cb-dropdown-danger:hover { background: rgba(239,68,68,.06) !important; }

.cb-table-footer {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--cr-muted);
    border-top: 1px solid var(--cr-border);
    display: flex;
    align-items: center;
}

/* ── Responsive stacked layout — Creator Management Table (mobile) ─────
   Without this, Type/Members/Created/Action just overflow past the
   viewport edge on narrow screens with no way to reach them (including
   the three-dot actions menu), since the table has no horizontal scroll
   or stacking behavior otherwise. */
.cb-mobile-label { display: none; }
@media (max-width: 640px) {
    .cb-mobile-label { display: inline; }

    .cb-courses-table thead { display: none; }
    .cb-courses-table,
    .cb-courses-table tbody,
    .cb-courses-table tbody tr,
    .cb-courses-table tbody td {
        display: block;
        width: 100%;
    }
    /* .cb-courses-table also carries .cb-data-table, which forces
       min-width:560px at this same breakpoint (see above) — that pushes
       this table's absolutely-positioned action button off the right
       edge of the viewport, so it must be cleared here. */
    .cb-courses-table {
        min-width: 0;
    }
    .cb-courses-table tbody tr {
        position: relative;
        padding: 14px 46px 14px 16px;
        border-bottom: 1px solid var(--cr-border);
    }
    .cb-courses-table tbody tr:last-child { border-bottom: none; }
    .cb-courses-table tbody td {
        padding: 2px 0;
        border-bottom: none;
    }
    .cb-courses-table tbody td:first-child { padding-bottom: 8px; }
    .cb-courses-table tbody td:nth-child(3),
    .cb-courses-table tbody td:nth-child(4) {
        display: inline-block;
        font-size: 12px !important;
        color: var(--cr-muted);
        white-space: normal;
    }
    .cb-courses-table tbody td:nth-child(3)::after {
        content: "•";
        display: inline-block;
        margin: 0 8px;
        color: var(--cr-border);
    }
    .cb-courses-table tbody td:last-child {
        position: absolute;
        top: 10px;
        right: 6px;
        width: auto;
        padding: 0;
    }
}

/* ── Manage Comments Page ─────────────────────────────────────── */
.cb-info-icon {
    font-size: 15px;
    color: var(--cr-muted);
    cursor: help;
    vertical-align: middle;
    margin-left: 4px;
}
.cb-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--cr-border);
    flex-wrap: wrap;
    gap: 8px;
}
.cb-comment-tabs {
    display: flex;
    gap: 0;
}
.cb-comment-tab {
    display: inline-block;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cr-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.cb-comment-tab.active, .cb-comment-tab:hover {
    color: var(--cr-text);
    border-bottom-color: var(--cr-text);
}
.cb-course-filter-wrap {
    flex-shrink: 0;
    max-width: 100%;
}
.cb-course-filter {
    display: block;
    width: 200px !important;
    max-width: 100%;
    height: auto !important;
    font-size: 13px;
    padding: 7px 32px 7px 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-image: url(../img/arrow-select.svg);
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: auto 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}
@media (max-width: 480px) {
    .cb-comments-header { padding: 12px 20px; }
    .cb-course-filter-wrap { width: 100%; }
    .cb-course-filter { width: 100%; }
}
.cb-comment-row {
    padding: 16px 20px;
    border-bottom: 1px solid var(--cr-border);
    transition: background .1s;
}
.cb-comment-row:last-child { border-bottom: none; }
.cb-comment-row:hover { background: var(--wow_content_bg_hover, #fafafa); }
.cb-comments-empty {
    text-align: center;
    padding: 60px 20px;
}
.cb-comments-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.cb-comments-empty p {
    color: var(--cr-muted);
    font-size: 14px;
    margin: 0;
}

/* ── Certificate Template Fields ─────────────────────────────── */
.wow_form_fields.cert-field-group { margin: 0 0 18px; }
.wow_form_fields>label.cert-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 8px;
}
.cert-upload-area {
    border: 2px solid var(--cr-danger, #ef4444);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    background: #fff;
}
.cert-upload-area.ok { border-color: var(--cr-border); }
.cert-logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}
.cert-logo-preview { margin-bottom: 8px; }
.cert-field-error {
    color: var(--cr-danger);
    font-size: 12px;
    margin: 6px 0 0;
}
.cb-preview-link {
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--cr-accent);
}
.cb-preview-link:hover { opacity: .75; }
.course-detail-page .cd-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15,23,42,.08);
    overflow: hidden;
    margin-bottom: 20px;
}
.cd-card .course-detail-cover {
    width: 100%; max-height: 220px; object-fit: cover;
    border-radius: 0; margin: 0; display: block;
}
.cd-card-body { padding: 28px 32px 24px; }

/* .cd-top {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
    margin-bottom: 8px;
}
@media (max-width: 900px) { .cd-top { grid-template-columns: 1fr; } } */


.cd-title { font-size: 22px; font-weight: 700; margin: 0 0 20px; padding-bottom: 0; }
.cd-title::after { display: none !important; }

.cd-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 0; }
.cd-meta .course-card-badge { position: static; }
.cd-meta .course-card-badge.free {
    background: #e7f8ee !important; color: #157a3c !important;
    text-transform: none; box-shadow: none; border-radius: 8px;
}
.cd-meta .course-type-badge { background: transparent; padding: 0; color: #64748b; }
.cd-meta-stat { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 14px; }
.cd-meta .course-detail-actions { margin-left: auto; }

.cd-enroll-panel {
    border: 1px solid #e8eaf0; border-radius: 12px; padding: 18px;
}
.cd-enroll-heading { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.cd-enroll-panel .course-enroll-inline { margin: 0; }
.cd-enroll-panel .wow_content,
.cd-enroll-panel .course-enrolled-card {
    background: transparent; box-shadow: none; border: none; padding: 0 !important; margin: 0;
}
.cd-enroll-panel .cd-share-btn { margin-top: 12px; width: 100%; justify-content: center; }

.cd-section {
    box-shadow: none !important;
    border: none !important;
    /* border-top: 1px solid #eee !important; */
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 18px 0 !important;
}
/* Curriculum builder — reference layout (second image) */
.cb-curr { padding: 24px !important; }
.cb-curr-header { margin: 0 0 20px; align-items: center; }
.cb-curr-title-wrap { display: flex; align-items: flex-start; gap: 12px; }
.cb-curr-ico {
    width: 42px; height: 42px; border-radius: 12px;
    background: #e8f1ff; color: #2292ff;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cb-curr-title { margin: 0 0 2px; font-size: 18px; font-weight: 800; color: #111; }
.cb-curr-sub { margin: 0; font-size: 13px; color: #94a3b8; }
.cb-pill-btn { border-radius: 999px !important; padding: 8px 18px !important; font-weight: 700; }

.cb-sec-card {
    background: #fff !important;
    border: 1px solid #e8eaf0 !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    padding: 14px 14px 12px;
    overflow: visible !important;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}
.cb-sec-head {
    background: transparent !important;
    padding: 4px 4px 12px !important;
    margin: 0;
    cursor: default;
}
.cb-sec-left {
    display: flex; align-items: center; gap: 10px;
    padding-left: 0 !important; padding-right: 0 !important;
}
.cb-sec-num {
    width: 40px; height: 40px; border-radius: 10px;
    background: #e8f1ff; color: #2292ff;
    font-weight: 800; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cb-sec-text { min-width: 0; flex: 1; }
.cb-sec-text .builder-section-name {
    display: block; font-size: 15px; font-weight: 700; color: #111;
}
.cb-sec-actions {
    display: flex; align-items: center; justify-content: flex-end;
    flex-wrap: wrap; gap: 8px; margin: 0 !important;
}
.cb-btn-add-lesson {
    background: #e8f1ff !important; color: #2292ff !important;
    border: none !important; border-radius: 999px !important;
    font-weight: 700; padding: 6px 14px !important;
}
.cb-ico-btn {
    width: 34px; height: 34px; padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    min-width: 34px !important;
}
.cb-ico-danger {
    background: #fee2e2 !important; color: #ef4444 !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, .25);
}

.cb-lesson-list { padding: 0 !important; }
.cb-lesson-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px !important;
    padding: 12px 12px 12px 14px !important;
    border: 1px solid #e8eaf0 !important;
    border-radius: 12px !important;
    border-left: 4px solid #2292ff !important;
    background: #fff !important;
    cursor: grab;
}
.cb-lesson-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.cb-lesson-badge {
    width: 36px; height: 36px; border-radius: 10px;
    background: #2196f30f; display: inline-flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.cb-lesson-text { min-width: 0; display: flex; flex-direction: column; }
.cb-lesson-text .builder-lesson-title {
    font-size: 14px; font-weight: 700; color: #111;
    white-space: wrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-lesson-meta { font-size: 12px; color: #94a3b8; }
.cb-lesson-actions { margin-left: 0 !important; display: flex; gap: 8px; flex-shrink: 0; }
.cb-btn-outline {
    border-radius: 999px !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
    background: #fff !important;
    font-weight: 600;
    min-width: auto !important;
    height: auto !important;
    padding: 6px 12px !important;
}
.cb-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    line-height: 0;
    text-decoration: none;
}
.cb-act:hover { background: #f3f4f6; }
.cb-act-view { color: #9ca3af; }   /* gray eye */
.cb-act-edit { color: #2292ff; }   /* blue pencil */
.cb-act-del  { color: #c62828; }   /* red trash */
.cb-act svg { display: block; pointer-events: none; }
.cb-add-lesson-dash {
    display: block; width: 100%;
    margin-top: 4px; padding: 14px !important;
    border: 2px dashed #d1d5db !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #94a3b8 !important;
    font-weight: 600; font-size: 13px;
    cursor: pointer;
}
.cb-add-lesson-dash:hover { border-color: #2292ff !important; color: #2292ff !important; }

.cb-curr-footer-add {
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid #e8eaf0;
    text-align: center;
}
.cb-curr-footer-link {
    background: none; border: none; color: #2292ff;
    font-weight: 700; font-size: 14px; cursor: pointer;
}

@media (max-width: 767px) {
    .cb-curr-header .text-right { text-align: left; margin-top: 10px; }
    .cb-sec-actions { justify-content: flex-start; margin-top: 10px !important; }
    .cb-lesson-row { flex-wrap: wrap; }
    .cb-curr {
        padding: 10px !important;
    }
}
/* ---------- Detail page: Bootstrap col-8 / col-4 grid ---------- */
/* BS3 columns are floats; making the row a flex container gives equal-height
   columns and removes the clearing bugs that let the sidebar overlap content. */
   .cd-row {
    display: flex;
    flex-wrap: wrap;
}
/* BS3 .row's clearfix pseudo-elements would otherwise become flex items */
.cd-row::before,
.cd-row::after { display: none; }

.cd-row > [class*="col-"] {
    float: none;
    min-width: 0; /* flex items default to min-width:auto — long words would bleed out */
}

/* col-md-* carry no width below 992px, so flex would shrink-wrap them */
@media (max-width: 991px) {
    .cd-row > [class*="col-"] { width: 100%; }
}

.cd-cover-card { margin-bottom: 20px; }

.cd-main-col .cd-card { margin-bottom: 20px; }

.cd-side-col .cd-enroll-panel {
    position: sticky;
    top: 80px;
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 16px;
    /* box-shadow: 0 4px 24px rgba(15, 23, 42, .08); */
    padding: 20px;
    margin-bottom: 20px;
}
@media (max-width: 991px) {
    .cd-side-col .cd-enroll-panel { position: static; }
}

.cd-back-community-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--light-text);
    text-decoration: none;
    margin-bottom: 12px;
    border: 1px solid #e8eaf0;
    border-radius: 999px;
    padding: 5px;
}

/* Enrollment states stack vertically in the narrower column */
.cd-enroll-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.cd-enroll-state-text { font-weight: 600; font-size: 15px; }
.cd-enroll-price { margin: 0; font-size: 22px; }
.cd-enroll-cta {
    width: 100%;
    margin-left: 0;
    border-radius: 999px;
    padding: 9px 24px;
    font-weight: 700;
}
.cd-enroll-cta-block { margin-top: 16px; }
.offer-desc { font-size: 13px; color: var(--light-text); margin: 4px 0 10px; }

/* Long URLs / unbroken strings must not spill past the column edge */
.cd-card-body,
.course-description,
.course-learn-list,
.course-section-card,
.curriculum-section-title,
.lesson-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* ---------- Learn / Requirements bullets ---------- */
.cd-check-list,
.cd-bullet-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}
.cd-check-list li,
.cd-bullet-list li {
    position: relative;
    line-height: 1.5;
}

.cd-check-list li {
    padding: 6px 0 6px 28px;
}
.cd-check-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 7px;
    width: 17px;
    height: 17px;
    border: 1.5px solid #2f80ed;
    border-radius: 50%;
    color: #2f80ed;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

.cd-bullet-list li {
    padding: 4px 0 4px 18px;
}
.cd-bullet-list li::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 13px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2f80ed;
}
ul.course-learn-list.cd-bullet-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
/* ---------- One continuous white surface behind both columns ----------
   Mirrors #event-tickets-wrap on the event detail page: the row owns the
   white panel, the columns inside it are flat. */
   .cd-row {
    background: #fff;
    border-radius: 0px 0px 14px 14px;
    /* box-shadow: 0 4px 24px rgba(15, 23, 42, .08); */
    padding: 12px;
    /* BS3 .row has -15px side margins; without this the white panel would
       overhang the container on both edges */
    margin-left: 0;
    margin-right: 0;
}

.course-detail-page .cd-main-col .cd-card {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 0;
}
.cd-main-col .cd-card-body {
    padding: 16px 14px 8px;
}

.cd-side-col .cd-enroll-panel {
    background: #fff;
    border: 1px solid #e8eaf0;
    box-shadow: none;
    margin-bottom: 8px;
}

.cd-cover-card { margin-bottom: 12px; }
/* Sidebar panels scroll together as one sticky unit */
.cd-side-sticky {
    position: sticky;
    top: 80px;
}
.cd-side-col .cd-enroll-panel {
    position: static;
}

.cd-people-panel {
    display: flex;
    /* flex-direction: column; */
    gap: 25px;
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 8px;
}

@media (max-width: 991px) {
    .cd-side-sticky { position: static; }
}
ul.course-learn-list.cd-check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 767px) {
    ul.course-learn-list.cd-bullet-list {
        display: grid;
        grid-template-columns: 1fr;
    }
    ul.course-learn-list.cd-check-list {
        display: grid;
        grid-template-columns: 1fr;
    }
}
/* ---------- Enrollment heading accent bar ---------- */
.cd-enroll-heading {
    position: relative;
    margin: 0 0 14px;
    padding-left: 12px;
    font-size: 17px;
    font-weight: 700;
}
.cd-enroll-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 2px;
    background: #2f80ed;
}

/* ---------- Enrolled state as a green status card ----------
   The creator state reuses .course-enrolled-card with identical classes, so it is
   excluded via :has() — the "Enrollment" heading only renders for non-creators. */
.cd-enroll-panel:has(.cd-enroll-heading) .course-enrolled-card .cd-enroll-state {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0 14px;
}

/* Grid item sitting behind row 1 only, so the CTA in row 2 stays outside the card */
.cd-enroll-panel:has(.cd-enroll-heading) .course-enrolled-card .cd-enroll-state::before {
    content: "";
    grid-area: 1 / 1 / 2 / 3;
    background: #e9f8ef !important;
    /* border: 1px solid #bfe6cf; */
    border-radius: 12px;
}

.cd-enroll-panel:has(.cd-enroll-heading) .course-enrolled-card .cd-enroll-state > svg {
    grid-area: 1 / 1 / 2 / 2;
    z-index: 1;
    width: 38px;
    height: 38px;
    padding: 9px;
    margin: 14px 0 14px 16px;
    box-sizing: border-box;
    background: #fff;
    border: 2px solid #22a95b;
    border-radius: 50%;
    stroke: #22a95b;
    stroke-width: 3;
}

.cd-enroll-panel:has(.cd-enroll-heading) .course-enrolled-card .cd-enroll-state-text {
    grid-area: 1 / 2 / 2 / 3;
    z-index: 1;
    display: block;
    margin: 14px 16px 14px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a8f4c;
}
.cd-enroll-panel:has(.cd-enroll-heading) .course-enrolled-card .cd-enroll-state-text::after {
    content: "You are successfully enrolled in this learning journey.";
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.4;
    color: #6b7280;
}

.cd-enroll-panel:has(.cd-enroll-heading) .course-enrolled-card .cd-enroll-cta {
    grid-area: 2 / 1 / 3 / 3;
    margin-top: 14px;
}
/* ---------- Course-complete celebration modal ---------- */
.cc-box {
    max-width: 420px;
    padding: 34px 30px 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='230' viewBox='0 0 420 230'%3E%3Ccircle cx='60' cy='112' r='4' fill='%23ef4444'/%3E%3Ccircle cx='152' cy='58' r='3' fill='%233b82f6'/%3E%3Ccircle cx='268' cy='56' r='3.5' fill='%23f59e0b'/%3E%3Ccircle cx='362' cy='118' r='4' fill='%2322c55e'/%3E%3Ccircle cx='96' cy='186' r='3' fill='%238b5cf6'/%3E%3Ccircle cx='332' cy='188' r='3' fill='%23ec4899'/%3E%3Crect x='40' y='58' width='9' height='9' rx='2' fill='%233b82f6' transform='rotate(25 44 62)'/%3E%3Crect x='374' y='62' width='9' height='9' rx='2' fill='%23f59e0b' transform='rotate(-20 378 66)'/%3E%3Crect x='118' y='148' width='8' height='8' rx='2' fill='%2322c55e' transform='rotate(40 122 152)'/%3E%3Cpath d='M76 150c6-5 12 3 18-2' stroke='%238b5cf6' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3Cpath d='M318 142c6 5 12-3 18 2' stroke='%23a855f7' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3Cpath d='M150 176h14' stroke='%2322c55e' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M262 176h14' stroke='%2322c55e' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M142 196l10 6' stroke='%2322c55e' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M284 196l-10 6' stroke='%2322c55e' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 75% auto, 100% auto;
}

.cc-actions-top {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 10px;
    z-index: 2;
}
.cc-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e4e7ec;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.cc-icon-btn svg { width: 17px; height: 17px; }
.cc-share { border-color: #b2ddff; color: #2f80ed; }
.cc-share:hover { background: #eff8ff; }
.cc-close { color: #344054; }
.cc-close:hover { background: #f2f4f7; }

.cc-badge {
    position: relative;
    width: 55px;
    height: 55px;
    margin: 44px auto 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 12px rgba(34, 197, 94, .13);
}
.cc-badge svg { width: 25px; height: 25px; }

.cc-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #101828;
}
.cc-subtitle {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 700;
    color: #22c55e;
}
.cc-desc {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.5;
    color: #667085;
}

#courseCompleteModalCertActions { text-align: left; }
.cc-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 18px;
    border-radius: 12px;
    border: 1px solid #e4e7ec;
    background: #fff;
    color: #101828;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.cc-action:hover,
.cc-action:focus {
    text-decoration: none;
    color: #101828;
    border-color: #b2ddff;
    background: #f9fbff;
}
.cc-action > span { flex: 1; }
.cc-action .cc-ico { width: 18px; height: 18px; flex-shrink: 0; color: #2f80ed; }
.cc-action .cc-chev { width: 16px; height: 16px; flex-shrink: 0; opacity: .55; }

.cc-action-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(90deg, #22a7f0 0%, #2f6fed 100%);
    box-shadow: 0 6px 16px rgba(47, 111, 237, .28);
}
.cc-action-primary:hover,
.cc-action-primary:focus {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(90deg, #1f9ce4 0%, #2a63d8 100%);
}
.cc-action-primary .cc-ico { color: #fff; }
.cc-action-primary .cc-chev { opacity: .85; }
/* .cd-toolbar {
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 14px;
} */

.cd-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cd-toolbar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px;
    border-radius: 2em;
    font-family: var(--main-font);
    font-size: 14px;
    line-height: 24px;
}

.cd-toolbar-back {
    margin-left: auto;
}

.cd-toolbar-back svg {
    color: #2196f4;
}

@media (max-width: 575px) {
    .cd-toolbar {
        padding: 8px 12px;
        overflow-x: auto;
    }

    .cd-toolbar-actions {
        min-width: max-content;
    }
}
/* .cd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 14px;
}

.cd-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: auto;
} */
.cd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    /* margin-bottom: 12px; */
    background: #fff;
    border-bottom: 1px solid #e8eaf0;
    border-radius: 14px 14px 0 0;
}
span.split-link svg {
    width: 24px;
    height: 24px;
}

.cd-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: auto;
}

.cd-toolbar .cd-back-community-link {
    margin-bottom: 0;
    padding: 5px 14px;
    flex-shrink: 0;
}
form#frmcustomGContqr .close {
    position: absolute;
    right: 0;
}
div#gc_step1qr {
    align-items: center;
    padding-top: 10px;
}
@media (max-width: 767px) {
    .wow_content.popular_posts_hdr.flex {
        flex-wrap: nowrap;
        flex-direction: row;
        width: 100%;
    }
    .wow_content.popular_posts_hdr h2{
        width:38%;
        font-size: 18px;
    }
    .popular_posts_hdr.flex{
        align-items: flex-start;
        gap: 10px;
    }
    a.cb-mgmt-link {
        border: 1px solid #b6b6b6;
        padding: 5px;
        border-radius: 5px;
        background: #2196f30f;
    }
}
/* Desktop: title left, Manage Comments + New course grouped on the right */
.wow_content.popular_posts_hdr.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.wow_content.popular_posts_hdr.flex > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 auto;
    min-width: 0;
    gap: 16px;
}

.wow_content.popular_posts_hdr.flex > div h2 {
    margin: 0;
}

.wow_content.popular_posts_hdr.flex > .btn {
    flex-shrink: 0;
    margin-left: 10px;
}

@media (max-width: 767px) {
    .wow_content.popular_posts_hdr.flex {
        flex-wrap: wrap !important;
        flex-direction: row !important;
        width: 100%;
        align-items: center;
        gap: 10px;
    }

    /* Row 1: Courses left, Manage Comments right */
    .wow_content.popular_posts_hdr.flex > div {
        flex: 1 1 100%;
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .wow_content.popular_posts_hdr h2 {
        width: auto;
        font-size: 18px;
        margin: 0;
    }

    a.cb-mgmt-link {
        border: 1px solid #b6b6b6;
        padding: 5px 10px;
        border-radius: 5px;
        background: #2196f30f;
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Row 2: New course full width under both */
    .wow_content.popular_posts_hdr.flex > .btn {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
        text-align: center;
        justify-content: center;
    }
    .cd-people-panel{
        flex-direction: column;
    }
}
/* Curriculum: long titles must wrap, not overflow the card */
.cd-main-col,
.cd-card-body,
.course-curriculum-accordion,
.curriculum-section {
    min-width: 0;
    max-width: 100%;
}

.curriculum-section-header {
    min-width: 0;
    align-items: flex-start;
}

.curriculum-section-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    align-items: flex-start;
    line-height: 1.35;
}

.curriculum-lesson {
    min-width: 0;
    align-items: flex-start;
    flex-wrap: wrap;
}

.curriculum-lesson .lesson-title {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}
.curriculum-lesson a.lesson-title {
    color: #2563eb;
}
.curriculum-section-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.curriculum-section-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: unset !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
    max-height: calc(1.35em * 2);
}

.curriculum-section-title-wrap.is-expanded .curriculum-section-title {
    display: block !important;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    overflow: visible !important;
}

.curriculum-title-toggle {
    font-size: 12px;
    font-weight: 600;
    color: #3f6df8;
    cursor: pointer;
    user-select: none;
    line-height: 1.2;
}

.curriculum-title-toggle:hover { text-decoration: underline; }
.cd-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.cd-toolbar-back {
    margin-left: auto;
}

.cd-toolbar-back svg {
    color: #2196f4;
}

.cd-toolbar-actions .btn svg {
    flex-shrink: 0;
}
/* ── Bundle courses multi-select ─────────────────────────── */
.cb-bundle-picker {
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-sm);
    background: #fff;
    overflow: hidden;
}

.cb-bundle-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    margin: 0;
    border: none;
    border-bottom: 1px solid transparent;
    background: #fff;
    color: var(--cr-muted);
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    outline: none;
    box-shadow: inset 0 0 0 1px transparent;
    transition: box-shadow .15s ease, color .15s ease, border-color .15s ease;
}

.cb-bundle-picker.is-open .cb-bundle-trigger,
.cb-bundle-trigger:focus-visible {
    color: var(--cr-text);
    box-shadow: inset 0 0 0 2px var(--cr-accent);
}

.cb-bundle-trigger.has-selection {
    color: var(--cr-text);
}

.cb-bundle-trigger-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.cb-bundle-chevron {
    flex-shrink: 0;
    color: var(--cr-muted);
    transition: transform .2s ease;
}

.cb-bundle-picker.is-open .cb-bundle-chevron {
    transform: rotate(180deg);
}

.cb-bundle-list {
    max-height: 280px;
    overflow-y: auto;
    border-top: 1px solid var(--cr-border);
    background: #fff;
}

.cb-bundle-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--cr-border);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: var(--cr-text);
    line-height: 1.4;
}

.cb-bundle-item:last-child {
    border-bottom: none;
}

.cb-bundle-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.cb-bundle-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--cr-accent);
    cursor: pointer;
}

.cb-bundle-item-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
tr.course-mgmt-row a {
    text-wrap: wrap;
}
/* ── Creator: managing banner ────────────────────────────── */
.cd-manage-banner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cd-manage-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e8f1ff;
    color: #2292ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cd-manage-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cd-manage-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a2e;
}

.cd-manage-sub {
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #6b7280;
}

/* ── Share On pill + divider ─────────────────────────────── */
.cd-share-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
}

.cd-share-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f0f2f5;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}

.cd-share-pill svg {
    color: #2292ff;
    flex-shrink: 0;
}

.cd-share-line {
    flex: 1 1 auto;
    height: 1px;
    background: #e5e7eb;
    min-width: 24px;
}

.cd-enroll-panel .course-enroll-share-row {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    justify-content: flex-start;
}
.cb-data-table .cb-ico-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.cb-data-table .cb-ico-btn svg {
    display: block;
}
.cb-offer-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cb-action-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
}
.cb-action-edit { color: #2292ff; }
.cb-action-delete { color: #ef4444; }
.cb-action-ico:hover { opacity: .75; }
@media (max-width: 767px) {
    .lesson-player-sidebar{
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-top:20px;
    }
    .lesson-player-main{
        width: 100%;
    }
}
.lesson-player-main {
    display: flex;
    flex-direction: column;
}
.lesson-navigation {
    order: 10;
    margin-top: 16px;
}
.event-content-container{
    padding-right: 0 !important;
}