/* Cabin Crew Blueprint — Student Lesson View */

/* ── Custom properties ──────────────────────────────────────────────────────── */

:root {
    --e4e-black:   #111827;
    --e4e-pink:    #e91e8c;
    --e4e-grey:    #6b7280;
    --e4e-light:   #f9fafb;
    --e4e-white:   #ffffff;
    --e4e-border:  rgba(107, 114, 128, 0.15);
    --e4e-border2: rgba(107, 114, 128, 0.25);
    --e4e-sidebar: 280px;
    --e4e-radius:  12px;
    --e4e-shadow:  0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ── Base reset ─────────────────────────────────────────────────────────────── */

body.e4e-lesson-page {
    margin: 0;
    padding: 0;
    background: var(--e4e-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px;
    color: var(--e4e-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.e4e-lesson-page *,
body.e4e-lesson-page *::before,
body.e4e-lesson-page *::after {
    box-sizing: border-box;
}

body.e4e-lesson-page a { color: inherit; }
body.e4e-lesson-page img { max-width: 100%; display: block; }
body.e4e-lesson-page button { font-family: inherit; }
body.e4e-lesson-page p { margin: 0 0 1em; }
body.e4e-lesson-page p:last-child { margin-bottom: 0; }
body.e4e-lesson-page ul, body.e4e-lesson-page ol { margin: 0; padding: 0; list-style: none; }

/* ── App layout ─────────────────────────────────────────────────────────────── */

/* ── Theme-header height offset ─────────────────────────────────────────────
   JS in single-e4e_lesson.php measures #masthead and writes
   --e4e-nav-h to :root. This handles both the admin bar + theme nav together.
   Default 0px works on standalone embed (no theme nav).
   ─────────────────────────────────────────────────────────────────────────── */
:root { --e4e-nav-h: 0px; }

.e4e-app {
    display: flex;
    /* min-height excludes the theme nav so there's no double scroll */
    min-height: calc(100vh - var(--e4e-nav-h));
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */

.e4e-sidebar {
    width: var(--e4e-sidebar);
    flex-shrink: 0;
    background: var(--e4e-black);
    color: #d1d5db;
    /* Offset below the theme navigation header */
    height: calc(100vh - var(--e4e-nav-h));
    position: fixed;
    top: var(--e4e-nav-h);
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
    /* Above everything except the theme's sticky nav (z-index:9999999) */
    z-index: 9999998;
}
.e4e-sidebar::-webkit-scrollbar { width: 4px; }
.e4e-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.e4e-sidebar-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}

/* ← Return to website link */
.e4e-sidebar-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255,255,255,.35);
    text-decoration: none;
    transition: color .15s;
}
.e4e-sidebar-back-link svg { flex-shrink: 0; transition: transform .15s; }
.e4e-sidebar-back-link:hover { color: rgba(255,255,255,.75); }
.e4e-sidebar-back-link:hover svg { transform: translateX(-2px); }

/* Course title row (title + close btn on same line) */
.e4e-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.e4e-sidebar-course-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e4e-sidebar-course-title:hover { color: var(--e4e-pink); }

/* ── Sidebar Orchids CTA ─────────────────────────────────────────────────────── */

.e4e-sidebar-orchids {
    margin-top: auto;
    padding: 20px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(233,30,140,.06);
    flex-shrink: 0;
}

.e4e-sidebar-orchids-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 6px;
}

.e4e-sidebar-orchids-sub {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    line-height: 1.55;
    margin-bottom: 14px;
}

.e4e-sidebar-orchids-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: var(--e4e-pink);
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    transition: background .15s;
}
.e4e-sidebar-orchids-btn:hover { background: #c9176e; }

.e4e-sidebar-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
}
.e4e-sidebar-close-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* Progress bar in sidebar */
.e4e-sidebar-progress {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}
.e4e-progress-track {
    background: rgba(255,255,255,.1);
    border-radius: 99px;
    height: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.e4e-progress-fill {
    background: var(--e4e-pink);
    height: 100%;
    border-radius: 99px;
    transition: width .4s ease;
}
.e4e-progress-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

/* Module groups */
.e4e-sidebar-nav {
    flex: 1;
    padding: 8px 0 24px;
    overflow-y: auto;
}

.e4e-sidebar-module { border-bottom: 1px solid rgba(255,255,255,.05); }

.e4e-sidebar-module-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}
.e4e-sidebar-module-btn:hover { background: rgba(255,255,255,.05); color: #fff; }

.e4e-sidebar-module-info { flex: 1; min-width: 0; }

.e4e-sidebar-module-num {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--e4e-pink);
    margin-bottom: 2px;
}
.e4e-sidebar-module-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.e4e-sidebar-module-chevron {
    color: #6b7280;
    flex-shrink: 0;
    transition: transform .2s;
    display: flex;
}
.e4e-sidebar-module.is-open .e4e-sidebar-module-chevron { transform: rotate(90deg); }

/* Lesson list (accordion) */
.e4e-sidebar-lessons {
    display: none;
    padding: 4px 0 8px;
    background: rgba(0,0,0,.2);
}
.e4e-sidebar-lessons.is-open { display: block; }

.e4e-sidebar-module-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    text-decoration: none;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255,255,255,.05);
    border-left: 2px solid transparent;
    transition: background .12s, color .12s;
}
.e4e-sidebar-module-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.e4e-sidebar-module-link.is-active {
    background: rgba(233, 30, 140, 0.1);
    color: #fff;
    border-left-color: var(--e4e-pink);
}
.e4e-sidebar-module-link.is-active .e4e-sidebar-module-title { color: #fff; }
.e4e-sidebar-module-link.is-done { color: #6ee7b7; }
.e4e-sidebar-module-link.is-done .e4e-sidebar-module-title { color: #6ee7b7; }
.e4e-sidebar-module-link.is-done.is-active { color: #6ee7b7; }
.e4e-sidebar-module-link .e4e-sidebar-module-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.4;
}

.e4e-sidebar-lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 20px;
    text-decoration: none;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    transition: background .12s, color .12s;
    border-left: 2px solid transparent;
}
.e4e-sidebar-lesson:hover { background: rgba(255,255,255,.05); color: #e5e7eb; }
.e4e-sidebar-lesson.is-active {
    background: rgba(233, 30, 140, 0.1);
    color: #fff;
    border-left-color: var(--e4e-pink);
}
.e4e-sidebar-lesson.is-done { color: #6ee7b7; }
.e4e-sidebar-lesson.is-done.is-active { color: #6ee7b7; }

.e4e-lesson-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}
.e4e-lesson-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: block;
}
.e4e-sidebar-lesson.is-active .e4e-lesson-dot { background: var(--e4e-pink); }

.e4e-lesson-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile backdrop */
.e4e-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--e4e-nav-h); /* sits below the theme nav */
    background: rgba(0, 0, 0, .5);
    z-index: 9999997; /* just below sidebar */
    backdrop-filter: blur(2px);
}
.e4e-backdrop.is-visible { display: block; }

/* Mobile sidebar override — use transform so clipping / overflow-x: hidden
   on parent elements can't cut the panel. */
@media (max-width: 1023px) {
    .e4e-lesson-page .e4e-app { overflow-x: clip; } /* prevent horizontal scroll during animation */
    .e4e-sidebar {
        /* Stay at left: 0, hide via transform  */
        left: 0;
        transform: translateX( calc(-1 * var(--e4e-sidebar) - 4px) ); /* extra 4px hides shadow edge */
        transition: transform .28s cubic-bezier(.4, 0, .2, 1);
        will-change: transform;
    }
    .e4e-sidebar.is-open {
        transform: translateX(0);
    }
}
@media (min-width: 1024px) {
    .e4e-sidebar-close-btn { display: none; }
    .e4e-main { margin-left: var(--e4e-sidebar); }
}

/* ── Main ───────────────────────────────────────────────────────────────────── */

.e4e-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    /* margin-left added at ≥1024px only — see media query below */
}

