/* =====================================================
   BFU lesson, topic and quiz pages — light Private Office polish on BuddyBoss's LearnDash focus mode.
   ===================================================== */

body.ld-in-focus-mode,
body.single-sfwd-lessons,
body.single-sfwd-topic,
body.single-sfwd-quiz {
    --pv-ink: #0B1B3F; --pv-navy-2: #1A3A6B; --pv-muted: #6B6557; --pv-hair: #E4D9C0;
    --pv-gold: #A87C0E; --pv-gold-2: #D4A017; --pv-gold-lt: #F0C040; --pv-cream: #FBF3DF; --pv-ivory: #FFFDF8;
    --pv-serif: 'Cormorant Garamond', Georgia, serif; --pv-sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Logo sat on top of the course title in the sidebar: keep it inside the header bar. */
body.bb-custom-ld-logo-enabled .site-header #site-logo,
body.ld-in-focus-mode .site-header #site-logo { max-height: 60px; overflow: hidden; }
body.bb-custom-ld-logo-enabled .site-header #site-logo img { max-height: 44px !important; width: auto !important; }

/* ── Sidebar: ivory paper with a gold hairline ── */
.lms-topic-sidebar-wrapper { background: var(--pv-ivory) !important; border-right: 1px solid var(--pv-hair) !important; font-family: var(--pv-sans) !important; }
.lms-topic-sidebar-wrapper .lms-topic-sidebar-course-navigation h2,
.lms-topic-sidebar-wrapper .course-entry-title,
.lms-topic-sidebar-wrapper .bb-lms-title { font-family: var(--pv-serif) !important; font-weight: 700 !important; color: var(--pv-ink) !important; }
.lms-topic-sidebar-wrapper .ld-progress-bar-percentage,
.lms-topic-sidebar-wrapper .ld-progress-bar .ld-progress-bar-percentage { background: var(--pv-gold) !important; }
.lms-topic-sidebar-wrapper .ld-progress-bar { background: #F1EAD8 !important; }
.lms-topic-sidebar-wrapper .lms-lesson-item > a,
.lms-topic-sidebar-wrapper .lms-topic-item > a { border-radius: 10px; }
.lms-topic-sidebar-wrapper .lms-lesson-item.current > a,
.lms-topic-sidebar-wrapper .lms-topic-item.current > a {
    background: var(--pv-cream) !important; box-shadow: inset 3px 0 0 var(--pv-gold-2);
    color: var(--pv-ink) !important; font-weight: 700;
}
.lms-topic-sidebar-wrapper .bb-lms-section-title,
.lms-topic-sidebar-wrapper .lms-lessions-section,
.lms-topic-sidebar-wrapper .ld-lesson-section-heading { font-size: 12px !important; font-weight: 800 !important; letter-spacing: .12em; text-transform: uppercase; color: var(--pv-gold) !important; }
.lms-topic-sidebar-wrapper .bb-completed-item .bb-lms-status-icon,
.lms-topic-sidebar-wrapper .bb-completed-item .ld-status-icon,
.lms-topic-sidebar-wrapper .ld-status-complete { background: var(--pv-gold) !important; border-color: var(--pv-gold) !important; }

/* ── Header: title in the serif, steps and buttons in brand colours ── */
#learndash-course-header .lms-header-title h1 {
    font-family: var(--pv-serif) !important; font-weight: 600 !important;
    font-size: clamp(26px, 3vw, 34px) !important; line-height: 1.15 !important; color: var(--pv-ink) !important;
}
#learndash-course-header,
#learndash-course-header .lms-header-instructor { font-family: var(--pv-sans) !important; }
#learndash-course-header .bb-ld-status .ld-status,
#learndash-course-header .ld-status-complete {
    background: var(--pv-cream) !important; color: var(--pv-gold) !important;
    border: 1px solid var(--pv-gold-2) !important; border-radius: 999px !important; font-weight: 800 !important;
}
#learndash-course-header .next-link,
#learndash-course-header .prev-link,
#learndash-course-header .learndash_next_prev_link a { border-radius: 999px !important; }
#learndash-course-header .next-link { background: var(--pv-ink) !important; color: #fff !important; }

