/* ============================================================================
   Course detail page: the price box, the curriculum and FAQ accordions, the
   sticky bar on phones, and the two modals (free preview + sign-in to enrol).
   ========================================================================== */

.font-open { font-family: 'Open Sans', sans-serif; }

/* ---- Price box in the hero ---------------------------------------------- */
.price-box {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.price-box__amount {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.6rem;
    color: #fff;
}

.price-box__amount.is-free { color: #34d399; }

.price-box__actions { margin-top: 10px; }

/* The "Preview" pill on a free lesson. */
.btn-preview {
    background: #0b1023;
    color: #fff;
    font-size: .68rem;
    padding: 2px 10px;
    border-radius: 12px;
    border: none;
    line-height: 1.4;
}

.locked-badge i { font-size: .6rem; }

.curriculum-header .fa-chevron-down {
    font-size: .75rem;
    transition: transform .3s;
}

/* A section starts closed; opening it turns the chevron over. */
.faq-answer { display: none; }
.faq-answer.is-open { display: block; }

.curriculum-header.is-open .fa-chevron-down { transform: rotate(180deg); }

/* ---- Reviews and instructor -------------------------------------------- */
.meta-note {
    font-family: 'Open Sans', sans-serif;
    font-size: .85rem;
    color: #666;
}

.btn-ink-sm {
    background: #0b1023;
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: .78rem;
    border-radius: 7px;
    padding: 8px 18px;
}

.btn-ink-sm:hover { color: #fff; filter: brightness(1.15); }

.price-note {
    font-family: 'Open Sans', sans-serif;
    font-size: .8rem;
    color: #aaa;
}

/* ---- Sticky buy bar on phones ------------------------------------------- */
.sticky-cta {
    background: #fff;
    border-top: 1px solid #ebebf5;
    box-shadow: 0 -4px 16px rgba(100, 80, 200, .1);
    z-index: 200;
}

.sticky-cta__price {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.3rem;
    color: #1a1a2e;
}

.sticky-cta__price.is-free { color: #059669; }

.sticky-cta__action {
    flex: 1;
    max-width: 220px;
}

.sticky-cta__action .btn-enroll,
.btn-enroll.sticky-cta__action { padding: 10px; }

/* ============================================================================
   Free preview modal
   ========================================================================== */
#previewModal .modal-content {
    background: #07071a;
    border: 1px solid rgba(124, 106, 245, .2);
    border-radius: 16px;
}

#previewModal .modal-header {
    border-bottom: 1px solid rgba(124, 106, 245, .15);
    padding: 16px 20px;
}

#previewModalTitle {
    font-family: 'Playfair Display', serif;
    color: #e0e0ff;
    font-size: .95rem;
}

#previewModalVideo {
    width: 100%;
    display: block;
    background: #000;
    max-height: 480px;
    border-radius: 0 0 15px 15px;
}

#previewModalFrameWrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0 0 15px 15px;
    overflow: hidden;
}

#previewModalFrame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ============================================================================
   Sign-in-to-enrol modal

   This is the same sign-in as student/login.php, so it is built to look like
   that card rather than like the dark page behind it: a white sheet with one
   dark band across the top. The tokens below are the ones student.css already
   uses, kept here because that stylesheet is not loaded on this page.
   ========================================================================== */
#enrollAuthModal {
    --auth-ink:      #0b1023;   /* headings, active step, button base */
    --auth-violet:   #5b4fd4;   /* the accent the button runs to */
    --auth-gold:     #f5c518;   /* the brand badge, as in the header logo */
    --auth-line:     #e0dcf8;   /* field and divider edges */
    --auth-body:     #444b5e;   /* body copy */
    --auth-muted:    #7b8194;   /* hints and captions */
    --auth-ok:       #059669;
    --auth-bad:      #dc2626;
}

#enrollAuthModal .modal-dialog { max-width: 430px; }

#enrollAuthModal .modal-content {
    background: #fff;
    border: none;
    border-radius: 20px;
    color: var(--auth-body);
    box-shadow: 0 24px 64px rgba(6, 6, 26, .38);
    overflow: hidden;            /* keeps the header band inside the radius */
}

/* ---- Header band --------------------------------------------------------- */
#enrollAuthModal .modal-header {
    position: relative;
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #06061a, #0d0d35);
    border-bottom: none;
    padding: 26px 30px 22px;
}

#enrollAuthModal .auth-badge {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--auth-gold), #e6a800);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

#enrollAuthModal .auth-badge i {
    font-size: 1.3rem;
    color: var(--auth-ink);
}

#enrollAuthModal .modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

#authModalSubtitle {
    font-size: .85rem;
    color: rgba(255, 255, 255, .55);
    margin: 0;
}

/* The close button sits on the dark band, so it stays light. */
#enrollAuthModal .btn-close {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 8px;
    opacity: .6;
    transition: opacity .15s;
}

#enrollAuthModal .btn-close:hover { opacity: 1; }

#enrollAuthModal .modal-body { padding: 28px 30px 26px; }

/* ---- Two-step indicator -------------------------------------------------- */
/* Centred and close together: the track is a short link between two dots,
   not a rule stretched across the whole card. */
.auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.auth-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
    background: #fff;
    border: 2px solid var(--auth-line);
    color: #b9bdcc;
    transition: all .3s;
}

.auth-step-dot.is-active {
    border-color: var(--auth-ink);
    color: var(--auth-ink);
}

.auth-step-dot.is-done {
    background: var(--auth-ink);
    border-color: var(--auth-ink);
    color: #fff;
}