/* Sticky top bar — offset below the theme nav */
.e4e-main-header {
    position: sticky;
    top: var(--e4e-nav-h);
    z-index: 30;
    background: var(--e4e-white);
    border-bottom: 1px solid var(--e4e-border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.e4e-menu-toggle {
    background: none;
    border: none;
    color: var(--e4e-black);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .12s;
}
.e4e-menu-toggle:hover { color: var(--e4e-pink); }
@media (min-width: 1024px) { .e4e-menu-toggle { display: none; } }

.e4e-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--e4e-grey);
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.e4e-bc-link {
    color: var(--e4e-grey);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.e4e-bc-link:hover { color: var(--e4e-black); text-decoration: underline; }
.e4e-bc-sep { flex-shrink: 0; display: flex; color: var(--e4e-grey); opacity: .5; }
.e4e-bc-module {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    flex-shrink: 1;
}
.e4e-bc-current {
    font-weight: 700;
    color: var(--e4e-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}
@media (max-width: 600px) {
    .e4e-bc-link { display: none; }
    .e4e-bc-sep:first-of-type { display: none; }
    .e4e-bc-module { max-width: 130px; }
}

/* Main content area */
.e4e-main-inner {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    padding: 28px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (max-width: 600px) { .e4e-main-inner { padding: 20px 16px 60px; } }

/* ── Cards (shared) ─────────────────────────────────────────────────────────── */

.e4e-module-intro,
.e4e-tabs-card,
.e4e-discussion {
    background: var(--e4e-white);
    border-radius: var(--e4e-radius);
    border: 1px solid var(--e4e-border);
    box-shadow: var(--e4e-shadow);
    overflow: hidden;
}

/* ── Gate card ──────────────────────────────────────────────────────────────── */

.e4e-gate-card {
    background: var(--e4e-white);
    border-radius: var(--e4e-radius);
    border: 1px solid var(--e4e-border);
    box-shadow: var(--e4e-shadow);
    padding: 48px 32px;
    text-align: center;
}
.e4e-gate-icon {
    width: 56px;
    height: 56px;
    background: rgba(233, 30, 140, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--e4e-pink);
}
.e4e-gate-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.e4e-gate-card p  { color: var(--e4e-grey); margin-bottom: 24px; }
.e4e-gate-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.e4e-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1;
}
.e4e-btn--primary {
    background: var(--e4e-black);
    color: #fff !important;
    border-color: var(--e4e-black);
    text-decoration: none !important;
}
.e4e-btn--primary:hover {
    background: var(--e4e-pink);
    border-color: var(--e4e-pink);
    color: #fff !important;
}
.e4e-btn--secondary {
    background: transparent;
    color: var(--e4e-black);
    border-color: var(--e4e-border2);
}
.e4e-btn--secondary:hover { background: var(--e4e-light); }
.e4e-btn--outline {
    background: transparent;
    color: var(--e4e-grey);
    border-color: var(--e4e-border2);
}
.e4e-btn--outline:hover { border-color: var(--e4e-pink); color: var(--e4e-pink); }
.e4e-btn--small { padding: 6px 14px; font-size: 12px; }
.e4e-btn--cta { padding: 14px 32px; font-size: 15px; }

/* ── Module intro ───────────────────────────────────────────────────────────── */

.e4e-module-intro {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
}
.e4e-module-intro-icon {
    width: 40px;
    height: 40px;
    background: rgba(233, 30, 140, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--e4e-black);
    margin-top: 2px;
}
.e4e-module-intro-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.e4e-module-intro-text  { font-size: 13px; color: var(--e4e-grey); line-height: 1.65; }

/* ── Content player ─────────────────────────────────────────────────────────── */

.e4e-player {
    border-radius: var(--e4e-radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .15);
    background: var(--e4e-black);
    position: relative;
}

.e4e-player-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    overflow: hidden;
}
.e4e-player-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
    transition: opacity .2s;
}
.e4e-player-thumb:hover .e4e-player-bg { opacity: .45; }
.e4e-player-bg--placeholder { background: linear-gradient(135deg, #1f2937 0%, #374151 100%); }
.e4e-player-bg.e4e-player-preview {
    pointer-events: none;
    object-fit: cover;
}

.e4e-player-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 64px;
    height: 64px;
    background: var(--e4e-pink);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233, 30, 140, .45);
    transition: transform .18s, box-shadow .18s;
    padding-left: 3px;
}
.e4e-player-thumb:hover .e4e-player-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 28px rgba(233, 30, 140, .6);
}

.e4e-player-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.e4e-player-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.e4e-player-duration {
    font-size: 12px;
    color: rgba(255,255,255,.75);
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 12px;
}
.e4e-player-chapter {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,.85);
    font-weight: 500;
    margin-top: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* Embed iframe */
.e4e-player-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.e4e-player-embed iframe,
.e4e-player-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
    background: #000;
    -webkit-user-drag: none;
    user-drag: none;
}
.e4e-player-embed .e4e-vimeo-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.e4e-player-embed .e4e-vimeo-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Block Vimeo share control (no embed URL param exists for this). */
.e4e-vimeo-wrap {
    position: relative;
    overflow: hidden;
}
.e4e-vimeo-share-shield {
    position: absolute;
    right: 40px;
    bottom: 0;
    width: 48px;
    height: 44px;
    z-index: 2;
    cursor: default;
    background: transparent;
}

/* ── Content tabs ───────────────────────────────────────────────────────────── */

.e4e-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--e4e-border);
    overflow-x: auto;
    scrollbar-width: none;
}
.e4e-tabs-nav::-webkit-scrollbar { display: none; }

.e4e-tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--e4e-grey);
    cursor: pointer;
    white-space: nowrap;
    transition: color .12s;
    margin-bottom: -1px;
}
.e4e-tab-btn:hover { color: var(--e4e-black); }
.e4e-tab-btn.is-active { color: var(--e4e-black); border-bottom-color: var(--e4e-pink); }
.e4e-tab-btn svg { flex-shrink: 0; }

.e4e-tab-count {
    background: var(--e4e-light);
    color: var(--e4e-grey);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    line-height: 1.5;
}

.e4e-tabs-body {
    padding: 24px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--e4e-black);
}

.e4e-tab-pane { display: block; }
.e4e-tab-pane[hidden] { display: none; }

/* Shared labels / empty states inside tab panels */
.e4e-tab-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--e4e-black);
}
.e4e-tab-section-label svg {
    flex-shrink: 0;
    color: var(--e4e-pink);
}

body.e4e-lesson-page .e4e-tabs-body p {
    margin: 0 0 1em;
    font-size: 14px;
    line-height: 1.8;
    color: var(--e4e-black);
}
body.e4e-lesson-page .e4e-tabs-body p:last-child {
    margin-bottom: 0;
}

.e4e-tabs-body .e4e-empty {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--e4e-grey);
    font-style: italic;
}

/* Prose (notes / activity / rich lesson content) */
.e4e-tabs-body .e4e-prose,
.e4e-prose {
    font-size: 14px;
    line-height: 1.8;
    color: var(--e4e-black);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.e4e-tabs-body .e4e-prose p,
.e4e-prose p { margin: 0 0 1em; }
.e4e-tabs-body .e4e-prose p:last-child,
.e4e-prose p:last-child { margin-bottom: 0; }
.e4e-tabs-body .e4e-prose li,
.e4e-prose li { font-size: 14px; line-height: 1.8; }
.e4e-prose h1, .e4e-prose h2, .e4e-prose h3, .e4e-prose h4 {
    font-weight: 700;
    margin: 1.4em 0 .5em;
    line-height: 1.35;
    color: var(--e4e-black);
}
.e4e-prose h1 { font-size: 1.35em; }
.e4e-prose h2 { font-size: 1.2em; }
.e4e-prose h3 { font-size: 1.05em; }

/* Lists — must beat body-level list reset on lesson/course pages */
body.e4e-lesson-page .e4e-prose ul,
body.e4e-lesson-page .e4e-prose ol,
body.e4e-course-page .e4e-prose ul,
body.e4e-course-page .e4e-prose ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
    list-style-position: outside;
}
body.e4e-lesson-page .e4e-prose ul,
body.e4e-course-page .e4e-prose ul {
    list-style-type: disc;
}
body.e4e-lesson-page .e4e-prose ol,
body.e4e-course-page .e4e-prose ol {
    list-style-type: decimal;
}
body.e4e-lesson-page .e4e-prose ul ul,
body.e4e-course-page .e4e-prose ul ul {
    list-style-type: circle;
    margin-top: .35em;
    margin-bottom: .35em;
}
body.e4e-lesson-page .e4e-prose li,
body.e4e-course-page .e4e-prose li {
    display: list-item;
    margin-bottom: .45em;
    padding-left: .15em;
}
body.e4e-lesson-page .e4e-prose li:last-child,
body.e4e-course-page .e4e-prose li:last-child {
    margin-bottom: 0;
}

/* Tables */
body.e4e-lesson-page .e4e-prose table,
body.e4e-course-page .e4e-prose table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    margin: 1em 0 1.25em;
    font-size: 13px;
    line-height: 1.55;
    background: var(--e4e-white);
    border: 1px solid var(--e4e-border);
    border-radius: 8px;
    overflow: hidden;
}
body.e4e-lesson-page .e4e-prose thead,
body.e4e-course-page .e4e-prose thead {
    background: #f3f4f6;
}
body.e4e-lesson-page .e4e-prose th,
body.e4e-lesson-page .e4e-prose td,
body.e4e-course-page .e4e-prose th,
body.e4e-course-page .e4e-prose td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--e4e-border);
    border-right: 1px solid var(--e4e-border);
}
body.e4e-lesson-page .e4e-prose th:last-child,
body.e4e-lesson-page .e4e-prose td:last-child,
body.e4e-course-page .e4e-prose th:last-child,
body.e4e-course-page .e4e-prose td:last-child {
    border-right: none;
}
body.e4e-lesson-page .e4e-prose tr:last-child td,
body.e4e-course-page .e4e-prose tr:last-child td {
    border-bottom: none;
}
body.e4e-lesson-page .e4e-prose th,
body.e4e-course-page .e4e-prose th {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--e4e-black);
}
body.e4e-lesson-page .e4e-prose td,
body.e4e-course-page .e4e-prose td {
    color: var(--e4e-black);
}
body.e4e-lesson-page .e4e-prose tbody tr:nth-child(even) td,
body.e4e-course-page .e4e-prose tbody tr:nth-child(even) td {
    background: #fafafa;
}

