/* ============================================================================
   Certification Exam — customer-facing product page (IC-09c-2).
   Full custom layout for product-type-certification_exam. Scoped with
   .single-product for specificity over the active theme's WooCommerce CSS.
   Brand accent #2563eb. Inherits theme fonts.
   ========================================================================= */

:root {
    --lmsx-accent: #2563eb;
    --lmsx-accent-d: #1d4ed8;
    --lmsx-accent-soft: #eff6ff;
    --lmsx-ink: #0f172a;
    --lmsx-body: #334155;
    --lmsx-muted: #64748b;
    --lmsx-line: #e2e8f0;
    --lmsx-surface: #ffffff;
    --lmsx-soft: #f8fafc;
    --lmsx-sale: #dc2626;
    --lmsx-radius: 16px;
    --lmsx-radius-sm: 10px;
    --lmsx-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
}

/* ---- suppress the shop sidebar on exam pages (fallback to remove_action) -- */
body.lmsx-exam-page #secondary,
body.lmsx-exam-page .widget-area,
body.lmsx-exam-page aside.sidebar,
body.lmsx-exam-page .sidebar.widget-area { display: none !important; }

/* ---- page grid: header (full width), media + buy box, body wraps below --- */
.single-product .product.product-type-certification_exam {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: flex-start;
}
.single-product .product.product-type-certification_exam .lmsx-header { flex: 1 1 100%; min-width: 0; }
.single-product .product.product-type-certification_exam .lmsx-media { flex: 1 1 460px; min-width: 0; }
.single-product .product.product-type-certification_exam .summary.entry-summary {
    flex: 1 1 360px;
    min-width: 0;
    width: auto;
    float: none;
    margin: 0;
}
.single-product .product.product-type-certification_exam .lmsx-body { flex: 1 1 100%; min-width: 0; }

/* ---- header: title + lead ------------------------------------------------ */
.lmsx-title { margin: 0 0 14px; font-size: 40px; line-height: 1.1; font-weight: 800; color: var(--lmsx-ink); letter-spacing: -.02em; }
.lmsx-lead { color: var(--lmsx-body); font-size: 17px; line-height: 1.65; max-width: 72ch; }
.lmsx-lead p:last-child { margin-bottom: 0; }