.auth-step-track {
    width: 52px;
    height: 2px;
    background: var(--auth-line);
    border-radius: 2px;
    flex: none;
}

#authStepLine {
    height: 100%;
    width: 0;
    background: var(--auth-ink);
    border-radius: 2px;
    transition: width .4s ease;
}

#authStepLine.is-full { width: 100%; }

/* ---- Fields -------------------------------------------------------------- */
#enrollAuthModal label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 6px;
    display: block;
}

#enrollAuthModal .input-group-text {
    background: #f7f6fd;
    border: 1px solid var(--auth-line);
    border-right: none;
    color: var(--auth-ink);
}

#enrollAuthModal .form-control {
    background: #fff;
    border: 1px solid var(--auth-line);
    color: var(--auth-ink);
    caret-color: var(--auth-violet);
    padding: 11px 14px;
}

#enrollAuthModal .form-control::placeholder { color: #a8adbd; }

#enrollAuthModal .form-control:focus {
    background: #fff;
    border-color: var(--auth-violet);
    color: var(--auth-ink);
    box-shadow: 0 0 0 .2rem rgba(91, 79, 212, .15);
}

#modalOtp {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .5rem;
    height: 62px;
    border-width: 2px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    text-indent: .5rem;          /* centres the digits despite the tracking */
}

/* ---- Message bar --------------------------------------------------------- */
#authAlert {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: .82rem;
    margin-bottom: 16px;
    background: #f3f1fd;
    border: 1px solid var(--auth-line);
    color: #3f3a6b;
}

#authAlert.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--auth-bad);
}

#captchaRequiredMsg {
    color: var(--auth-bad);
    font-size: .78rem;
    margin-bottom: 10px;
}

/* reCAPTCHA renders its own white widget; centre it so it does not sit off
   to one side of a 430px card. */
#modalCaptchaContainer > div { margin: 0 auto; }

/* ---- Buttons ------------------------------------------------------------- */
#enrollAuthModal .btn-primary-lp,
#communityJoinLink {
    background: linear-gradient(135deg, var(--auth-ink), var(--auth-violet));
    border: none;
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: .92rem;
    letter-spacing: .4px;
    padding: 12px;
    border-radius: 10px;
    box-shadow: none;
    transition: transform .15s, box-shadow .2s, background .2s;
}

#enrollAuthModal .btn-primary-lp:hover,
#communityJoinLink:hover {
    background: linear-gradient(135deg, var(--auth-violet), #4a3fc0);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(91, 79, 212, .32);
}

#enrollAuthModal .btn-primary-lp:disabled {
    opacity: .6;
    transform: none;
    box-shadow: none;
}

.btn-link-sm {
    font-size: .8rem;
    color: var(--auth-muted);
    text-decoration: none;
}

.btn-link-sm:hover { color: var(--auth-ink); }

#btnCommunityContinue {
    background: #fff;
    border: 1px solid var(--auth-line);
    color: var(--auth-ink);
}

#btnCommunityContinue:hover {
    background: #f7f6fd;
    color: var(--auth-ink);
}

/* ---- Panels: which address the code was sent to, loading, success -------- */
.auth-email-chip {
    background: #f7f6fd;
    border: 1px solid var(--auth-line);
    border-radius: 9px;
    padding: 10px 14px;
    font-size: .84rem;
    color: var(--auth-ink);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}

.auth-email-chip i {
    color: var(--auth-violet);
    flex-shrink: 0;
}

.auth-hint {
    font-size: .8rem;
    color: var(--auth-muted);
    margin-bottom: 14px;
}

.auth-hint strong { color: var(--auth-ink); }

.auth-panel {
    text-align: center;
    padding: 28px 0;
}

.auth-panel .spinner-border {
    color: var(--auth-violet);
    width: 2rem;
    height: 2rem;
}

.auth-panel p {
    color: var(--auth-muted);
    font-size: .84rem;
    margin: 10px 0 0;
}

.auth-tick {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, var(--auth-ok));
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(5, 150, 105, .28);
}

.auth-tick i {
    color: #fff;
    font-size: 1.4rem;
}

.auth-tick--sm {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
}

.auth-tick--sm i { font-size: 1.2rem; }

.auth-done {
    color: var(--auth-ok);
    font-weight: 700;
    margin-bottom: 4px;
}

/* ---- Community step ------------------------------------------------------ */
.auth-community-head { text-align: center; margin-bottom: 14px; }

.auth-community-head .auth-done {
    margin-bottom: 2px;
    font-size: .95rem;
}

.auth-community-box {
    background: #f7f6fd;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.auth-community-box__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.auth-community-box__title i { color: var(--auth-violet); }

.auth-community-box__title strong {
    color: var(--auth-ink);
    font-size: .92rem;
}

.auth-community-box p {
    font-size: .8rem;
    color: var(--auth-body);
    margin-bottom: 10px;
    line-height: 1.55;
}

.auth-community-box p:last-child {
    font-size: .74rem;
    color: var(--auth-muted);
    margin-bottom: 0;
}

.auth-external-icon {
    font-size: .72rem;
    opacity: .85;
}

#communityHint {
    font-size: .74rem;
    color: var(--auth-muted);
    margin: 10px 0 0;
    text-align: center;
}

/* ---- Small screens ------------------------------------------------------- */
@media (max-width: 480px) {
    #enrollAuthModal .modal-header { padding: 22px 20px 18px; }
    #enrollAuthModal .modal-body   { padding: 22px 20px 20px; }
    #modalOtp { font-size: 1.35rem; letter-spacing: .38rem; height: 56px; }
}