.e4e-prose strong { font-weight: 700; }
.e4e-prose a { color: var(--e4e-pink); text-decoration: underline; }
.e4e-prose a:hover { text-decoration: none; }

/* Tab panel attachments — match body copy scale */
.e4e-tabs-body .e4e-attachments {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.e4e-tabs-body .e4e-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--e4e-border);
    transition: border-color .15s;
    font-size: 14px;
    line-height: 1.5;
}
.e4e-tabs-body .e4e-attachment:hover { border-color: var(--e4e-pink); }
.e4e-tabs-body .e4e-attachment-icon {
    width: 40px;
    height: 40px;
    background: var(--e4e-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--e4e-grey);
    flex-shrink: 0;
    transition: color .15s;
}
.e4e-tabs-body .e4e-attachment:hover .e4e-attachment-icon { color: var(--e4e-pink); }
.e4e-tabs-body .e4e-attachment-info { flex: 1; min-width: 0; }
.e4e-tabs-body .e4e-attachment-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--e4e-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.e4e-tabs-body .e4e-attachment-type {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--e4e-grey);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .4px;
    margin-top: 2px;
}
.e4e-tabs-body .e4e-btn--small {
    padding: 7px 14px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

.e4e-empty {
    color: var(--e4e-grey);
    font-style: italic;
    font-size: 14px;
    line-height: 1.8;
}

/* Attachments (global fallback) */
.e4e-attachments { display: flex; flex-direction: column; gap: 10px; }
.e4e-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--e4e-border);
    transition: border-color .15s;
    font-size: 14px;
    line-height: 1.5;
}
.e4e-attachment:hover { border-color: var(--e4e-pink); }
.e4e-attachment-icon {
    width: 40px;
    height: 40px;
    background: var(--e4e-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--e4e-grey);
    flex-shrink: 0;
    transition: color .15s;
}
.e4e-attachment:hover .e4e-attachment-icon { color: var(--e4e-pink); }
.e4e-attachment-info { flex: 1; min-width: 0; }
.e4e-attachment-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--e4e-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.e4e-attachment-type {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--e4e-grey);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .4px;
    margin-top: 2px;
}

/* Activity */
.e4e-activity-box {
    background: var(--e4e-light);
    border: 1px solid var(--e4e-border);
    border-radius: 10px;
    padding: 20px 24px;
}
.e4e-activity-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--e4e-black);
    margin-bottom: 12px;
}
.e4e-activity-heading svg { color: var(--e4e-pink); }
.e4e-activity-text { font-size: 14px; }

/* ── CTA ────────────────────────────────────────────────────────────────────── */

.e4e-cta {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

/* ── Mark complete ──────────────────────────────────────────────────────────── */

.e4e-complete-wrap {
    display: flex;
    justify-content: flex-end;
    padding: 0 0 16px;
}
.e4e-complete-done {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #059669;
    padding: 8px 16px;
    background: #d1fae5;
    border-radius: 8px;
}
.e4e-complete-done svg { color: #059669; }

/* ── Discussion ─────────────────────────────────────────────────────────────── */

.e4e-discussion-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--e4e-border);
}
.e4e-discussion-head h3 { font-size: 16px; font-weight: 700; flex: 1; }
.e4e-discussion-count {
    background: var(--e4e-light);
    color: var(--e4e-grey);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
}

.e4e-discussion-body { padding: 20px 24px; }
.e4e-comments-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.e4e-discussion-empty {
    color: var(--e4e-grey);
    font-style: italic;
    font-size: 14px;
    text-align: center;
    padding: 16px 0;
}
.e4e-discussion-login {
    text-align: center;
    font-size: 13px;
    color: var(--e4e-grey);
    padding: 16px 0 0;
    border-top: 1px solid var(--e4e-border);
    margin-top: 16px;
}
.e4e-discussion-login a { color: var(--e4e-pink); font-weight: 600; }

/* Comment rows */
.e4e-comment {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
/* Shared avatar shell — works for both <img> and initials <div> */
.e4e-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--e4e-border);
}
/* Colour initials avatar */
.e4e-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border: none;
    user-select: none;
    letter-spacing: .02em;
}
.e4e-comment-content { flex: 1; min-width: 0; }

/* Inline error shown above comment form on post failure */
.e4e-comment-error {
    width: 100%;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 12px;
}
.e4e-comment-bubble {
    background: var(--e4e-light);
    border-radius: 0 12px 12px 12px;
    padding: 12px 16px;
}
.e4e-comment-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}
.e4e-comment-author { font-size: 13px; font-weight: 700; color: var(--e4e-black); }
.e4e-comment-time { font-size: 11px; color: var(--e4e-grey); white-space: nowrap; }
.e4e-comment-bubble p { font-size: 13px; line-height: 1.65; }

/* Add comment form */
.e4e-comment-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-top: 1px solid var(--e4e-border);
    padding-top: 20px;
}
.e4e-comment-input-wrap {
    flex: 1;
    position: relative;
}
.e4e-comment-textarea {
    width: 100%;
    background: var(--e4e-light);
    border: 1px solid var(--e4e-border);
    border-radius: 12px;
    padding: 12px 48px 12px 16px;
    font-size: 13px;
    font-family: inherit;
    color: var(--e4e-black);
    resize: none;
    min-height: 72px;
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.6;
}
.e4e-comment-textarea:focus {
    outline: none;
    border-color: var(--e4e-pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, .1);
}
.e4e-comment-textarea::placeholder { color: #9ca3af; }

.e4e-comment-submit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: var(--e4e-black);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.e4e-comment-submit:hover:not(:disabled) { background: var(--e4e-pink); }
.e4e-comment-submit:disabled { opacity: .4; cursor: not-allowed; }

/* ── Completion confirmation modal ──────────────────────────────────────────── */

/* Must sit above the theme's sticky nav (.sticky { z-index: 9999999 }) */
.e4e-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000001;
    align-items: center;
    justify-content: center;
}
.e4e-modal.is-open {
    display: flex;
}
.e4e-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    animation: e4eBackdropIn .2s ease;
}
.e4e-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    width: 92%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    animation: e4eBoxIn .22s cubic-bezier(.34,1.28,.64,1);
}
@keyframes e4eBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes e4eBoxIn {
    from { opacity: 0; transform: scale(.88) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.e4e-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
.e4e-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--e4e-black);
    margin: 0 0 10px;
}
.e4e-modal-body {
    font-size: 14px;
    color: var(--e4e-grey);
    line-height: 1.65;
    margin: 0 0 24px;
}
.e4e-modal-next-name {
    color: var(--e4e-black);
    font-weight: 700;
}
.e4e-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.e4e-modal-actions .e4e-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* ── Success overlay (shown after marking lesson/course complete) ────────────── */

.e4e-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000002; /* above modal */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.e4e-success-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.e4e-success-box {
    background: #fff;
    border-radius: 20px;
    padding: 44px 36px 36px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.22);
    transform: scale(.9);
    transition: transform .3s cubic-bezier(.34, 1.28, .64, 1);
}
.e4e-success-overlay.is-visible .e4e-success-box {
    transform: scale(1);
}
.e4e-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
/* Course-complete state: gold icon */
.e4e-success-overlay.is-course .e4e-success-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}
.e4e-success-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--e4e-black);
    margin: 0 0 8px;
    line-height: 1.25;
}
.e4e-success-sub {
    font-size: 14px;
    color: var(--e4e-grey);
    line-height: 1.6;
    margin: 0 0 24px;
}
/* Animated loading dots */
.e4e-success-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.e4e-success-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--e4e-pink);
    animation: e4eDot 1.2s infinite ease-in-out;
}
.e4e-success-dots span:nth-child(2) { animation-delay: .2s; }
.e4e-success-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes e4eDot {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40%            { transform: scale(1);  opacity: 1;   }
}

/* ── Legacy gate fallback (still used by the_content filter) ────────────────── */

.e4e-gate {
    background: var(--e4e-white);
    border: 1px solid var(--e4e-border);
    border-radius: var(--e4e-radius);
    padding: 32px;
    text-align: center;
    margin: 24px 0;
}
.e4e-gate p { margin-bottom: 16px; font-size: 15px; color: var(--e4e-grey); }

/* ═══════════════════════════════════════════════════════════════════════════
   Course Page  (body.e4e-course-page)
   ═══════════════════════════════════════════════════════════════════════════ */

body.e4e-course-page {
    margin: 0;
    padding: 0;
    background: var(--e4e-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px;
    color: var(--e4e-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Remove WP margin added by admin bar — handled per element */
    margin-top: 0 !important;
}
body.e4e-course-page *,
body.e4e-course-page *::before,
body.e4e-course-page *::after { box-sizing: border-box; }
body.e4e-course-page a { color: inherit; text-decoration: none; }
body.e4e-course-page img { max-width: 100%; display: block; }
body.e4e-course-page button { font-family: inherit; cursor: pointer; }
body.e4e-course-page p { margin: 0 auto 1em; }
body.e4e-course-page p:last-child { margin-bottom: 0; }
body.e4e-course-page ul, body.e4e-course-page ol { margin: 0; padding: 0; list-style: none; }
body.e4e-course-page h1,
body.e4e-course-page h2,
body.e4e-course-page h3 { margin: 0; line-height: 1.2; }

/* LMS pages use their own nav — hide the theme header logo/bar. */
body.e4e-course-page #masthead,
body.e4e-cabin-crew-blueprint-page #masthead {
    display: none;
}

/* ── Banner ──────────────────────────────────────────────────────────────────── */

.e4e-cp-banner {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--e4e-black);
    color: #fff;
    padding: 12px 24px;
}
body.admin-bar .e4e-cp-banner { top: 32px; }
@media (max-width: 782px) { body.admin-bar .e4e-cp-banner { top: 46px; } }