/* ---- media carousel (SlickSlider) ---------------------------------------- */
.lmsx-slider { position: relative; border-radius: var(--lmsx-radius); overflow: hidden; border: 1px solid var(--lmsx-line); background: var(--lmsx-soft); }
.lmsx-slider .lmsx-slide { display: none; }
.lmsx-slider .lmsx-slide:first-child { display: block; }
.lmsx-slider.slick-initialized .lmsx-slide { display: block; }
.lmsx-slide picture, .lmsx-slide .lmsx-stage-img, .lmsx-slide img { display: block; width: 100%; height: auto; }
.lmsx-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; border-radius: 999px;
    border: 1px solid var(--lmsx-line); background: rgba(255,255,255,.92);
    color: var(--lmsx-ink); font-size: 24px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--lmsx-shadow);
}
.lmsx-arrow:hover { color: var(--lmsx-accent); border-color: var(--lmsx-accent); }
.lmsx-prev { left: 14px; }
.lmsx-next { right: 14px; }
.lmsx-arrow.slick-disabled { opacity: .4; cursor: default; }
/* slick dots (appended below the image box) */
.lmsx-media .slick-dots { display: flex; justify-content: center; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.lmsx-media .slick-dots li { line-height: 0; }
.lmsx-media .slick-dots li button { width: 9px; height: 9px; padding: 0; font-size: 0; border-radius: 999px; border: none; background: var(--lmsx-line); cursor: pointer; transition: background .15s ease, width .15s ease; }
.lmsx-media .slick-dots li button:before { content: none; }
.lmsx-media .slick-dots li button:hover { background: #cbd5e1; }
.lmsx-media .slick-dots li.slick-active button { background: var(--lmsx-accent); width: 22px; }

/* ---- buy box: the enrolment card ----------------------------------------- */
.lmsx-buybox {
    background: var(--lmsx-surface);
    border: 1px solid var(--lmsx-line);
    border-radius: var(--lmsx-radius);
    box-shadow: var(--lmsx-shadow);
    padding: 26px 26px 28px;
}
.lmsx-pricerow { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.lmsx-price { font-size: 34px; font-weight: 800; color: var(--lmsx-ink); }
.lmsx-price del { color: var(--lmsx-muted); font-weight: 500; font-size: .55em; margin-right: .15em; }
.lmsx-price ins { text-decoration: none; }
.lmsx-saveflag { display: inline-block; background: #fef2f2; color: var(--lmsx-sale); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

.lmsx-attempts { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--lmsx-line); }
.lmsx-attempts-k { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--lmsx-muted); }
.lmsx-attempts-v { font-size: 15px; font-weight: 700; color: var(--lmsx-ink); }

/* ---- purchase form (date blocks / slots / CTA) --------------------------- */
.lms-exam-cart { margin-top: 22px; }
.lms-exam-step { margin-bottom: 22px; }
.lms-exam-step-label { display: block; font-size: 14px; font-weight: 700; color: var(--lmsx-ink); margin-bottom: 12px; }
.lms-exam-hint { color: var(--lmsx-muted); font-size: 14px; margin: 4px 0; }
.lms-exam-error { color: var(--lmsx-sale); font-size: 14px; }
.lms-exam-note { margin: 0 0 18px; color: var(--lmsx-body); font-size: 15px; line-height: 1.6; }

/* date blocks */
.lms-exam-date-list { display: flex; flex-wrap: wrap; gap: 10px; }
.lms-exam-date {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px;
    min-width: 70px; border: 1px solid var(--lmsx-line); background: var(--lmsx-surface);
    border-radius: var(--lmsx-radius-sm); padding: 11px 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.lms-exam-date:hover { border-color: var(--lmsx-accent); }
.lms-exam-date.selected { border-color: var(--lmsx-accent); background: var(--lmsx-accent-soft); }
.lms-exam-date-dow { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lmsx-muted); }
.lms-exam-date-day { font-size: 22px; font-weight: 800; color: var(--lmsx-ink); line-height: 1.05; }
.lms-exam-date.selected .lms-exam-date-day { color: var(--lmsx-accent); }
.lms-exam-date-mon { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lmsx-muted); }

/* time slots */
.lms-exam-slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lms-exam-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid var(--lmsx-line); background: var(--lmsx-surface); border-radius: var(--lmsx-radius-sm); padding: 10px 14px; cursor: pointer; min-width: 7.5em; }
.lms-exam-slot:hover { border-color: var(--lmsx-accent); }
.lms-exam-slot.selected { background: var(--lmsx-accent); color: #fff; border-color: var(--lmsx-accent); }
.lms-exam-slot.selected .lms-exam-slot-meta { color: rgba(255,255,255,.85); }
.lms-exam-slot.full { opacity: .5; cursor: default; }
.lms-exam-slot-time { font-weight: 700; }
.lms-exam-slot-meta { font-size: 12px; color: var(--lmsx-muted); }

/* CTA */
.single-product .product.product-type-certification_exam .lms-exam-submit,
.lms-exam-submit {
    display: block; width: 100%; margin-top: 6px;
    background: var(--lmsx-accent); color: #fff; border: none;
    border-radius: var(--lmsx-radius-sm); padding: 15px 20px;
    font-size: 16px; font-weight: 700; cursor: pointer; text-align: center;
    transition: background .15s ease;
}
.single-product .product.product-type-certification_exam .lms-exam-submit:hover,
.lms-exam-submit:hover { background: var(--lmsx-accent-d); }
.lms-exam-submit.disabled, .lms-exam-submit[disabled] { background: #cbd5e1; color: #fff; cursor: not-allowed; }

/* ---- tabs: overview / roadmap / reviews / testimonials ------------------- */
.lmsx-body { margin-top: 56px; }
.lmsx-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px; border-bottom: 1px solid var(--lmsx-line); }
.lmsx-tab { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; padding: 0 0 14px; margin-bottom: -1px; font-size: 16px; font-weight: 700; color: var(--lmsx-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.lmsx-tab:hover { color: var(--lmsx-ink); }
.lmsx-tab.active { color: var(--lmsx-ink); border-bottom-color: var(--lmsx-accent); }
.lmsx-tab-ico { display: inline-flex; }
.lmsx-tab-ico svg { display: block; }
.lmsx-panels { padding-top: 32px; }
.lmsx-panel { display: none; }
.lmsx-panel.active { display: block; }
.lmsx-empty { color: var(--lmsx-muted); font-size: 15px; }

/* ---- rich content (ContentBlocks::render + Overview) --------------------- */
.lmsx-rich { color: var(--lmsx-body); font-size: 16px; line-height: 1.7; }
.lmsx-rich p { margin: 0 0 1em; }
.lmsx-rich h2, .lmsx-rich h3, .lmsx-rich h4 { color: var(--lmsx-ink); line-height: 1.3; margin: 1.4em 0 .6em; }
.lmsx-rich ul, .lmsx-rich ol { margin: 0 0 1em; padding-left: 1.4em; }
.lmsx-rich li { margin: .35em 0; }
.lmsx-rich img { max-width: 100%; height: auto; border-radius: var(--lmsx-radius-sm); }
.lmsx-rich a { color: var(--lmsx-accent); }

.lmsx-rich .lcb-render-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.lmsx-rich .lcb-col { grid-column: span 12; min-width: 0; }
.lmsx-rich .lcb-col-1 { grid-column: span 1; } .lmsx-rich .lcb-col-2 { grid-column: span 2; }
.lmsx-rich .lcb-col-3 { grid-column: span 3; } .lmsx-rich .lcb-col-4 { grid-column: span 4; }
.lmsx-rich .lcb-col-5 { grid-column: span 5; } .lmsx-rich .lcb-col-6 { grid-column: span 6; }
.lmsx-rich .lcb-col-7 { grid-column: span 7; } .lmsx-rich .lcb-col-8 { grid-column: span 8; }
.lmsx-rich .lcb-col-9 { grid-column: span 9; } .lmsx-rich .lcb-col-10 { grid-column: span 10; }
.lmsx-rich .lcb-col-11 { grid-column: span 11; } .lmsx-rich .lcb-col-12 { grid-column: span 12; }
.lmsx-rich .lcb-section h4 { margin-top: 0; }
.lmsx-rich .lcb-btn { display: inline-block; background: var(--lmsx-accent); color: #fff; padding: 11px 20px; border-radius: var(--lmsx-radius-sm); font-weight: 700; text-decoration: none; }
.lmsx-rich .lcb-btn:hover { background: var(--lmsx-accent-d); }
.lmsx-rich .lcb-pdf { display: flex; align-items: center; gap: 14px; border: 1px solid var(--lmsx-line); border-radius: var(--lmsx-radius-sm); padding: 14px 16px; background: var(--lmsx-surface); margin: 0 0 12px; flex-wrap: wrap; }
.lmsx-rich .lcb-pdf-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.lmsx-rich .lcb-pdf-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 140px; min-width: 0; }
.lmsx-rich .lcb-pdf-label { font-weight: 700; color: var(--lmsx-ink); }
.lmsx-rich .lcb-pdf-size { font-size: 13px; color: var(--lmsx-muted); }
.lmsx-rich .lcb-pdf-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.lmsx-rich .lcb-pdf-btn { display: inline-block; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.lmsx-rich .lcb-pdf-view { background: var(--lmsx-soft); color: var(--lmsx-ink); border: 1px solid var(--lmsx-line); }
.lmsx-rich .lcb-pdf-view:hover { border-color: var(--lmsx-accent); color: var(--lmsx-accent); }
.lmsx-rich .lcb-pdf-download { background: var(--lmsx-accent); color: #fff; }
.lmsx-rich .lcb-pdf-download:hover { background: var(--lmsx-accent-d); }
.lmsx-rich .lcb-video { margin: 0 0 1em; }
.lmsx-rich .lcb-video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--lmsx-radius-sm); overflow: hidden; }
.lmsx-rich .lcb-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lmsx-rich .lcb-video video { width: 100%; border-radius: var(--lmsx-radius-sm); }

/* ---- mobile sticky purchase bar ------------------------------------------ */
.lmsx-stickybar { display: none; }

@media (max-width: 860px) {
    .single-product .product.product-type-certification_exam { gap: 28px; }
    .single-product .product.product-type-certification_exam .summary.entry-summary { position: static; top: auto; }
    .lmsx-title { font-size: 30px; }
    .lmsx-body { margin-top: 36px; }
    .lmsx-arrow { width: 38px; height: 38px; font-size: 20px; }
    .lmsx-rich .lcb-render-grid { gap: 16px; }
    .lmsx-rich .lcb-col[class*="lcb-col-"] { grid-column: span 12; }

    .lmsx-stickybar {
        display: flex; align-items: center; justify-content: space-between; gap: 14px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
        background: var(--lmsx-surface); border-top: 1px solid var(--lmsx-line);
        padding: 12px 16px; box-shadow: 0 -6px 20px rgba(15,23,42,.08);
    }
    .lmsx-stickybar-price { font-size: 18px; font-weight: 800; color: var(--lmsx-ink); }
    .lmsx-stickybar-price del { color: var(--lmsx-muted); font-weight: 500; font-size: .7em; }
    .lmsx-stickybar-cta { flex: 0 0 auto; background: var(--lmsx-accent); color: #fff; border: none; border-radius: var(--lmsx-radius-sm); padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer; }
    .lmsx-stickybar-cta:hover { background: var(--lmsx-accent-d); }
}

@media (max-width: 480px) {
    .lmsx-buybox { padding: 20px 18px 22px; }
    .lmsx-title { font-size: 26px; }
    .lmsx-price { font-size: 28px; }
    .lmsx-tabs { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .lmsx-dot { transition: none; }
}