/* Mark Complete / Next buttons in the lesson body */
.learndash-wrapper .learndash_mark_complete_button,
.learndash-wrapper #learndash_mark_complete_button,
.learndash-wrapper .ld-content-action .ld-button,
.learndash-wrapper .wpProQuiz_button,
.learndash-wrapper .ld-button:not(.ld-button-reverse):not(.ld-button-transparent) {
    background: var(--pv-ink) !important; color: #fff !important; border-radius: 999px !important;
    font-family: var(--pv-sans) !important; font-weight: 700 !important;
}
.learndash-wrapper .learndash_mark_complete_button:hover,
.learndash-wrapper .ld-button:not(.ld-button-reverse):not(.ld-button-transparent):hover { background: var(--pv-navy-2) !important; }

/* Quizzes */
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem label { border-radius: 12px !important; border-color: var(--pv-hair) !important; }
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem label.is-selected,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem label:hover { border-color: var(--pv-gold-2) !important; background: var(--pv-cream) !important; }

/* Cormorant draws old-style figures ("1.1.1" looked like small caps): use lining numerals on titles. */
#learndash-course-header .lms-header-title h1,
.lms-topic-sidebar-wrapper { font-variant-numeric: lining-nums; }

/* ── Floating lesson video (bfu-learn.js): after play, it follows the member at the top right ── */
.bfu-float-holder { height: 0; }
.bfu-float-mark { height: 1px; margin-top: -1px; pointer-events: none; }
.bfu-float-bar { display: none; }
.bfu-float {
    position: fixed !important; z-index: 99990 !important;
    top: 88px !important; right: 24px !important; left: auto !important; bottom: auto !important;
    width: min(400px, 38vw) !important; max-width: none !important; height: auto !important;
    margin: 0 !important; padding: 0 !important;
    display: block !important; aspect-ratio: auto !important; min-height: 0 !important; max-height: none !important;
    border-radius: 14px !important; overflow: hidden !important; background: #000 !important;
    box-shadow: 0 0 0 2px var(--pv-gold-2), 0 22px 50px rgba(0, 23, 67, .35) !important;
    animation: bfu-float-in .22s ease-out;
}
body.admin-bar .bfu-float { top: 120px !important; }
.bfu-float > *:not(.bfu-float-bar) { margin: 0 !important; width: 100% !important; max-width: none !important; }
.bfu-float iframe, .bfu-float video, .bfu-float presto-player {
    display: block !important; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0 !important;
}
.bfu-float .fluid-width-video-wrapper { padding-top: 56.25% !important; }
.bfu-float .fluid-width-video-wrapper iframe { position: absolute !important; inset: 0 !important; height: 100% !important; }
.bfu-float .bfu-float-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; box-sizing: border-box;
    padding: 6px 8px 6px 12px; background: var(--pv-ink); font-family: var(--pv-sans);
}
.bfu-float .bfu-float-bar button {
    all: unset; cursor: pointer; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.bfu-float .bfu-float-back { color: var(--pv-gold-lt) !important; }
.bfu-float .bfu-float-close { width: 26px; height: 26px; border-radius: 50%; text-align: center; line-height: 26px; font-size: 18px !important; background: rgba(255, 255, 255, .12); }
.bfu-float .bfu-float-close:hover { background: rgba(255, 255, 255, .25); }
@keyframes bfu-float-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
    .bfu-float { top: 64px !important; right: 8px !important; width: 62vw !important; border-radius: 12px !important; }
    body.admin-bar .bfu-float { top: 110px !important; }
}
@media (prefers-reduced-motion: reduce) { .bfu-float { animation: none; } }

/* One lesson header (George, 2026-09-29): when a lesson has the navy lesson card, the card carries the
   lesson number and title, and the separate grey title above it is hidden. */
body:has(.bfu-lesson-head) #learndash-course-header .lms-header-title h1 { display: none !important; }
.bfu-lesson-head .bfu-lesson-num {
    display: inline-block; margin-right: .35em; color: var(--pv-gold-lt, #F0C040);
    font-variant-numeric: lining-nums; font-weight: inherit;
}

/* Close the gap left by the hidden title. */
body:has(.bfu-lesson-head) #learndash-course-header .lms-header-title { display: none !important; }