.e4e-cp-banner-inner {
    max-width: 1152px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 20px;
    font-size: 14px;
}

.e4e-cp-banner-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.e4e-cp-banner-label svg { color: var(--e4e-pink); }

.e4e-cp-banner-sep { color: rgba(255,255,255,.4); }
@media (max-width: 600px) { .e4e-cp-banner-sep { display: none; } }

.e4e-cp-banner-price {
    color: var(--e4e-pink);
    font-weight: 700;
    font-size: 16px;
}

.e4e-cp-banner-was {
    text-decoration: line-through;
    color: rgba(255,255,255,.35);
    margin-left: 6px;
    font-size: 13px;
}

.e4e-cp-banner-ends { font-size: 12px; color: rgba(255,255,255,.5); }

.e4e-cp-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--e4e-pink);
    color: var(--e4e-black);
    padding: 6px 14px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 12px;
    transition: background .15s;
}
.e4e-cp-banner-cta:hover { background: #fff; }

/* ── Hero ────────────────────────────────────────────────────────────────────── */

.e4e-cp-hero {
    background: var(--e4e-light);
    padding: 56px 24px 48px;
    text-align: center;
}

.e4e-cp-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.e4e-cp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--e4e-pink);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--e4e-black);
    margin-bottom: 24px;
}

.e4e-cp-hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.e4e-cp-hero-title-highlight {
    background: rgba(233,30,140,.35);
    padding: 0 6px;
    display: inline;
}

.e4e-cp-hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--e4e-black);
}

.e4e-cp-hero-desc {
    font-size: 15px;
    color: var(--e4e-grey);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* Price block */
.e4e-cp-price-block {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border: 2px solid var(--e4e-pink);
    border-radius: 18px;
    padding: 16px 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(233,30,140,.12);
    flex-wrap: wrap;
    justify-content: center;
}

.e4e-cp-price-block-left { text-align: left; }

.e4e-cp-price-block-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--e4e-grey);
    margin-bottom: 4px;
}

.e4e-cp-price-block-nums {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.e4e-cp-price-big {
    font-size: 36px;
    font-weight: 800;
    color: var(--e4e-black);
    line-height: 1;
}

.e4e-cp-price-was {
    font-size: 18px;
    font-weight: 500;
    color: var(--e4e-grey);
    text-decoration: line-through;
}

.e4e-cp-price-block-divider {
    width: 1px;
    height: 48px;
    background: rgba(107,114,128,.2);
    flex-shrink: 0;
}

.e4e-cp-price-block-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--e4e-black);
    color: #fff !important;
    padding: 13px 22px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 6px;
    transition: background .15s, color .15s;
    white-space: nowrap;
    text-decoration: none !important;
}
.e4e-cp-price-block-btn:hover { background: var(--e4e-pink); color: var(--e4e-black) !important; }

/* Enrolled hero state */
.e4e-cp-enrolled-hero {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: center;
    background: #fff;
    border: 2px solid var(--e4e-pink);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 32px;
    font-weight: 600;
    font-size: 14px;
}
.e4e-cp-enrolled-hero svg { color: var(--e4e-pink); }

/* Video player */
.e4e-cp-video {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 18px;
    overflow: hidden;
    background: var(--e4e-black);
    margin-bottom: 32px;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    max-width: 896px;
    margin-left: auto;
    margin-right: auto;
}

.e4e-cp-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .7;
    transition: opacity .2s;
}
.e4e-cp-video:hover .e4e-cp-video-thumb { opacity: .55; }
.e4e-cp-video-thumb--placeholder { background: linear-gradient(135deg, #1f2937 0%, #374151 100%); }

.e4e-cp-video-bg,
.e4e-cp-video-bg-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.e4e-cp-video-bg {
    object-fit: cover;
    background: #000;
}
.e4e-cp-video-bg-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}
.e4e-cp-video.has-preview .e4e-cp-video-thumb { display: none; }
.e4e-cp-video.is-playing { cursor: default; }
.e4e-cp-video.is-playing .e4e-cp-video-play-btn,
.e4e-cp-video.is-playing .e4e-cp-video-footer { display: none; }
.e4e-cp-video.is-playing .e4e-cp-video-embed {
    z-index: 3;
}

.e4e-cp-video-play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 88px;
    height: 88px;
    background: var(--e4e-pink);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--e4e-black);
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    transition: transform .2s;
    cursor: pointer;
    z-index: 2;
}
.e4e-cp-video:hover .e4e-cp-video-play-btn { transform: scale(1.08); }

.e4e-cp-video-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
    text-align: left;
    z-index: 2;
}
.e4e-cp-video-footer-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: rgba(255,255,255,.6);
    margin-bottom: 4px;
}
.e4e-cp-video-footer-title { font-weight: 700; font-size: 18px; color: #fff; }

.e4e-cp-video-embed {
    position: absolute;
    inset: 0;
}
.e4e-cp-video-embed iframe,
.e4e-cp-video-embed video,
.e4e-cp-video-embed .e4e-vimeo-wrap {
    width: 100%;
    height: 100%;
    border: none;
}
.e4e-cp-video-embed .e4e-vimeo-wrap {
    position: absolute;
    inset: 0;
}
.e4e-cp-video-embed .e4e-vimeo-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Stats row */
.e4e-cp-stats-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 28px;
    font-size: 14px;
    color: var(--e4e-grey);
}

.e4e-cp-stat {
    display: flex;
    align-items: center;
    gap: 7px;
}
.e4e-cp-stat svg { color: var(--e4e-pink); flex-shrink: 0; }
.e4e-cp-stat--star svg { fill: var(--e4e-pink); }
.e4e-cp-stars { display: inline-flex; align-items: center; gap: 2px; margin: 0; }
span.e4e-cp-stars { margin: 0; }
.e4e-cp-stars svg { color: var(--e4e-pink); fill: var(--e4e-pink); }
.e4e-cp-stat strong { color: var(--e4e-black); }

/* ── Trust bar ───────────────────────────────────────────────────────────────── */

.e4e-cp-trust {
    background: #fff;
    border-top: 1px solid rgba(107,114,128,.15);
    border-bottom: 1px solid rgba(107,114,128,.15);
    padding: 32px 24px;
}

.e4e-cp-trust-inner { max-width: 1152px; margin: 0 auto; }

.e4e-cp-trust-label {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--e4e-grey);
    margin-bottom: 20px;
}

.e4e-cp-airlines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 28px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .08em;
    color: rgba(107,114,128,.6);
}

.e4e-cp-airline-sep { color: rgba(107,114,128,.25); }

/* ── Shared section layout ───────────────────────────────────────────────────── */

.e4e-cp-section-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 24px;
}

.e4e-cp-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.e4e-cp-section-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--e4e-grey);
    margin-bottom: 12px;
}

.e4e-cp-section-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 16px;
    color: var(--e4e-black);
}

.e4e-cp-section-sub {
    font-size: 15px;
    color: var(--e4e-grey);
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto;
}

/* ── About ───────────────────────────────────────────────────────────────────── */

.e4e-cp-about { padding: 80px 0; }

.e4e-cp-about-desc {
    font-size: 15px;
    color: var(--e4e-grey);
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

.e4e-cp-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 700px) { .e4e-cp-features { grid-template-columns: 1fr; } }
@media (min-width: 701px) and (max-width: 900px) { .e4e-cp-features { grid-template-columns: repeat(2, 1fr); } }

.e4e-cp-feature {
    background: #fff;
    border: 1px solid rgba(107,114,128,.12);
    border-radius: 18px;
    padding: 32px;
}

.e4e-cp-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(233,30,140,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--e4e-black);
}

.e4e-cp-feature h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--e4e-black);
}

.e4e-cp-feature p {
    font-size: 14px;
    color: var(--e4e-grey);
    line-height: 1.65;
}

/* ── Curriculum ──────────────────────────────────────────────────────────────── */

.e4e-cp-curriculum-section {
    background: #fff;
    border-top: 1px solid rgba(107,114,128,.15);
    border-bottom: 1px solid rgba(107,114,128,.15);
    padding: 80px 0;
}

.e4e-cp-modules { display: flex; flex-direction: column; gap: 12px; }

.e4e-cp-mod-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid rgba(107,114,128,.18);
    border-radius: 14px;
    padding: 20px;
    transition: border-color .15s;
    cursor: default;
}
.e4e-cp-mod-card:hover { border-color: var(--e4e-pink); }

.e4e-cp-mod-num {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--e4e-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--e4e-black);
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.e4e-cp-mod-card:hover .e4e-cp-mod-num {
    background: var(--e4e-pink);
    color: var(--e4e-black);
}

