/* ══════════════════════════════════════════
   LMS — LearnDash course, lesson, focus mode, quiz
   Absorbed from cg-homepage-fix.php Section 5
   ══════════════════════════════════════════ */

/* ── Global LMS text ── */
.learndash-wrapper,
.learndash-wrapper * {
    color: var(--cg-text);
}

.learndash-wrapper h1,
.learndash-wrapper h2,
.learndash-wrapper h3,
.learndash-wrapper h4 {
    color: var(--cg-text-heading);
}

.learndash-wrapper a {
    color: var(--cg-navy);
}

.learndash-wrapper a:hover {
    color: var(--cg-orange);
}

/* ── Course status bar ── */
.learndash-wrapper .ld-course-status {
    background: #fff;
    border: 1px solid var(--cg-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.learndash-wrapper .ld-course-status .ld-course-status-segment {
    border-color: var(--cg-border);
}

.learndash-wrapper .ld-course-status .ld-course-status-label {
    color: var(--cg-text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.learndash-wrapper .ld-course-status .ld-course-status-content {
    color: var(--cg-navy);
    font-weight: 700;
}

/* ── Lesson/topic list ── */
.learndash-wrapper .ld-item-list .ld-item-list-item,
.learndash-wrapper .ld-lesson-item,
.learndash-wrapper .ld-topic-item {
    border-radius: 10px;
    border: 1px solid var(--cg-border);
    padding: 14px 18px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.2s;
}

.learndash-wrapper .ld-item-list .ld-item-list-item:hover,
.learndash-wrapper .ld-lesson-item:hover,
.learndash-wrapper .ld-topic-item:hover {
    background: var(--cg-bg);
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.learndash-wrapper .ld-item-list .ld-item-list-item a,
.learndash-wrapper .ld-lesson-item a,
.learndash-wrapper .ld-topic-item a {
    color: var(--cg-navy);
    font-weight: 500;
    text-decoration: none;
}

.learndash-wrapper .ld-item-list .ld-item-details,
.learndash-wrapper .ld-lesson-item .ld-lesson-item-details {
    color: var(--cg-text-light);
    font-size: 13px;
}

/* ── Section headings ── */
.learndash-wrapper .ld-section-heading {
    background: var(--cg-bg);
    border: 1px solid var(--cg-border);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 24px 0 12px;
}

.learndash-wrapper .ld-section-heading h2 {
    color: var(--cg-navy);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

/* ── Progress bar ── */
.learndash-wrapper .ld-progress {
    background: var(--cg-border-light);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
}

.learndash-wrapper .ld-progress .ld-progress-bar {
    background: #e2e8f0;
    border-radius: 8px;
    height: 10px;
}

.learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage {
    background: linear-gradient(90deg, var(--cg-orange), #f97316);
    border-radius: 8px;
    transition: width 0.4s ease;
}

.learndash-wrapper .ld-progress .ld-progress-stats {
    color: var(--cg-text-light);
    font-size: 13px;
    padding: 4px 0;
}

/* ── LMS Buttons ── */
.learndash-wrapper .ld-button,
.learndash-wrapper input[type="submit"],
.learndash-wrapper .sfwd-mark-complete input,
.learndash-wrapper #learndash_mark_complete_button,
.learndash-wrapper .learndash_mark_complete_button {
    background: var(--cg-orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.learndash-wrapper .ld-button:hover,
.learndash-wrapper input[type="submit"]:hover,
.learndash-wrapper .sfwd-mark-complete input:hover {
    background: var(--cg-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

/* ── Focus Mode ── */
.learndash-wrapper .ld-focus {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Focus sidebar */
.learndash-wrapper .ld-focus .ld-focus-sidebar {
    background: var(--cg-navy);
    width: 320px;
    min-width: 320px;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-wrapper {
    padding: 20px 16px;
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading h3,
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 16px;
    margin: 0;
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item {
    border: none;
    border-radius: 8px;
    background: transparent;
    padding: 10px 14px;
    margin-bottom: 2px;
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item:hover {
    background: rgba(255,255,255,0.08);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item a,
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item .ld-lesson-title {
    color: #cbd5e1;
    font-size: 14px;
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson {
    background: rgba(255,107,53,0.15);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson a,
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson .ld-lesson-title {
    color: var(--cg-orange);
    font-weight: 600;
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-status-complete {
    color: #34d399;
}

/* Focus header */
.learndash-wrapper .ld-focus .ld-focus-header {
    background: #fff;
    border-bottom: 1px solid var(--cg-border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.learndash-wrapper .ld-focus .ld-focus-header .ld-focus-header-main a {
    color: var(--cg-navy);
    font-weight: 600;
}

/* Focus main content */
.learndash-wrapper .ld-focus .ld-focus-main {
    flex: 1;
    background: #fff;
    overflow-y: auto;
}

.learndash-wrapper .ld-focus .ld-focus-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}

.learndash-wrapper .ld-focus .ld-focus-content h1,
.learndash-wrapper .ld-focus .ld-focus-content h2,
.learndash-wrapper .ld-focus .ld-focus-content h3 {
    color: var(--cg-navy);
    margin-top: 24px;
}

.learndash-wrapper .ld-focus .ld-focus-content p,
.learndash-wrapper .ld-focus .ld-focus-content li {
    color: var(--cg-text);
    line-height: 1.7;
    font-size: 16px;
}

/* Focus navigation */
.learndash-wrapper .ld-focus .ld-focus-comments,
.learndash-wrapper .ld-focus .ld-focus-navigation {
    border-top: 1px solid var(--cg-border);
    padding: 16px 24px;
}

/* ── Quiz ── */
.learndash-wrapper .wpProQuiz_content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_question {
    border: 1px solid var(--cg-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafafa;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionList {
    color: var(--cg-text);
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem label {
    color: var(--cg-text);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    display: block;
    transition: background 0.15s;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem label:hover {
    background: #f0f4ff;
}

.learndash-wrapper .wpProQuiz_content input[type="button"],
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button {
    background: var(--cg-orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}

/* ── BuddyBoss LMS integration ── */
.buddyboss-lms .bb-course-title a,
.bb-courses-directory .bb-course-title a {
    color: var(--cg-navy);
}

.buddyboss-lms .bb-course-excerpt {
    color: #4b5563;
}

.buddyboss-lms .bb-card-course-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--cg-border);
    transition: all 0.3s;
}

.buddyboss-lms .bb-card-course-wrap:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--cg-orange);
}

.buddyboss-lms .bb-card-course-details {
    padding: 16px 20px;
}
