/*
 * AtHealth LMS — Public Styles
 */

/* ── Search / sort controls (My Courses + My Certificates) ───────────── */

.alms-list-controls {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    align-items: center;
}

.alms-list-search {
    flex: 1 1 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.alms-list-sort {
    flex: 0 0 auto;
    width: auto !important;  /* override Astra's global select { width:100% } */
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9375rem;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.alms-list-no-results {
    color: #666;
    font-style: italic;
    padding: 12px 0;
}

/* ── WooCommerce catalog: equal-height product cards ─────────────────── */
/* Replaces the separate WooCommerce Align Buttons plugin. */

ul.products li.product {
    display: flex !important;
    flex-direction: column;
}

ul.products li.product > a.woocommerce-LoopProduct-link {
    flex: 1 1 auto;
}

ul.products li.product .button.add_to_cart_button,
ul.products li.product a.button {
    margin-top: auto;
    display: block;
}

/* ── My Courses ───────────────────────────────────────────────────────── */

.alms-course-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .alms-course-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .alms-course-list { grid-template-columns: 1fr; }
}

/* .alms-course-card pre-v2 styles removed — card now uses .ahs-pc (AHS_Product_Card). */

.alms-progress-bar {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.alms-progress-bar__fill {
    height: 100%;
    background: #2e7d32;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.alms-progress-bar__label {
    font-size: 0.8125rem;
    color: #555;
}

/* ── Syllabus ─────────────────────────────────────────────────────────── */

.alms-syllabus__header {
    margin-bottom: 16px;
}

.alms-syllabus__back {
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 8px;
}

.alms-syllabus__toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.alms-syllabus__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

/* Higher specificity (.alms-syllabus parent) beats Astra's ol > li { display: list-item !important } */
.alms-syllabus .alms-syllabus__list > li {
    display: flex !important;
    flex-wrap: wrap;
    list-style: none !important;
    align-items: baseline;
    gap: 4px 8px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9375rem;
}

/* The lesson link sits inline with the status icon; takes remaining row width. */
.alms-syllabus .alms-syllabus__list > li > a {
    flex: 1;
}

/* Audio wrap forces a full-width row beneath the title. */
.alms-syllabus__audio-wrap {
    flex-basis: 100%;
    padding-left: 28px; /* align with the link text */
}

.alms-syllabus__audio audio {
    display: block;
    width: 100%;
    max-width: 480px;
}

.alms-syllabus__audio-item {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.alms-syllabus__audio-item:first-child {
    padding-top: 4px;
    margin-top: 4px;
    border-top: none;
}

.alms-syllabus__audio-title {
    margin: 0 0 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.alms-syllabus__status {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    color: #aaa;
}

.alms-syllabus__lesson--complete .alms-syllabus__status {
    color: #2e7d32;
}

.alms-syllabus__lesson--locked {
    opacity: 0.55;
}

.alms-syllabus__lock-note {
    font-size: 0.8125rem;
    color: #777;
}

.alms-syllabus__ce-test,
.alms-syllabus__evaluation {
    font-weight: 600;
}

/* ── Lesson navigation widget [alms_lesson_navigation] ────────────────── */

/* Note: position:sticky on .alms-lesson-nav-widget does not work — Astra uses a float layout
   where #secondary height equals only the widget's own height, so sticky has no room to
   operate. Astra Pro's built-in sticky sidebar toggle is the supported path for this feature. */

.alms-lesson-nav-widget__course-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.alms-lesson-nav-widget__course-title a {
    color: inherit;
    text-decoration: none;
}

.alms-lesson-nav-widget__course-title a:hover {
    text-decoration: underline;
}

.alms-lesson-nav-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alms-nav-lesson {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.alms-nav-lesson:last-child {
    border-bottom: none;
}

.alms-nav-lesson a {
    display: flex;
    gap: 5px;
    flex: 1;
    color: #333;
    text-decoration: none;
}

.alms-nav-lesson a:hover {
    color: #0073aa;
}

.alms-nav-lesson__num {
    flex-shrink: 0;
    color: #999;
}

.alms-nav-lesson__check {
    flex-shrink: 0;
    color: #2e7d32;
    font-size: 0.75rem;
}

.alms-nav-lesson--current a {
    font-weight: 700;
    color: #0073aa;
}

.alms-nav-lesson--viewed .alms-nav-lesson__num {
    color: #2e7d32;
}

.alms-lesson-nav-widget__divider {
    border-top: 1px solid #e0e0e0;
    margin: 10px 0 4px;
}

.alms-lesson-nav-widget__extras {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alms-lesson-nav-widget__extras .alms-nav-extra {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.875rem;
}

.alms-lesson-nav-widget__extras .alms-nav-extra a {
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.alms-lesson-nav-widget__extras .alms-nav-extra a:hover {
    text-decoration: underline;
}

.alms-nav-extra--current a {
    font-weight: 700;
    color: #0073aa;
}

.alms-nav-extra--done a {
    color: #2e7d32;
}

/* ── Lesson viewer ────────────────────────────────────────────────────── */

.alms-lesson__header {
    margin-bottom: 20px;
}

.alms-lesson__back {
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 8px;
}

.alms-lesson__title {
    margin: 0;
}

.alms-lesson__content {
    margin-bottom: 32px;
    line-height: 1.7;
}

.alms-lesson__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    gap: 10px;
}

.alms-lesson-pdf__embed {
    display: block;
    width: 100%;
    min-height: 800px;
    border: 1px solid #ddd;
}

.alms-lesson-audio__player,
.alms-lesson-video__player iframe,
.alms-lesson-video__player video {
    max-width: 100%;
    width: 100%;
    margin-top: 16px;
}

.alms-lesson-scorm__toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.alms-lesson-scorm__fullscreen-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    font-weight: normal !important;
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    color: #555 !important;
    line-height: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    width: auto !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.alms-lesson-scorm__fullscreen-btn:hover {
    background: #e8e8e8 !important;
    color: #333 !important;
}

.alms-lesson-scorm__fullscreen-btn svg {
    width: 11px !important;
    height: 11px !important;
    flex-shrink: 0;
}

.alms-lesson-scorm__wrap {
    width: 100%;
    height: 78vh;
    min-height: 520px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.alms-lesson-scorm__frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.alms-lesson-scorm__hint {
    font-size: 13px;
    color: #666;
    margin: 10px 0 0;
    text-align: center;
}

/* ── Shared notices ───────────────────────────────────────────────────── */

.alms-notice {
    padding: 14px 18px;
    border-radius: 4px;
    margin: 16px 0;
    border: 1px solid transparent;
}

.alms-notice--success {
    background: #edf7ed;
    border-color: #a5d6a7;
    color: #1b5e20;
}

.alms-notice--error {
    background: #fff4f4;
    border-color: #ef9a9a;
    color: #7f1d1d;
}

.alms-notice--info {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #0d47a1;
}

.alms-notice--warning {
    background: #fff8e1;
    border-color: #ffe082;
    color: #5d4037;
}

.alms-notice p { margin: 0 0 8px; }
.alms-notice p:last-child { margin-bottom: 0; }

.alms-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: alms-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}
/* Ensure the hidden attribute always wins over display:inline-block */
.alms-spinner[hidden] {
    display: none !important;
}

@keyframes alms-spin { to { transform: rotate(360deg); } }

/* ── CE Test ──────────────────────────────────────────────────────────── */

.alms-ce-test__header {
    margin-bottom: 20px;
}

.alms-ce-test__instructions {
    color: #555;
    font-size: 0.9375rem;
}

.alms-question {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
}

.alms-question__text {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alms-question--missed {
    border-left: 4px solid #dc3232;
    background: #fff8f8;
}

.alms-question--unanswered {
    border-left: 4px solid #f0a500;
    background: #fffdf0;
}

.alms-answer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alms-answer-list li {
    margin-bottom: 6px;
}

.alms-answer-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
}

.alms-answer-label input[type="radio"] {
    flex-shrink: 0;
    margin-top: 2px;
}

.alms-ce-test__submit,
.alms-evaluation__submit {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alms-ce-test__result,
.alms-eval-result {
    margin-top: 16px;
}

/* ── Test Review ──────────────────────────────────────────────────────── */

.alms-test-review {
    margin-top: 24px;
}

.alms-test-review__heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.alms-review-question {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-left: 4px solid #ccc;
    background: #fafafa;
    border-radius: 0 4px 4px 0;
}

.alms-review-question--correct {
    border-left-color: #2e7d32;
    background: #e8f5e9;
}

.alms-review-question--wrong {
    border-left-color: #c62828;
    background: #fdecea;
}

.alms-answer--correct {
    display: block;
    color: #1b5e20;
    font-weight: 600;
    background: #e8f5e9;
    border-radius: 3px;
    padding: 3px 7px;
}

.alms-answer--wrong {
    display: block;
    color: #b71c1c;
    font-weight: 600;
    background: #fdecea;
    border-radius: 3px;
    padding: 3px 7px;
}

.alms-answer--correct .alms-answer-icon {
    color: #2e7d32;
}

.alms-answer--wrong .alms-answer-icon {
    color: #c62828;
}

.alms-answer-icon {
    display: inline-block;
    width: 1em;
    font-style: normal;
}

/* ── Evaluation ───────────────────────────────────────────────────────── */

.alms-evaluation__header {
    margin-bottom: 20px;
}

.alms-evaluation__instructions {
    color: #555;
    font-size: 0.9375rem;
}

.alms-eval-question {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
}

.alms-eval-question__text {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alms-required {
    color: #dc3232;
    margin-left: 3px;
}

.alms-essay-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
}

.alms-attestation-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.9375rem;
    cursor: pointer;
}

/* ── Certificate ──────────────────────────────────────────────────────── */

.alms-certificate {}
.alms-certificate__header {}
.alms-certificate__body {}
.alms-certificate__print-btn {}

/* ── Certificates list ────────────────────────────────────────────────── */

.alms-certificates {
    margin: 0;
}

.alms-certificates h2 {
    margin-bottom: 20px;
}

.alms-certs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.alms-certs-table th,
.alms-certs-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}

.alms-certs-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    border-bottom: 2px solid #ddd;
}

.alms-certs-table tbody tr:last-child td {
    border-bottom: none;
}

.alms-certs-table tbody tr:hover td {
    background: #fafafa;
}

.alms-certs-table__course {
    font-weight: 600;
    color: #333;
}

.alms-certs-table__date {
    white-space: nowrap;
    color: #555;
}

.alms-certs-table__credits {
    white-space: nowrap;
    font-weight: 600;
    color: #2e7d32;
    text-align: center;
}

.alms-certs-table__actions,
.alms-certs-table__letter {
    white-space: nowrap;
    text-align: center;
}

/* Stack: View button on top, Download text link centred below */
.alms-certs-table__actions a,
.alms-certs-table__letter a {
    display: block;
}

.alms-certs-table__actions .button,
.alms-certs-table__letter .button {
    margin-bottom: 5px;
}

/* Download text link — inherits theme link colour, no button chrome */
.alms-dl-link {
    font-size: 0.8125rem;
    text-decoration: underline;
}

.alms-cert-pending {
    font-size: 0.875rem;
    color: #888;
    font-style: italic;
}

@media ( max-width: 640px ) {
    .alms-certs-table,
    .alms-certs-table thead,
    .alms-certs-table tbody,
    .alms-certs-table th,
    .alms-certs-table td,
    .alms-certs-table tr {
        display: block;
    }

    .alms-certs-table thead {
        display: none;
    }

    .alms-certs-table tbody tr {
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 12px;
        padding: 10px 14px;
        background: #fff;
    }

    .alms-certs-table td {
        border: none;
        padding: 4px 0;
        font-size: 0.875rem;
    }

    .alms-certs-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #888;
        margin-bottom: 2px;
    }

    .alms-certs-table__credits {
        text-align: left;
    }

    .alms-certs-table__actions .button {
        display: inline-block;
        margin-top: 4px;
    }
}

/* ── Preview Test modal ───────────────────────────────────────────────── */

dialog.alms-preview-dialog {
    width: min(90vw, 760px);
    max-height: 90vh;
    overflow-y: auto;
    border: none;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}
dialog.alms-preview-dialog::backdrop { background: rgba(0,0,0,0.6); }

.alms-preview-dialog__close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    z-index: 1;
}
.alms-preview-dialog__close:hover { background: #f5f5f5; }

.alms-preview-dialog__body {
    padding: 24px 28px;
}

.alms-preview-dialog__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.alms-preview-dialog__title {
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--ahs-font-serif, Georgia, serif);
}

.alms-preview-dialog__note {
    color: #666;
    font-size: 13px;
    margin: 0 0 20px;
}

/* ── Print All Content ────────────────────────────────────────────────── */

@media print {
    .alms-print-lesson + .alms-print-lesson { page-break-before: always; }
}

/* ── Checkout / My Account profile fields ─────────────────────────────── */

.alms-profile-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ── License repeater ─────────────────────────────────────────────────── */

.alms-license-section {
    margin: 24px 0 16px;
}

.alms-license-section__heading {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.alms-license-section__desc {
    font-size: 0.875rem;
    color: #555;
    margin: 0 0 12px;
}

.alms-license-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.alms-license-row__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.alms-license-row__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alms-license-row__field label {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.alms-license-row__field--state  { flex: 0 0 60px; }
.alms-license-row__field--number { flex: 1 1 140px; }
.alms-license-row__field--renewal { flex: 0 0 140px; }
.alms-license-row__field--frequency { flex: 1 1 160px; }

.alms-state-input {
    text-transform: uppercase;
}

.alms-remove-license {
    flex-shrink: 0;
    color: #a00;
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-bottom: 2px;
}

.alms-remove-license:hover {
    color: #dc3232;
}

.alms-add-license-btn {
    margin-top: 4px;
    font-size: 0.875rem;
}

@media ( max-width: 600px ) {
    .alms-license-row {
        flex-direction: column;
        align-items: stretch;
    }

    .alms-license-row__fields {
        flex-direction: column;
    }

    .alms-license-row__field--state,
    .alms-license-row__field--renewal {
        flex: 1 1 auto;
    }

    .alms-remove-license {
        align-self: flex-end;
    }
}

/* ── Format-type badge (inline pill below product title) ─────────────────── */

.alms-format-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alms-format-badge__icon {
    font-size: 14px;
    line-height: 1;
}

.alms-format-badge--text  { background: #e8f0fe; color: #1a56a4; }
.alms-format-badge--audio { background: #f0e8fe; color: #6d28d9; }
.alms-format-badge--video { background: #fce8e8; color: #b91c1c; }

/* ── Course Details section (ASWB compliance fields) ─────────────────────── */

.alms-course-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.alms-course-details__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
}

.alms-course-details__row dt {
    font-weight: 600;
    white-space: nowrap;
    min-width: 160px;
}

.alms-course-details__row dt::after {
    content: ':';
}

.alms-course-details__row dd {
    margin: 0;
    flex: 1;
    min-width: 180px;
}

/* Hide WooCommerce's "Tagged as:" product meta line — format shown via badge */
.woocommerce div.product .product_meta .tagged_as {
    display: none;
}

/* ── LMS product page: WC layout fully suppressed; hero card takes over ─────── */

.alms-lms-product .woocommerce div.product div.images {
    display: none;
}

.alms-lms-product .woocommerce div.product div.summary,
.alms-lms-product .woocommerce div.product .entry-summary {
    width: 100% !important;
    float: none !important;
    clear: both;
    padding: 0;
    margin: 0;
}

/* PHP (suppress_wc_summary_early) is the primary removal mechanism.
   These rules are a CSS fallback targeting elements by their WC class names,
   so they work regardless of theme wrapper structure. */
.alms-lms-product h1.product_title.entry-title,
.alms-lms-product .woocommerce-product-rating,
.alms-lms-product p.price,
.alms-lms-product .entry-summary form.cart,
.alms-lms-product .product_meta,
.alms-lms-product .woocommerce-product-details__short-description,
.alms-lms-product .alms-format-badge,
.alms-lms-product .alms-recommend-stat--summary {
    display: none !important;
}

/* Hide WC product tabs (Description / Reviews / Attributes) on LMS pages. */
.alms-lms-product .woocommerce-tabs {
    display: none !important;
}

.alms-lms-product .woocommerce div.product {
    margin-bottom: 0;
}

/* ── Recommend stat (below Add to Cart in product summary) ───────────────── */

.alms-recommend-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #f0f7ff;
    border-radius: 6px;
    border: 1px solid #cde0f5;
}

.alms-recommend-stat--summary {
    margin-bottom: 0;
}

.alms-recommend-stat__pct {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1;
    flex-shrink: 0;
}

.alms-recommend-stat__label {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

/* ── Product page: course sections layout ──────────────────────────────── */

.alms-course-page {
    /* clear: both is required even though .alms-course-page is a sibling of
       div.product, not a child. Astra omits div.product's clearfix, so the
       floated gallery (left 48%) and summary (right 48%) extend past div.product's
       zero height and would overlap our grid without this. */
    clear: both;
    margin-top: 40px;
}

/* ── Hero card ───────────────────────────────────────────────────────────── */

.alms-course-hero {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}

.alms-course-hero__banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.alms-course-hero__banner--text  { background: #526070; }
.alms-course-hero__banner--audio { background: #6865A4; }
.alms-course-hero__banner--video { background: #8B2020; }

.alms-course-hero__format {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.alms-course-hero__pills {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.alms-course-hero__pill {
    font-size: 11px;
    font-weight: 600;
    background: rgba(0,0,0,.2);
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
}

.alms-course-hero__pill--credits {
    font-size: 13px;
    font-weight: 800;
}

.alms-course-hero__body {
    padding: 20px 20px 18px;
}

.alms-course-hero__title {
    font-size: 26px;
    font-weight: 700;
    color: #2D2D2D;
    line-height: 1.25;
    margin: 0 0 12px;
}

.alms-course-hero__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #444;
}

.alms-course-hero__stars {
    color: #F5A623;
    font-size: 16px;
    line-height: 1;
}

.alms-course-hero__rating-num {
    font-weight: 700;
    color: #2D2D2D;
}

.alms-course-hero__reviews {
    color: #6B6B6B;
}

.alms-course-hero__sep {
    color: #ddd;
}

.alms-course-hero__recommend {
    color: #2E8B57;
    font-weight: 600;
}

.alms-course-hero__difficulty {
    color: #6B6B6B;
}

/* ── Horizontal sticky anchor nav (with price + cart on right) ───────────── */

.alms-course-nav {
    z-index: 40;
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
}

/* JS adds this class when the nav has scrolled past its natural position.
   The top value is set inline by JS (adminH + mastheadH) so it clears both
   the WP admin bar and the Astra site header. */
.alms-course-nav--stuck {
    position: fixed !important;
    left: 0;
    right: 0;
    z-index: 55; /* below masthead z-index (60) so it slides under, not above */
}

/* Invisible spacer that holds the layout height while the nav is fixed. */
.alms-course-nav-placeholder {
    display: none;
}

.alms-course-nav-placeholder.is-active {
    display: block;
}

.alms-course-nav.is-scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
}

.alms-course-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.alms-course-nav ul::-webkit-scrollbar {
    display: none;
}

.alms-course-nav li {
    margin: 0;
    flex-shrink: 0;
}

.alms-course-nav__link {
    display: inline-block;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #6B6B6B;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s;
    line-height: 1.4;
}

.alms-course-nav__link:hover {
    color: #6B63AD;
}

.alms-course-nav__link.is-active {
    color: #6B63AD;
    border-bottom-color: #6B63AD;
    font-weight: 700;
}

.alms-course-nav__cart {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    flex-shrink: 0;
    border-left: 1px solid #e0e0e0;
}

.alms-course-nav__price {
    font-size: 17px;
    font-weight: 700;
    color: #D94040;
    white-space: nowrap;
}

.alms-course-nav__price .woocommerce-Price-amount,
.alms-course-nav__price bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.alms-course-nav__cta {
    display: inline-block;
    background: #6B63AD;
    color: #fff !important;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s;
}

.alms-course-nav__cta:hover {
    background: #4E4890;
    color: #fff !important;
}

.alms-course-nav__cta--enrolled {
    background: #2E8B57;
}

.alms-course-nav__cta--enrolled:hover {
    background: #236944;
}

/* ── Two-column body ─────────────────────────────────────────────────────── */

.alms-course-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    margin-top: 20px;
}

@media (max-width: 860px) {
    .alms-course-body {
        grid-template-columns: 1fr;
    }
    .alms-course-nav {
        display: none !important;
    }
    .alms-course-sidebar {
        display: none !important;
    }
    .alms-course-page {
        padding-bottom: 120px;
    }
    .alms-course-section {
        padding: 18px 16px;
        scroll-margin-top: 88px;
    }
    .admin-bar .alms-course-section {
        scroll-margin-top: 120px;
    }
    .alms-course-section__title {
        font-size: 16px;
    }
}

/* ── Sticky sidebar ──────────────────────────────────────────────────────── */

.alms-course-sidebar {
    position: sticky;
    top: 120px; /* masthead ~60 + course nav ~44 + gap */
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-bar .alms-course-sidebar {
    top: 152px; /* + 32px admin bar */
}

.alms-sidebar-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    overflow: hidden;
}

.alms-sidebar-price-block {
    background: #EEEDF8;
    padding: 16px 20px;
    border-bottom: 1px solid #D5D2EF;
}

.alms-sidebar-price {
    font-size: 26px;
    font-weight: 700;
    color: #D94040;
    line-height: 1.2;
    margin-bottom: 2px;
}

.alms-sidebar-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.alms-sidebar-credits {
    font-size: 13px;
    color: #6B6B6B;
}

.alms-sidebar-cta-block {
    padding: 16px 20px;
}

.alms-sidebar-cta {
    display: block;
    width: 100%;
    padding: 12px;
    background: #6B63AD;
    color: #fff !important;
    border-radius: 4px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.15s;
    box-sizing: border-box;
}

.alms-sidebar-cta:hover {
    background: #4E4890;
    color: #fff !important;
}

.alms-sidebar-cta--enrolled {
    background: #2E8B57;
}

.alms-sidebar-cta--enrolled:hover {
    background: #236944;
}

.alms-sidebar-benefits {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.alms-sidebar-benefits li {
    font-size: 12px;
    color: #555;
    line-height: 1.9;
    padding-left: 18px;
    position: relative;
}

.alms-sidebar-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2E8B57;
    font-weight: 700;
}

.alms-sidebar-contact {
    border-top: 1px solid #e0e0e0;
    padding: 10px 20px;
    text-align: center;
}

.alms-sidebar-contact a {
    font-size: 13px;
    color: #6B63AD;
    font-weight: 600;
    text-decoration: none;
}

.alms-sidebar-contact a:hover {
    text-decoration: underline;
}

.alms-sidebar-onpage {
    padding: 14px 16px;
}

.alms-sidebar-onpage__heading {
    font-size: 11px;
    font-weight: 700;
    color: #6B6B6B;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
}

.alms-sidebar-onpage__link {
    display: block;
    font-size: 13px;
    color: #6B63AD;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
}

.alms-sidebar-onpage__link:last-child {
    border-bottom: none;
}

.alms-sidebar-onpage__link:hover {
    text-decoration: underline;
}

/* ── Sections (card style) ───────────────────────────────────────────────── */

.alms-course-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 16px;
    scroll-margin-top: 120px; /* masthead ~60 + course nav ~44 + gap */
}

.admin-bar .alms-course-section {
    scroll-margin-top: 152px; /* + 32px admin bar */
}

.alms-course-section:last-child {
    margin-bottom: 0;
}

/* Ensures last section card bottom border is visible before related courses */
.alms-course-body-spacer { height: 32px; }

/* ── Mobile sticky CTA bar (≤860px only) ────────────────────────────────── */

.alms-mobile-cta-bar {
    display: none;
}

@media (max-width: 860px) {
    .alms-mobile-cta-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 70;
        background: #fff;
        border-top: 1px solid #ddd;
        box-shadow: 0 -4px 16px rgba(0,0,0,.10);
        padding: 10px 14px;
    }

    .alms-mobile-cta-bar__top {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }

    .alms-mobile-cta-bar__price {
        font-family: 'Lora', serif;
        font-size: 22px;
        font-weight: 700;
        color: #D94040;
        line-height: 1;
    }

    .alms-mobile-cta-bar__price .woocommerce-Price-amount,
    .alms-mobile-cta-bar__price bdi {
        font-size: inherit;
        font-weight: inherit;
        color: inherit;
    }

    /* Strip the credits suffix appended by append_credits_to_price() — the bar has its own display */
    .alms-mobile-cta-bar__price .alms-price-credits {
        display: none;
    }

    .alms-mobile-cta-bar__credits {
        font-size: 12px;
        color: #6B6B6B;
        margin-left: 8px;
    }

    .alms-mobile-cta-bar__btn {
        display: block;
        width: 100%;
        padding: 13px;
        background: #6B63AD;
        color: #fff !important;
        border-radius: 4px;
        text-align: center;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none !important;
        transition: background 0.15s;
        box-sizing: border-box;
    }

    .alms-mobile-cta-bar__btn:hover {
        background: #4E4890;
        color: #fff !important;
    }

    .alms-mobile-cta-bar__btn--enrolled {
        background: #2E8B57;
    }

    .alms-mobile-cta-bar__btn--enrolled:hover {
        background: #236944;
    }

    /* Push AI chat bubble above the CTA bar on LMS product pages */
    .alms-lms-product #alms-chat-widget {
        bottom: 104px;
    }
}

/* ── Related courses grid ────────────────────────────────────────────────── */

.alms-related-courses {
    margin-top: 28px;
}

.alms-related-courses__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #2D2D2D;
}

.alms-related-courses__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 860px) {
    .alms-related-courses__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .alms-related-courses__grid { grid-template-columns: 1fr; }
}

/* .alms-related-card styles removed — card now uses .ahs-pc--related (AHS_Product_Card). */

.alms-course-section__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a1a;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.alms-course-section__count {
    font-size: 14px;
    font-weight: 400;
    color: #777;
}

/* Prose content: links, lists, paragraphs inside sections */
.alms-prose p { margin-bottom: 1em; }
.alms-prose p:last-child { margin-bottom: 0; }
.alms-prose ul, .alms-prose ol { margin: 0 0 1em 1.5em; }
.alms-prose a { color: #2271b1; }

/* ── Learning objectives ──────────────────────────────────────────────────── */

.alms-objectives-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px 24px;
}

.alms-objectives-list__item {
    display: flex;
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.alms-objectives-list__icon {
    color: #2271b1;
    flex-shrink: 0;
    font-style: normal;
    line-height: 1.5;
}

/* ── Syllabus list ───────────────────────────────────────────────────────── */

.alms-syllabus-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    counter-reset: syllabus-counter;
}

.alms-syllabus-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    counter-increment: syllabus-counter;
}

.alms-syllabus-list__item:last-child {
    border-bottom: none;
}

.alms-syllabus-list__icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.alms-syllabus-list__title {
    flex: 1;
    color: #333;
}

.alms-syllabus-assessment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: #555;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 6px;
}

.alms-syllabus-assessment-row__icon {
    font-size: 15px;
    width: 22px;
    text-align: center;
}

/* ── Person cards (author + instructors) ─────────────────────────────────── */

.alms-person-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.alms-person-card--instructor + .alms-person-card--instructor {
    padding-top: 24px;
    border-top: 1px solid #ebebeb;
}

.alms-person-card__photo {
    flex-shrink: 0;
}

.alms-person-card__img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.alms-person-card__name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.alms-person-card__credentials {
    font-size: 13px;
    font-weight: 400;
    color: #777;
}

.alms-person-card__bio {
    font-size: 14px;
    color: #444;
}

/* ── Performance / ratings ───────────────────────────────────────────────── */

.alms-performance {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
}

.alms-performance__rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alms-performance__avg {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.alms-performance__stars {
    font-size: 22px;
    color: #f0a500;
    letter-spacing: 2px;
}

.alms-star--empty {
    color: #ccc;
}

.alms-performance__count {
    font-size: 13px;
    color: #777;
}

.alms-performance__recommend {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alms-performance__recommend-pct {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1;
}

.alms-performance__recommend-label {
    font-size: 13px;
    color: #555;
    max-width: 180px;
    line-height: 1.4;
}

/* ── Enrollment CTA ──────────────────────────────────────────────────────── */

.alms-enrollment-cta {
    margin: 12px 0 20px;
}

.alms-enrollment-cta__status {
    margin-bottom: 12px;
}

.alms-enrollment-cta__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.alms-enrollment-cta__status--complete .alms-enrollment-cta__badge {
    background: #e6f4ea;
    color: #007017;
}

.alms-enrollment-cta__status--progress .alms-enrollment-cta__badge {
    background: #e8f0fb;
    color: #2271b1;
}

.alms-enrollment-cta__progress-text {
    display: block;
    font-size: 13px;
    color: #555;
    margin-top: 8px;
}

.alms-enrollment-cta__bar-wrap {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
    max-width: 280px;
}

.alms-enrollment-cta__bar {
    height: 100%;
    background: #2271b1;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.alms-enrollment-cta__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ════════════════════════════════════════════════════════════════════════════
   Session E — LMS screen redesign
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Syllabus v2 ─────────────────────────────────────────────────────────── */

.alms-syl-card {
    border-radius: var(--ahs-radius-card, 6px);
    border: var(--ahs-border, 1px solid #ddd);
    box-shadow: var(--ahs-shadow-card, 0 1px 3px rgba(0,0,0,.07));
    overflow: hidden;
    margin-bottom: 28px;
}

.alms-syl-card__format-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #2D2A48;
    color: rgba(255,255,255,.85);
    font-family: var(--ahs-font-sans, sans-serif);
    font-size: 13px;
    font-weight: 600;
}

.alms-syl-card__format-icon {
    display: flex;
    align-items: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: .9;
}

.alms-syl-card__format-icon svg {
    width: 18px;
    height: 18px;
}

.alms-syl-card__format-label {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
}

.alms-syl-card__cat-pill {
    background: rgba(255,255,255,.12);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.alms-syl-card__credits {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.7);
}

.alms-syl-card__body {
    padding: 20px 24px 24px;
    background: #fff;
}

.alms-syl-card__title {
    margin: 6px 0 16px;
    font-family: var(--ahs-font-serif, Georgia, serif);
    font-size: 1.35rem;
    line-height: 1.3;
    color: var(--ahs-neutral-800, #2d2d2d);
}

/* Progress bar inside the syllabus card */
.alms-syl-progress {
    margin-bottom: 18px;
}

.alms-syl-progress__bar {
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.alms-syl-progress__fill {
    height: 100%;
    background: var(--ahs-green, #2E8B57);
    border-radius: 3px;
    transition: width .4s ease;
}

.alms-syl-progress__label {
    font-size: 12px;
    color: var(--ahs-neutral-600, #6b6b6b);
}

/* Toolbar inside the card */
.alms-syllabus__toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Section wrappers (Lessons / Assessment) */
.alms-syl-section {
    margin-bottom: 8px;
}

.alms-syl-section__label {
    font-family: var(--ahs-font-sans, sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ahs-neutral-600, #6b6b6b);
    margin: 0 0 8px;
    padding: 0;
}

.alms-syl-section--assessment {
    margin-top: 12px;
}

.alms-syllabus__list--assessment {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

/* Completion circle SVG icons */
.alms-syl-check {
    width: 18px;
    height: 18px;
    color: var(--ahs-green, #2E8B57);
    display: block;
}

.alms-syl-circle {
    width: 18px;
    height: 18px;
    color: #ccc;
    display: block;
}

.alms-syllabus__status {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
}

/* Gate note on assessment items */
.alms-syllabus__gate-note {
    font-size: 11px;
    color: var(--ahs-neutral-600, #6b6b6b);
    margin-left: 4px;
    font-style: italic;
}

/* ── Lesson v2 ───────────────────────────────────────────────────────────── */

/* 3 px reading progress bar, fixed at very top */
.alms-lesson-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    background: transparent;
    pointer-events: none;
}

.admin-bar .alms-lesson-progress {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .alms-lesson-progress {
        top: 46px;
    }
}

.alms-lesson-progress__fill {
    height: 100%;
    background: var(--ahs-purple, #6B63AD);
    transition: width .1s linear;
}

/* Lesson title + breadcrumb */
.alms-lesson__num {
    font-family: var(--ahs-font-sans, sans-serif);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ahs-neutral-600, #6b6b6b);
    margin: 0 0 6px;
}

.alms-lesson__title {
    margin: 0 0 4px;
    font-family: var(--ahs-font-serif, Georgia, serif);
    font-size: 1.6rem;
    line-height: 1.25;
    color: var(--ahs-neutral-800, #2d2d2d);
}

/* Lesson body typography — text lessons */
.alms-lesson__content .alms-lesson-text,
.alms-lesson__content > p,
.alms-lesson__content > div {
    font-family: var(--ahs-font-serif, Georgia, serif);
    font-size: 17px;
    line-height: 1.85;
    color: var(--ahs-neutral-800, #2d2d2d);
}

/* Prev / next nav buttons */
.alms-lesson__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #eee;
    gap: 10px;
    flex-wrap: wrap;
}

.alms-lesson__nav-btn {
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .alms-lesson__nav-btn {
        max-width: 100%;
        flex: 1 1 100%;
        text-align: center;
    }
}

/* ── CE Test v2 ──────────────────────────────────────────────────────────── */

/* Question card layout: number circle + body */
.alms-question {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    transition: background-color .2s, border-color .2s;
}

.alms-question__num-wrap {
    flex-shrink: 0;
    padding-top: 1px;
}

.alms-question__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ahs-purple-pale, #EEEDF8);
    color: var(--ahs-purple, #6B63AD);
    font-family: var(--ahs-font-sans, sans-serif);
    font-size: 14px;
    font-weight: 700;
    transition: background-color .2s, color .2s;
}

.alms-question__num--correct {
    background: #e6f4ea;
    color: #2e7d32;
}

.alms-question__num--wrong {
    background: #fdecea;
    color: #c62828;
}

.alms-question__body {
    flex: 1;
    min-width: 0;
}

.alms-question__text {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

/* After-submit states on the card itself */
.alms-question--graded-correct {
    background: #f4fbf5;
    border-color: #a5d6a7;
}

.alms-question--graded-wrong {
    background: #fff8f8;
    border-color: #ef9a9a;
}

.alms-question--unanswered {
    border-color: var(--ahs-gold, #F5A623);
    background: #fffdf0;
}

/* Answer option rows */
.alms-answer-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alms-answer-option {
    border-radius: 6px;
    border: 1.5px solid #e5e5e5;
    transition: border-color .15s, background-color .15s;
}

.alms-answer-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.alms-answer-option input[type="radio"] {
    flex-shrink: 0;
    accent-color: var(--ahs-purple, #6B63AD);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.alms-answer-option__text {
    flex: 1;
}

.alms-answer-option__tag {
    font-size: 12px;
    font-style: italic;
    color: var(--ahs-neutral-600, #6b6b6b);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Selected (before submit) */
.alms-answer-option--selected {
    border-color: var(--ahs-purple, #6B63AD);
    background: var(--ahs-purple-pale, #EEEDF8);
}

/* After submit: correct answer */
.alms-answer-option--correct {
    border-color: #4caf50;
    background: #f1f8f2;
}

.alms-answer-option--correct .alms-answer-option__tag {
    color: #2e7d32;
    font-style: normal;
    font-weight: 600;
}

/* After submit: wrong selected answer */
.alms-answer-option--wrong {
    border-color: #ef5350;
    background: #fff5f5;
}

.alms-answer-option--wrong .alms-answer-option__tag {
    color: #c62828;
    font-style: normal;
    font-weight: 600;
}

/* Sticky submit bar */
.alms-ce-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    transition: transform .3s ease, opacity .3s ease;
}

.alms-ce-sticky-bar--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.alms-ce-sticky-bar__progress-track {
    height: 3px;
    background: #eee;
}

.alms-ce-sticky-bar__progress-fill {
    height: 100%;
    background: var(--ahs-purple, #6B63AD);
    transition: width .3s ease;
}

.alms-ce-sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    max-width: 860px;
    margin: 0 auto;
}

.alms-ce-sticky-bar__status {
    font-family: var(--ahs-font-sans, sans-serif);
    font-size: 14px;
    color: var(--ahs-neutral-600, #6b6b6b);
}

.alms-ce-sticky-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.alms-ce-sticky-bar__btn {
    min-width: 140px;
}

/* Add bottom padding to the test wrapper so content isn't hidden by sticky bar */
.alms-ce-test {
    padding-bottom: 80px;
}

/* Score panel */
.alms-ce-score-panel {
    text-align: center;
    padding: 40px 32px;
    border-radius: 10px;
    border: 2px solid #e5e5e5;
    margin-bottom: 32px;
    background: #fff;
}

.alms-ce-score-panel--pass {
    border-color: #a5d6a7;
    background: #f8fdf9;
}

.alms-ce-score-panel--fail {
    border-color: #ef9a9a;
    background: #fff8f8;
}

.alms-ce-score-panel__pct {
    font-family: var(--ahs-font-serif, Georgia, serif);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.alms-ce-score-panel--pass .alms-ce-score-panel__pct {
    color: #2e7d32;
}

.alms-ce-score-panel--fail .alms-ce-score-panel__pct {
    color: #c62828;
}

.alms-ce-score-panel__verdict {
    font-family: var(--ahs-font-sans, sans-serif);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.alms-ce-score-panel__verdict--pass { color: #2e7d32; }
.alms-ce-score-panel__verdict--fail { color: #c62828; }

.alms-ce-score-panel__detail {
    font-size: 14px;
    color: var(--ahs-neutral-600, #6b6b6b);
    margin-bottom: 24px;
}

/* Certificate unlocked box (pass) */
.alms-ce-score-panel__cert-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 28px;
    background: #e6f4ea;
    border-radius: 8px;
    border: 1px solid #a5d6a7;
}

.alms-ce-score-panel__cert-icon {
    font-size: 32px;
    line-height: 1;
}

.alms-ce-score-panel__cert-label {
    font-size: 14px;
    font-weight: 700;
    color: #1b5e20;
    margin: 0;
}

.alms-ce-score-panel__cert-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

/* Fail actions */
.alms-ce-score-panel__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* "Test Review" heading below score panel */
.alms-ce-test__review-heading {
    font-size: 16px;
    font-weight: 700;
    margin: 24px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.alms-ce-test__review-anchor {
    scroll-margin-top: 100px;
}

/* ── Session F — Account screens ──────────────────────────────────────────── */

/* ── WC My Account: breadcrumb + nav suppression on inner pages ────────────── */

.alms-account-breadcrumb {
    font-size: 13px;
    color: var(--ahs-neutral-600, #6b6b6b);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.alms-account-breadcrumb a {
    color: var(--ahs-purple, #6B63AD);
    text-decoration: none;
    font-weight: 500;
}

.alms-account-breadcrumb a:hover {
    color: var(--ahs-purple-dk, #4E4890);
}

.alms-account-breadcrumb__sep {
    color: #bbb;
}

/* Inner account pages: breadcrumb nav slot becomes a full-width bar */
.alms-inner-account .woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

.alms-inner-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* ── My Account Dashboard ─────────────────────────────────────────────────── */

.alms-dashboard__welcome {
    font-size: 15px;
    margin-bottom: 24px;
    color: var(--ahs-neutral-800, #2d2d2d);
}

.alms-dashboard__stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.alms-dashboard__stat {
    background: #fff;
    border: var(--ahs-border, 1px solid #ddd);
    border-radius: var(--ahs-radius-card, 6px);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1;
}

.alms-dashboard__stat-num {
    font-family: var(--ahs-font-serif, Georgia, serif);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ahs-purple, #6B63AD);
}

.alms-dashboard__stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ahs-neutral-600, #6b6b6b);
    margin-bottom: 8px;
}

.alms-dashboard__stat-btn {
    font-size: 12px;
    padding: 6px 12px;
    margin-top: auto;
    align-self: flex-start;
}

/* Quick link cards */
.alms-dashboard__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.alms-dashboard__card {
    background: #fff;
    border: var(--ahs-border, 1px solid #ddd);
    border-radius: var(--ahs-radius-card, 6px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alms-dashboard__card--featured {
    border-color: var(--ahs-purple-lt, #9B95CC);
    background: var(--ahs-purple-pale, #EEEDF8);
}

.alms-dashboard__card-icon {
    color: var(--ahs-purple, #6B63AD);
    line-height: 1;
    margin-bottom: 4px;
}

.alms-dashboard__card--featured .alms-dashboard__card-icon {
    color: var(--ahs-purple-dk, #4E4890);
}

.alms-dashboard__card-title {
    font-family: var(--ahs-font-serif, Georgia, serif);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--ahs-neutral-800, #2d2d2d);
}

.alms-dashboard__card-desc {
    font-size: 13px;
    color: var(--ahs-neutral-600, #6b6b6b);
    line-height: 1.5;
    margin: 0 0 8px;
    flex: 1;
}

.alms-dashboard__card-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Recent Orders table */
.alms-dashboard__section {
    margin-bottom: 32px;
}

.alms-dashboard__section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.alms-dashboard__section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--ahs-neutral-800, #2d2d2d);
}

.alms-dashboard__section-link {
    font-size: 13px;
    color: var(--ahs-purple, #6B63AD);
    text-decoration: none;
}

.alms-dashboard__section-link:hover {
    color: var(--ahs-purple-dk, #4E4890);
    text-decoration: underline;
}

.alms-dashboard__orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.alms-dashboard__orders-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ahs-neutral-600, #6b6b6b);
    background: var(--ahs-neutral-50, #fafafa);
    border-bottom: 1px solid var(--ahs-neutral-300, #ddd);
}

.alms-dashboard__orders-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ahs-neutral-100, #f5f5f5);
    vertical-align: middle;
}

.alms-dashboard__orders-table tr:last-child td {
    border-bottom: none;
}

.alms-dashboard__order-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.alms-dashboard__order-status--completed {
    background: #e6f4ea;
    color: #2e7d32;
}

.alms-dashboard__order-status--processing {
    background: var(--ahs-purple-pale, #EEEDF8);
    color: var(--ahs-purple, #6B63AD);
}

.alms-dashboard__order-status--pending {
    background: #fff8e1;
    color: #e65100;
}

.alms-dashboard__order-view {
    font-size: 12px;
    color: var(--ahs-purple, #6B63AD);
    text-decoration: none;
    font-weight: 600;
}

.alms-dashboard__order-view:hover {
    text-decoration: underline;
}

/* .alms-course-card v2 styles removed — card now uses .ahs-pc--enrolled (AHS_Product_Card). */

/* ── WooCommerce Cart — sticky order summary ─────────────────────────────── */

.woocommerce-cart .cart-collaterals .cart_totals {
    position: sticky;
    top: 84px; /* below sticky Astra header */
}

/* On narrow screens that collapse to stacked layout, reset */
@media ( max-width: 767px ) {
    .woocommerce-cart .cart-collaterals .cart_totals {
        position: static;
    }
}

/* ── WooCommerce Cart — visual polish ─────────────────────────────────────── */

.woocommerce-cart table.shop_table th {
    background: #f8f7fc;
    color: var(--ahs-navy, #1E1A3A);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.woocommerce-cart table.shop_table .cart_item td {
    vertical-align: middle;
}

.woocommerce-cart .cart_totals h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ahs-navy, #1E1A3A);
    border-bottom: 2px solid var(--ahs-purple, #6B63AD);
    padding-bottom: 10px;
    margin-bottom: 16px;
}