.e4e-cp-mod-body { flex: 1; min-width: 0; }

.e4e-cp-mod-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--e4e-black);
    margin-bottom: 6px;
}

.e4e-cp-mod-intro {
    font-size: 13px;
    color: var(--e4e-grey);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.e4e-cp-mod-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--e4e-grey);
}
.e4e-cp-mod-meta svg { color: var(--e4e-grey); }

.e4e-cp-mod-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.e4e-cp-mod-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: var(--e4e-pink);
    cursor: pointer;
    white-space: nowrap;
}
.e4e-cp-mod-expand-btn svg { transition: transform .2s; }
.e4e-cp-mod-card.is-open .e4e-cp-mod-expand-btn svg { transform: rotate(180deg); }

.e4e-cp-mod-lessons {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.e4e-cp-mod-card.is-open .e4e-cp-mod-lessons { display: block; }

.e4e-cp-mod-lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.e4e-cp-mod-lesson-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
}
.e4e-cp-mod-lesson-item svg { color: var(--e4e-pink); flex-shrink: 0; }

.e4e-cp-mod-loading {
    font-size: 13px;
    color: var(--e4e-grey);
    display: block;
    padding: 4px 0;
}

/* ── Testimonials ────────────────────────────────────────────────────────────── */

.e4e-cp-testimonials { padding: 80px 0; }

.e4e-cp-testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 700px) { .e4e-cp-testimonial-grid { grid-template-columns: 1fr; } }
@media (min-width: 701px) and (max-width: 900px) { .e4e-cp-testimonial-grid { grid-template-columns: repeat(2, 1fr); } }

.e4e-cp-testimonial {
    background: #fff;
    border: 1px solid rgba(107,114,128,.12);
    border-radius: 18px;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.e4e-cp-stars {
    display: flex;
    gap: 3px;
    color: var(--e4e-pink);
    margin-bottom: 16px;
}

.e4e-cp-t-quote {
    font-size: 14px;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 24px;
    color: var(--e4e-black);
}

.e4e-cp-t-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.e4e-cp-t-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.e4e-cp-t-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e91e8c, #a855f7);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.e4e-cp-t-name { font-size: 14px; font-weight: 700; color: var(--e4e-black); }
.e4e-cp-t-role { font-size: 12px; color: var(--e4e-grey); }

/* ── Enrollment CTA ──────────────────────────────────────────────────────────── */

.e4e-cp-enroll-section {
    background: var(--e4e-black);
    color: #fff;
    padding: 80px 24px;
}

.e4e-cp-enroll-inner {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.e4e-cp-enroll-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--e4e-pink);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--e4e-black);
    margin-bottom: 24px;
}

.e4e-cp-enroll-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 20px;
    color: #fff;
}

.e4e-cp-enroll-sub {
    font-size: 15px;
    color: rgba(255,255,255,.6);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Perks */
.e4e-cp-perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 40px;
    text-align: left;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 520px) { .e4e-cp-perks { grid-template-columns: 1fr; } }

.e4e-cp-perk {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.e4e-cp-perk svg { color: var(--e4e-pink); flex-shrink: 0; margin-top: 2px; }
.e4e-cp-perk span { font-size: 14px; color: rgba(255,255,255,.85); line-height: 1.5; }

/* Enrollment card */
.e4e-cp-enroll-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    color: var(--e4e-black);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}

.e4e-cp-enrolled-badge-dark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--e4e-pink);
    background: rgba(233,30,140,.08);
    border-radius: 99px;
    padding: 6px 14px;
    margin-bottom: 16px;
}

.e4e-cp-enroll-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.e4e-cp-prog-track {
    height: 6px;
    background: rgba(107,114,128,.15);
    border-radius: 99px;
    overflow: hidden;
}
.e4e-cp-prog-fill { height: 100%; background: var(--e4e-pink); border-radius: 99px; transition: width .4s; }
.e4e-cp-prog-label { font-size: 12px; color: var(--e4e-grey); text-align: left; }

.e4e-cp-enroll-timing {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--e4e-grey);
    margin-bottom: 12px;
}

.e4e-cp-enroll-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.e4e-cp-enroll-price-big {
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
    color: var(--e4e-black);
}

.e4e-cp-enroll-price-was {
    font-size: 22px;
    font-weight: 500;
    color: var(--e4e-grey);
    text-decoration: line-through;
}

.e4e-cp-enroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--e4e-black);
    color: #fff !important;
    padding: 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    transition: background .15s, color .15s;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
}
.e4e-cp-enroll-btn:hover {
    background: var(--e4e-pink);
    color: var(--e4e-black) !important;
}

.e4e-cp-enroll-login {
    font-size: 12px;
    color: var(--e4e-grey);
    margin-top: 12px;
}
.e4e-cp-enroll-login a { color: var(--e4e-pink); font-weight: 600; }
.e4e-cp-enroll-login a:hover { text-decoration: underline; }

.e4e-cp-enroll-guarantee {
    font-size: 12px;
    color: var(--e4e-grey);
    margin-top: 16px;
}

/* ── Return to website bar ───────────────────────────────────────────────────── */

.e4e-cp-return-bar {
    background: #f8f7f5;
    border-bottom: 1px solid rgba(107,114,128,.12);
    padding: 12px 32px;
}

.e4e-cp-return-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--e4e-grey);
    text-decoration: none;
    transition: color .15s;
}
.e4e-cp-return-btn svg { flex-shrink: 0; transition: transform .15s; }
.e4e-cp-return-btn:hover { color: var(--e4e-black); }
.e4e-cp-return-btn:hover svg { transform: translateX(-3px); }

/* ── Orchids booking CTA ─────────────────────────────────────────────────────── */

.e4e-cp-orchids-section {
    background: linear-gradient(135deg, #fdf6fb 0%, #fef0f7 100%);
    border-top: 1px solid rgba(233,30,140,.1);
    border-bottom: 1px solid rgba(233,30,140,.1);
    padding: 72px 24px;
}

.e4e-cp-orchids-inner {
    max-width: 660px;
    margin: 0 auto;
    text-align: center;
}

.e4e-cp-orchids-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--e4e-pink);
    border-radius: 18px;
    color: #fff;
    margin-bottom: 24px;
}

.e4e-cp-orchids-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--e4e-pink);
    margin-bottom: 14px;
}

.e4e-cp-orchids-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: var(--e4e-black);
    margin-bottom: 18px;
}

.e4e-cp-orchids-sub {
    font-size: 15px;
    line-height: 1.75;
    color: var(--e4e-grey);
    max-width: 520px;
    margin: 0 auto 32px;
}

.e4e-cp-orchids-feats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    max-width: 440px;
    margin: 0 auto 36px;
    text-align: left;
}
@media (max-width: 480px) { .e4e-cp-orchids-feats { grid-template-columns: 1fr; } }

.e4e-cp-orchids-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--e4e-black);
}
.e4e-cp-orchids-feat svg { color: var(--e4e-pink); flex-shrink: 0; }

.e4e-cp-orchids-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--e4e-pink);
    color: #fff !important;
    text-decoration: none !important;
    padding: 15px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 8px 24px rgba(233,30,140,.28);
    margin-bottom: 16px;
}
.e4e-cp-orchids-btn:hover {
    background: #c9176e;
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(233,30,140,.36);
}

.e4e-cp-orchids-note {
    font-size: 12px;
    color: var(--e4e-grey);
    letter-spacing: .02em;
}

/* ── Orchids compact card (lesson page) ──────────────────────────────────────── */

.e4e-orchids-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #fdf6fb 0%, #fef0f7 100%);
    border: 1px solid rgba(233,30,140,.18);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 40px;
}
@media (max-width: 600px) {
    .e4e-orchids-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
}

.e4e-orchids-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--e4e-pink);
    border-radius: 14px;
    color: #fff;
}

.e4e-orchids-card-body { flex: 1; min-width: 0; }

.e4e-orchids-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--e4e-black);
    margin-bottom: 4px;
}

.e4e-orchids-card-sub {
    font-size: 13px;
    color: var(--e4e-grey);
    line-height: 1.55;
}

.e4e-orchids-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: var(--e4e-pink);
    color: #fff !important;
    text-decoration: none !important;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s, transform .15s;
    box-shadow: 0 4px 16px rgba(233,30,140,.25);
}
.e4e-orchids-card-btn:hover {
    background: #c9176e;
    transform: translateY(-1px);
}

/* ── Prose (course page description) ────────────────────────────────────────── */

body.e4e-course-page .e4e-prose p { font-size: 15px; color: var(--e4e-grey); line-height: 1.75; }
body.e4e-course-page .e4e-prose h2,
body.e4e-course-page .e4e-prose h3 { font-weight: 700; line-height: 1.3; margin: 1.2em 0 .5em; color: var(--e4e-black); }
body.e4e-course-page .e4e-prose ul,
body.e4e-course-page .e4e-prose ol { padding-left: 1.5em; list-style: revert; }
body.e4e-course-page .e4e-prose li { margin-bottom: .4em; font-size: 15px; color: var(--e4e-grey); }

/* ── Lesson Navigation ───────────────────────────────────────────────────────── */

.e4e-lesson-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--e4e-border2);
    border-bottom: 1px solid var(--e4e-border2);
}

.e4e-lesson-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: calc(50% - 6px);
    padding: 14px 18px;
    border-radius: var(--e4e-radius);
    border: 1px solid var(--e4e-border2);
    background: var(--e4e-white);
    color: var(--e4e-black);
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.e4e-lesson-nav-btn:hover {
    border-color: var(--e4e-pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.08);
    background: var(--e4e-white);
    text-decoration: none;
}

.e4e-lesson-nav-btn--prev { justify-content: flex-start; }
.e4e-lesson-nav-btn--next { justify-content: flex-end; margin-left: auto; }

.e4e-lesson-nav-arrow {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--e4e-grey);
    transition: color .15s;
}
.e4e-lesson-nav-btn:hover .e4e-lesson-nav-arrow { color: var(--e4e-pink); }

.e4e-lesson-nav-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.e4e-lesson-nav-btn--next .e4e-lesson-nav-text { text-align: right; }

.e4e-lesson-nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--e4e-grey);
}

.e4e-lesson-nav-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--e4e-black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s;
}
.e4e-lesson-nav-btn:hover .e4e-lesson-nav-title { color: var(--e4e-pink); }

@media ( max-width: 600px ) {
    .e4e-lesson-nav { flex-direction: column; }
    .e4e-lesson-nav-btn { max-width: 100%; }
    .e4e-lesson-nav-btn--next { margin-left: 0; }
    .e4e-lesson-nav-btn--next .e4e-lesson-nav-text { text-align: left; }
    .e4e-lesson-nav-btn--next { flex-direction: row-reverse; justify-content: flex-end; }
}

/* ── Admin Preview Banner ────────────────────────────────────────────────────── */

.e4e-preview-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 0 0 20px;
    font-size: 13px;
    color: #5d4037;
    line-height: 1.4;
}

.e4e-preview-banner-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.e4e-preview-banner-text {
    flex: 1;
}

.e4e-preview-banner-text strong {
    color: #4e342e;
}

.e4e-preview-banner-exit {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #b71c1c;
    text-decoration: none;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    padding: 3px 10px;
    transition: background .15s, color .15s;
}

.e4e-preview-banner-exit:hover {
    background: #b71c1c;
    color: #fff;
    border-color: #b71c1c;
}

/* ═══════════════════════════════════════════════════════════════════════════
   My Courses Page  (body.e4e-my-courses-page)
   ═══════════════════════════════════════════════════════════════════════════ */

body.e4e-my-courses-page {
    margin: 0;
    padding: 0;
    background: var(--e4e-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px;
    color: var(--e4e-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.e4e-my-courses-page *,
body.e4e-my-courses-page *::before,
body.e4e-my-courses-page *::after { box-sizing: border-box; }

body.e4e-my-courses-page a       { color: inherit; text-decoration: none; }
body.e4e-my-courses-page img     { max-width: 100%; display: block; }
body.e4e-my-courses-page button  { font-family: inherit; }
body.e4e-my-courses-page p       { margin: 0 0 1em; }
body.e4e-my-courses-page p:last-child { margin-bottom: 0; }
body.e4e-my-courses-page h1,
body.e4e-my-courses-page h2      { margin: 0; line-height: 1.2; }

/* ── Top nav bar ─────────────────────────────────────────────────────────── */

.e4e-mc-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--e4e-white);
    border-bottom: 1px solid var(--e4e-border);
    padding: 0 24px;
}
body.admin-bar .e4e-mc-topbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .e4e-mc-topbar { top: 46px; } }

.e4e-mc-topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
}

.e4e-mc-topbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.e4e-mc-topbar-logo {
    height: 36px;
    width: auto;
    display: block;
}

.e4e-mc-topbar-sitename {
    font-size: 17px;
    font-weight: 800;
    color: var(--e4e-black);
    letter-spacing: -.02em;
}

.e4e-mc-topbar-nav {
    display: flex;
    align-items: center;
    gap: 6px 20px;
    flex-wrap: wrap;
}

.e4e-mc-topbar-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--e4e-grey);
    text-decoration: none;
    transition: color .15s;
}
.e4e-mc-topbar-link:hover { color: var(--e4e-black); }

.e4e-mc-topbar-link--muted {
    font-weight: 500;
    font-size: 12px;
}
.e4e-mc-topbar-link--muted:hover { color: var(--e4e-pink); }

.e4e-mc-topbar-link--cta {
    background: var(--e4e-black);
    color: #fff !important;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    transition: background .15s;
}
.e4e-mc-topbar-link--cta:hover { background: var(--e4e-pink); }

.e4e-mc-topbar-sep {
    color: var(--e4e-border2);
    font-size: 16px;
    user-select: none;
}

.e4e-mc-topbar-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--e4e-black);
}

/* ── Hero / page header ──────────────────────────────────────────────────── */

.e4e-mc-hero {
    background: var(--e4e-black);
    color: #fff;
    padding: 48px 24px 56px;
}

.e4e-mc-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.e4e-mc-hero-welcome {
    font-size: 14px;
    color: rgba(255,255,255,.5);
    margin-bottom: 8px;
    font-weight: 400;
}
.e4e-mc-hero-welcome strong { color: rgba(255,255,255,.8); font-weight: 600; }

.e4e-mc-hero-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -.025em;
    color: #fff;
    margin-bottom: 28px;
}

/* Stats row */
.e4e-mc-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.e4e-mc-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.e4e-mc-stat-num {
    font-size: 30px;
    font-weight: 800;
    color: var(--e4e-pink);
    line-height: 1;
    letter-spacing: -.02em;
}

.e4e-mc-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    color: rgba(255,255,255,.4);
}

.e4e-mc-stat-sep {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,.1);
    margin: 0 28px;
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 480px) {
    .e4e-mc-stat-sep { margin: 0 20px; }
    .e4e-mc-stat-num { font-size: 24px; }
}

/* ── Main content wrapper ────────────────────────────────────────────────── */

.e4e-mc-main {
    padding: 48px 24px 96px;
}

.e4e-mc-main-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Empty / login state card ────────────────────────────────────────────── */

.e4e-mc-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 460px;
    margin: 32px auto 0;
    padding: 16px;
}

.e4e-mc-state-icon {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(233,30,140,.08);
    border-radius: 50%;
    color: var(--e4e-pink);
    margin-bottom: 24px;
    border: 2px solid rgba(233,30,140,.12);
}

.e4e-mc-state h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--e4e-black);
    margin-bottom: 10px;
}

.e4e-mc-state p {
    font-size: 15px;
    color: var(--e4e-grey);
    line-height: 1.7;
    margin-bottom: 28px;
}

.e4e-mc-state-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Shared buttons ──────────────────────────────────────────────────────── */

.e4e-mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1;
}

.e4e-mc-btn--primary {
    background: var(--e4e-black);
    color: #fff !important;
    border-color: var(--e4e-black);
}
.e4e-mc-btn--primary:hover {
    background: var(--e4e-pink);
    border-color: var(--e4e-pink);
    color: #fff !important;
}

.e4e-mc-btn--outline {
    background: transparent;
    color: var(--e4e-grey);
    border-color: var(--e4e-border2);
}
.e4e-mc-btn--outline:hover {
    border-color: var(--e4e-pink);
    color: var(--e4e-pink);
}

/* ── Course grid ─────────────────────────────────────────────────────────── */

.e4e-mc-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
    gap: 24px;
}

@media (max-width: 640px) {
    .e4e-mc-grid { grid-template-columns: 1fr; }
}

/* ── Course card ─────────────────────────────────────────────────────────── */

.e4e-mc-card {
    display: flex;
    flex-direction: column;
    background: var(--e4e-white);
    border: 1px solid var(--e4e-border);
    border-radius: var(--e4e-radius);
    box-shadow: var(--e4e-shadow);
    overflow: hidden;
    transition: box-shadow .22s, transform .22s, border-color .22s;
}
.e4e-mc-card:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.11);
    transform: translateY(-3px);
    border-color: rgba(233,30,140,.25);
}

/* Thumbnail */
.e4e-mc-thumb-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--e4e-black);
    flex-shrink: 0;
}

.e4e-mc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .9;
    transition: transform .35s ease, opacity .2s;
}
.e4e-mc-card:hover .e4e-mc-thumb { transform: scale(1.045); opacity: 1; }

.e4e-mc-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    font-size: 54px;
    font-weight: 800;
    color: rgba(233,30,140,.5);
    text-transform: uppercase;
    user-select: none;
}

/* Status badge overlaid on thumbnail */
.e4e-mc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 99px;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.e4e-mc-badge--done   { background: rgba(5,150,105,.88);  color: #fff; }
.e4e-mc-badge--active { background: rgba(233,30,140,.88); color: #fff; }
.e4e-mc-badge--new    { background: rgba(17,24,39,.72);   color: rgba(255,255,255,.8); }

/* Card body */
.e4e-mc-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    gap: 12px;
}

.e4e-mc-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.e4e-mc-card-title a {
    color: var(--e4e-black);
    text-decoration: none;
    transition: color .15s;
}
.e4e-mc-card-title a:hover { color: var(--e4e-pink); }

.e4e-mc-card-meta {
    font-size: 12px;
    color: var(--e4e-grey);
    margin: 0;
}

/* Progress */
.e4e-mc-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.e4e-mc-progress-bar {
    height: 5px;
    background: rgba(107,114,128,.15);
    border-radius: 99px;
    overflow: hidden;
}

.e4e-mc-progress-fill {
    height: 100%;
    background: var(--e4e-pink);
    border-radius: 99px;
    transition: width .5s ease;
    min-width: 0;
}

.e4e-mc-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--e4e-grey);
    font-weight: 500;
}
.e4e-mc-progress-meta span:last-child {
    font-weight: 700;
    color: var(--e4e-black);
}

/* CTA button — full width inside card */
.e4e-mc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--e4e-black);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background .15s;
    width: 100%;
    line-height: 1;
}
.e4e-mc-cta:hover { background: var(--e4e-pink); }

.e4e-mc-cta svg {
    flex-shrink: 0;
    transition: transform .15s;
}
.e4e-mc-cta:hover svg { transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════════════════════════
   [e4e_my_courses] shortcode  (.e4e-sc-*)
   Works inside any theme builder page — no body-class scoping required.
   ═══════════════════════════════════════════════════════════════════════════ */

.e4e-sc-wrap {
    --e4e-sc-pink:   #e91e8c;
    --e4e-sc-black:  #111827;
    --e4e-sc-grey:   #6b7280;
    --e4e-sc-light:  #f9fafb;
    --e4e-sc-border: rgba(107,114,128,.16);
    --e4e-sc-radius: 12px;
    --e4e-sc-shadow: 0 1px 4px rgba(0,0,0,.06), 0 2px 12px rgba(0,0,0,.04);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--e4e-sc-black);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.e4e-sc-wrap *, .e4e-sc-wrap *::before, .e4e-sc-wrap *::after { box-sizing: border-box; }
.e4e-sc-wrap a       { text-decoration: none; color: inherit; }
.e4e-sc-wrap img     { max-width: 100%; display: block; }
.e4e-sc-wrap h3      { margin: 0; line-height: 1.25; }
.e4e-sc-wrap p       { margin: 0 0 1em; }
.e4e-sc-wrap p:last-child { margin-bottom: 0; }

/* ── Stats header ────────────────────────────────────────────────────────── */

.e4e-sc-stats {
    background: var(--e4e-sc-black);
    border-radius: var(--e4e-sc-radius);
    padding: 28px 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.e4e-sc-stats-greeting {
    font-size: 14px;
    color: rgba(255,255,255,.55);
    margin: 0;
    flex-shrink: 0;
}
.e4e-sc-stats-greeting strong {
    color: rgba(255,255,255,.9);
    font-weight: 700;
}

.e4e-sc-stats-pills {
    display: flex;
    align-items: center;
    gap: 6px 0;
    flex-wrap: wrap;
}

.e4e-sc-pill {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,.1);
}
.e4e-sc-pill:last-child { border-right: none; padding-right: 0; }
.e4e-sc-pill:first-child { padding-left: 0; }

.e4e-sc-pill-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--e4e-sc-pink);
    line-height: 1;
    letter-spacing: -.02em;
}

.e4e-sc-pill-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
    color: rgba(255,255,255,.38);
}

@media (max-width: 600px) {
    .e4e-sc-stats { padding: 20px; flex-direction: column; align-items: flex-start; }
    .e4e-sc-pill  { padding: 0 16px; }
}

/* ── Empty / login state ─────────────────────────────────────────────────── */

.e4e-sc-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
    max-width: 440px;
    margin: 0 auto;
}

.e4e-sc-state-icon {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(233,30,140,.08);
    border: 2px solid rgba(233,30,140,.14);
    border-radius: 50%;
    color: var(--e4e-sc-pink);
    margin-bottom: 24px;
}

.e4e-sc-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--e4e-sc-black);
    margin-bottom: 10px;
}

.e4e-sc-state p {
    font-size: 15px;
    color: var(--e4e-sc-grey);
    line-height: 1.7;
    margin-bottom: 28px;
}

.e4e-sc-state-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.e4e-sc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1;
}

.e4e-sc-btn--primary {
    background: var(--e4e-sc-black);
    color: #fff !important;
    border-color: var(--e4e-sc-black);
}
.e4e-sc-btn--primary:hover {
    background: var(--e4e-sc-pink);
    border-color: var(--e4e-sc-pink);
    color: #fff !important;
}

.e4e-sc-btn--outline {
    background: transparent;
    color: var(--e4e-sc-grey);
    border-color: rgba(107,114,128,.35);
}
.e4e-sc-btn--outline:hover {
    border-color: var(--e4e-sc-pink);
    color: var(--e4e-sc-pink);
}

/* ── Course grid ─────────────────────────────────────────────────────────── */

.e4e-sc-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 290px, 1fr ) );
    gap: 24px;
}

@media (max-width: 640px) { .e4e-sc-grid { grid-template-columns: 1fr; } }

/* ── Course card ─────────────────────────────────────────────────────────── */

.e4e-sc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--e4e-sc-border);
    border-radius: var(--e4e-sc-radius);
    box-shadow: var(--e4e-sc-shadow);
    overflow: hidden;
    transition: box-shadow .22s, transform .22s, border-color .22s;
}
.e4e-sc-card:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.11);
    transform: translateY(-3px);
    border-color: rgba(233,30,140,.25);
}

/* Thumbnail */
.e4e-sc-thumb-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--e4e-sc-black);
    flex-shrink: 0;
}

.e4e-sc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .88;
    transition: transform .35s ease, opacity .2s;
}
.e4e-sc-card:hover .e4e-sc-thumb { transform: scale(1.045); opacity: 1; }

.e4e-sc-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    font-size: 52px;
    font-weight: 800;
    color: rgba(233,30,140,.5);
    text-transform: uppercase;
    user-select: none;
}

/* Status badge on thumbnail */
.e4e-sc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 99px;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.e4e-sc-badge--done   { background: rgba(5,150,105,.88);  color: #fff; }
.e4e-sc-badge--active { background: rgba(233,30,140,.88); color: #fff; }
.e4e-sc-badge--new    { background: rgba(17,24,39,.72);   color: rgba(255,255,255,.8); }

/* Card body */
.e4e-sc-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    gap: 12px;
}

.e4e-sc-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.e4e-sc-card-title a {
    color: var(--e4e-sc-black);
    text-decoration: none;
    transition: color .15s;
}
.e4e-sc-card-title a:hover { color: var(--e4e-sc-pink); }

.e4e-sc-card-meta {
    font-size: 12px;
    color: var(--e4e-sc-grey);
    margin: 0;
}

/* Progress */
.e4e-sc-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.e4e-sc-progress-bar {
    height: 5px;
    background: rgba(107,114,128,.15);
    border-radius: 99px;
    overflow: hidden;
}

.e4e-sc-progress-fill {
    height: 100%;
    background: var(--e4e-sc-pink);
    border-radius: 99px;
    transition: width .5s ease;
    min-width: 0;
}

.e4e-sc-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--e4e-sc-grey);
    font-weight: 500;
}
.e4e-sc-progress-meta span:last-child {
    font-weight: 700;
    color: var(--e4e-sc-black);
}

/* CTA */
.e4e-sc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--e4e-sc-black);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background .15s;
    width: 100%;
    line-height: 1;
}
.e4e-sc-cta:hover { background: var(--e4e-sc-pink); }
.e4e-sc-cta svg   { flex-shrink: 0; transition: transform .15s; }
.e4e-sc-cta:hover svg { transform: translateX(3px); }

/* Preview card variants */
.e4e-sc-card--preview .e4e-sc-thumb { opacity: .75; }
.e4e-sc-card--preview:hover .e4e-sc-thumb { opacity: .88; }

/* Locked badge */
.e4e-sc-badge--locked {
    background: rgba(17,24,39,.78);
    color: rgba(255,255,255,.85);
}

/* Two-button row (Buy Now + View Course) */
.e4e-sc-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

/* Buy Now — full-width primary */
.e4e-sc-cta--buy {
    background: var(--e4e-sc-pink);
}
.e4e-sc-cta--buy:hover { background: #c41478; }

/* View Course — ghost/outline style */
.e4e-sc-cta--view {
    background: transparent;
    color: var(--e4e-sc-black) !important;
    border: 1.5px solid var(--e4e-sc-border);
}
.e4e-sc-cta--view:hover {
    background: var(--e4e-sc-light);
    border-color: var(--e4e-sc-black);
}

/* "Also Available" section separator */
.e4e-sc-section-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 36px 0 28px;
    color: var(--e4e-sc-grey);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.e4e-sc-section-sep::before,
.e4e-sc-section-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--e4e-sc-border);
}

/* Guest login note */
.e4e-sc-login-note {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: var(--e4e-sc-grey);
}
.e4e-sc-login-note a {
    color: var(--e4e-sc-pink);
    font-weight: 600;
    text-decoration: underline;
}
.e4e-sc-login-note a:hover { text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   Order Thank-You — Start Course CTA  (.e4e-ty-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.e4e-ty-wrap {
    margin: 0 0 32px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.e4e-ty-card {
    background: #fff;
    border: 1px solid rgba(233, 30, 140, .2);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(233, 30, 140, .12), 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
    max-width: 540px;
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ── Enrolled badge ──────────────────────────────────────────────────────── */

.e4e-ty-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: #e91e8c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    width: 100%;
    justify-content: center;
}

/* ── Thumbnail ───────────────────────────────────────────────────────────── */

.e4e-ty-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.e4e-ty-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Copy ────────────────────────────────────────────────────────────────── */

.e4e-ty-copy {
    padding: 24px 28px 0;
}

.e4e-ty-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.e4e-ty-sub {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ── Action buttons ──────────────────────────────────────────────────────── */

.e4e-ty-actions {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.e4e-ty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s, transform .12s;
    line-height: 1;
}
.e4e-ty-btn:hover { transform: translateY( -1px ); }
.e4e-ty-btn:active { transform: none; }

.e4e-ty-btn--primary {
    background: #111827;
    color: #fff !important;
    border-color: #111827;
    font-size: 16px;
    padding: 16px 24px;
}
.e4e-ty-btn--primary:hover {
    background: #e91e8c;
    border-color: #e91e8c;
    color: #fff !important;
}

.e4e-ty-btn--ghost {
    background: transparent;
    color: #6b7280 !important;
    border-color: rgba(107,114,128,.3);
    font-size: 13px;
    padding: 11px 20px;
}
.e4e-ty-btn--ghost:hover {
    border-color: #111827;
    color: #111827 !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
    .e4e-ty-card { border-radius: 12px; }
    .e4e-ty-copy { padding: 20px 20px 0; }
    .e4e-ty-actions { padding: 20px; }
    .e4e-ty-title { font-size: 19px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Module-level purchasing (à-la-carte modules + bundle)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Lesson gate buy buttons */
.e4e-gate-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.e4e-gate-btn { white-space: nowrap; }
.e4e-gate-price { opacity: .85; font-weight: 600; }

/* Course page — per-module head row (title + access/price tag) */
.e4e-cp-mod-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.e4e-cp-mod-head .e4e-cp-mod-title { margin-bottom: 6px; }

.e4e-cp-mod-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.e4e-cp-mod-tag--owned { background: #d1fae5; color: #059669; }
.e4e-cp-mod-tag--free  { background: #ede9fe; color: #7c3aed; }
.e4e-cp-mod-tag--price { background: var(--e4e-light); color: var(--e4e-black); }

/* Course page — per-module action row */
.e4e-cp-mod-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.e4e-cp-mod-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--e4e-pink);
    color: var(--e4e-black);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    white-space: nowrap;
    transition: filter .15s;
}
.e4e-cp-mod-buy-btn:hover { filter: brightness(.95); }
.e4e-cp-mod-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    white-space: nowrap;
}
.e4e-cp-mod-start-btn svg { color: #059669; }

/* Locked-module gate: "already purchased?" hint */
.e4e-gate-login-hint { margin-top: 16px; font-size: 13px; color: var(--e4e-grey); }

/* ═══════════════════════════════════════════════════════════════════════════
   "Choose your access" plan selector (course landing page)
   ═══════════════════════════════════════════════════════════════════════════ */
.e4e-plan { text-align: left; }
.e4e-plan-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.e4e-plan-title { font-size: 18px; font-weight: 800; color: var(--e4e-black); margin: 0; }
.e4e-plan-toggle {
    display: inline-flex; background: var(--e4e-light);
    border-radius: 999px; padding: 3px;
}
.e4e-plan-toggle-btn {
    border: none; background: none; cursor: pointer;
    font-size: 13px; font-weight: 700; color: var(--e4e-grey);
    padding: 7px 16px; border-radius: 999px; transition: all .15s;
}
.e4e-plan-toggle-btn.is-active { background: var(--e4e-black); color: #fff; }

.e4e-plan-full {
    display: flex; align-items: center; gap: 12px;
    border: 2px solid var(--e4e-pink); border-radius: 14px;
    padding: 14px 16px; cursor: pointer; margin-bottom: 14px;
    background: rgba(233,30,140,.04);
}
.e4e-plan-full input { width: 18px; height: 18px; accent-color: var(--e4e-pink); flex-shrink: 0; }
.e4e-plan-full-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.e4e-plan-full-name { font-weight: 800; color: var(--e4e-black); display: flex; align-items: center; gap: 8px; }
.e4e-plan-badge {
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    background: var(--e4e-pink); color: var(--e4e-black); padding: 3px 7px; border-radius: 999px;
}
.e4e-plan-full-sub { font-size: 12px; color: var(--e4e-grey); }
.e4e-plan-full-price { font-size: 20px; font-weight: 800; color: var(--e4e-black); white-space: nowrap; }

.e4e-plan-or {
    text-align: center; position: relative; margin: 14px 0;
    font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--e4e-grey);
}
.e4e-plan-or::before, .e4e-plan-or::after {
    content: ""; position: absolute; top: 50%; width: calc(50% - 60px); height: 1px;
    background: rgba(107,114,128,.25);
}
.e4e-plan-or::before { left: 0; } .e4e-plan-or::after { right: 0; }

.e4e-plan-modules { display: flex; flex-direction: column; gap: 8px; }
.e4e-plan-module {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid rgba(107,114,128,.22); border-radius: 12px;
    padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.e4e-plan-module:hover { border-color: var(--e4e-pink); }
.e4e-plan-module input { width: 17px; height: 17px; accent-color: var(--e4e-pink); flex-shrink: 0; }
.e4e-plan-mod-check { display: none; }
.e4e-plan-mod-title { flex: 1; font-weight: 600; color: var(--e4e-black); font-size: 14px; }
.e4e-plan-mod-price { font-weight: 700; color: var(--e4e-black); white-space: nowrap; }

.e4e-plan-bonus {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #059669; padding: 8px 4px 0;
}
.e4e-plan-bonus svg { color: #059669; flex-shrink: 0; }

.e4e-plan-summary {
    margin: 16px 0; padding-top: 14px; border-top: 1px solid rgba(107,114,128,.2);
    display: flex; flex-direction: column; gap: 8px;
}
.e4e-plan-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--e4e-grey); }
.e4e-plan-row--discount { color: #059669; font-weight: 600; }
.e4e-plan-row--total { font-size: 20px; font-weight: 800; color: var(--e4e-black); }
.e4e-plan-hint { text-align: center; font-size: 12px; color: var(--e4e-grey); margin-top: 8px; }
.e4e-plan-empty { text-align: center; color: var(--e4e-grey); padding: 20px 0; }
#e4e-plan-submit[disabled] { opacity: .5; cursor: not-allowed; }

/* Plan checkout error notice */
.e4e-plan-error {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; text-align: left;
}
.e4e-plan-error-detail { display: block; margin-top: 6px; font-size: 12px; opacity: .85; font-family: monospace; }
.e4e-plan-error-debug {
    display: block; margin-top: 8px; padding: 8px 10px; background: #fff;
    border: 1px solid #fecaca; border-radius: 8px; font-size: 11px;
    white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto;
}

/* Checkout error debug modal */
.e4e-debug-modal {
    position: fixed; inset: 0; z-index: 99999; background: rgba(17,24,39,.6);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.e4e-debug-modal-box {
    background: #fff; border-radius: 14px; max-width: 560px; width: 100%;
    padding: 24px; position: relative; box-shadow: 0 24px 70px rgba(0,0,0,.3); text-align: left;
}
.e4e-debug-modal-box h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; color: #b91c1c; }
.e4e-debug-modal-body { font-size: 14px; color: #374151; line-height: 1.6; }
.e4e-debug-modal-body .e4e-plan-error-detail { display: block; margin-top: 10px; font-family: monospace; font-size: 12px; color: #6b7280; word-break: break-word; }
.e4e-debug-modal-body .e4e-plan-error-debug { margin-top: 10px; font-size: 11px; max-height: 220px; }
.e4e-debug-modal-close {
    position: absolute; top: 10px; right: 12px; background: none; border: none;
    font-size: 26px; line-height: 1; cursor: pointer; color: #9ca3af;
}
.e4e-debug-modal-close:hover { color: #111827; }

/* ── In-page login modal ──────────────────────────────────────────────────── */
.e4e-login-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.e4e-login-modal[hidden] { display: none; }
body.e4e-login-open-body { overflow: hidden; }
.e4e-login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    backdrop-filter: blur(2px);
}
.e4e-login-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
.e4e-login-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
}
.e4e-login-close:hover { color: #111827; }
.e4e-login-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
}
.e4e-login-sub {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
}
.e4e-login-form { display: flex; flex-direction: column; }
.e4e-login-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.e4e-login-input {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    color: #111827;
    box-sizing: border-box;
}
.e4e-login-input:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .12);
}
.e4e-login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 18px;
}
.e4e-login-remember input { margin: 0; }
.e4e-login-submit {
    width: 100%;
    padding: 13px 16px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}
.e4e-login-submit:hover { background: #000; }
.e4e-login-submit:disabled { opacity: .7; cursor: default; }
.e4e-login-lost {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    align-self: center;
}
.e4e-login-lost:hover { color: #111827; text-decoration: underline; }
.e4e-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.e4e-login-error[hidden] { display: none; }
