/**
 * LumorowLMS — Reading Comprehension styles
 *
 * Per-passage view: passage at the top inside a soft card, then
 * stacked question blocks below. Each question is a labelled
 * group with A/B/C/D[/E] options as clickable cards. After
 * Check Answers fires, options recolour: green for correct
 * picked, red for wrong picked, neutral outline for the
 * correct option that was missed.
 */

/* ─── Block container ─────────────────────────────────────── */
.llmsb-rc-block {
    font-family: inherit;
    margin: 0 0 2rem;
    padding: 20px 22px 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* ─── Header row ─────────────────────────────────────────── */
.llmsb-rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--llmsb-muted, #6b7280);
    margin-bottom: 4px;
}
.llmsb-rc-progress { font-weight: 600; }
.llmsb-rc-level {
    background: var(--llmsb-primary-pale, #fef6ea);
    color: var(--llmsb-primary-dk, #c45a04);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.llmsb-rc-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1c1c1c;
    margin: 8px 0 16px;
    line-height: 1.25;
}

/* ─── Passage card ───────────────────────────────────────── */
.llmsb-rc-passage {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 18px;
}
.llmsb-rc-passage-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1c1c1c;
    margin: 0 0 8px;
}
.llmsb-rc-passage-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #1c1c1c;
    margin: 0 0 10px;
}
.llmsb-rc-passage-text:last-child { margin-bottom: 0; }
.llmsb-rc-passage--review {
    background: #fffaf3;
    border-color: var(--llmsb-primary-pale, #fef6ea);
}

/* ─── Questions ──────────────────────────────────────────── */
.llmsb-rc-questions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}
.llmsb-rc-question {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
}
.llmsb-rc-q-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #1c1c1c;
    margin-bottom: 10px;
}
.llmsb-rc-q-text strong {
    color: var(--llmsb-primary-dk, #c45a04);
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}

/* ─── Options ────────────────────────────────────────────
   These are buttons during selection, divs during review.
   The class `[class*="-option"]` carve-out in shared.css
   keeps the universal pill rule from styling them as
   primary-action pills. */
.llmsb-rc-q-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.llmsb-rc-option {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: #fff !important;
    color: #1c1c1c !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 0.96rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    cursor: pointer;
    box-shadow: none !important;
    margin: 0 !important;
    transition: border-color .12s ease, background .12s ease, transform .08s ease;
}
.llmsb-rc-option:hover:not(:disabled) {
    border-color: var(--llmsb-primary, #f77205) !important;
    background: var(--llmsb-primary-pale, #fef6ea) !important;
    transform: none !important;
}
.llmsb-rc-option.is-selected {
    border-color: var(--llmsb-primary, #f77205) !important;
    background: var(--llmsb-primary-pale, #fef6ea) !important;
    color: #1c1c1c !important;
}
.llmsb-rc-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #1c1c1c;
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.llmsb-rc-option.is-selected .llmsb-rc-option-letter {
    background: var(--llmsb-primary, #f77205);
    color: #fff;
}
.llmsb-rc-option-text {
    flex: 1 1 auto;
    padding-top: 2px;
}

/* ─── Revealed (post-Check Answers) state ────────────────── */
.llmsb-rc-question.is-revealed .llmsb-rc-option {
    cursor: default;
}
.llmsb-rc-option.is-correct {
    background: #d1fae5 !important;
    border-color: #16a34a !important;
    color: #064e3b !important;
}
.llmsb-rc-option.is-correct .llmsb-rc-option-letter {
    background: #16a34a;
    color: #fff;
}
.llmsb-rc-option.is-wrong {
    background: #fee2e2 !important;
    border-color: #dc2626 !important;
    color: #7f1d1d !important;
}
.llmsb-rc-option.is-wrong .llmsb-rc-option-letter {
    background: #dc2626;
    color: #fff;
}
.llmsb-rc-option.is-correct-unpicked {
    border-color: #16a34a !important;
    background: #fff !important;
    color: #1c1c1c !important;
    border-style: dashed !important;
}
.llmsb-rc-option.is-correct-unpicked .llmsb-rc-option-letter {
    background: #16a34a;
    color: #fff;
    opacity: 0.85;
}

/* ─── Per-question explanation (v3.5.38) ─────────────────
   Revealed on the review page below the question's options.
   Neutral grey-blue tint for wrong/skipped questions ("ⓘ
   Correct answer explained"), warm green tint when the
   student got it right ("✓ Why it's correct"). Standard
   inline-quote rendering keeps quoted passage fragments
   visually distinct so the student can scan for them. */
.llmsb-rc-explanation {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-left: 4px solid #6b7280;
    border-radius: 0 8px 8px 0;
    font-size: 0.92rem;
    line-height: 1.5;
}
.llmsb-rc-explanation.is-ok {
    background: #ecfdf5;
    border-left-color: #16a34a;
}
.llmsb-rc-explanation-head {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #4b5563;
    margin-bottom: 4px;
}
.llmsb-rc-explanation.is-ok .llmsb-rc-explanation-head {
    color: #047857;
}
.llmsb-rc-explanation-body {
    color: #1c1c1c;
}

/* ─── Controls ───────────────────────────────────────────── */
.llmsb-rc-controls {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
.llmsb-rc-continue:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ─── Done banner + results entry point ──────────────────── */
.llmsb-rc-done {
    padding: 18px 20px;
    background: var(--llmsb-primary-pale, #fef6ea);
    color: var(--llmsb-primary-dk, #c45a04);
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   Editor (Gutenberg admin)
   ═══════════════════════════════════════════════════════════ */
.llmsb-rc-editor-card {
    background: #FFF8EE;
    border: 2px dashed #F77205;
    border-radius: 12px;
    padding: 16px 18px 18px;
}
.llmsb-rc-editor-header {
    font-size: 1rem;
    font-weight: 700;
    color: #1c1c1c;
    margin-bottom: 8px;
}
.llmsb-rc-editor-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 10px;
}
.llmsb-rc-editor-meta strong { color: #1c1c1c; }
.llmsb-rc-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.llmsb-rc-editor-help {
    font-size: 0.84rem;
    color: var(--llmsb-muted, #6b7280);
    margin: 0 0 10px;
    line-height: 1.4;
}
.llmsb-rc-editor-empty {
    font-size: 0.9rem;
    color: var(--llmsb-muted, #6b7280);
    padding: 12px 14px;
    background: #fff;
    border-radius: 6px;
}

.llmsb-rc-editor-list {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-top: 14px;
}

/* ── Passage row in editor ── */
.llmsb-rc-edit-passage {
    padding: 14px 14px 12px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    margin-bottom: 14px;
    background: #fafafa;
}
.llmsb-rc-edit-passage:last-child { margin-bottom: 0; }
.llmsb-rc-edit-p-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.llmsb-rc-edit-p-num {
    font-weight: 700;
    color: #c45e04;
    font-variant-numeric: tabular-nums;
}
.llmsb-rc-edit-p-mv { display: inline-flex; gap: 4px; }
.llmsb-rc-edit-p-del { margin-left: auto !important; }

/* ── Question + options inside editor ── */
.llmsb-rc-edit-qs {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.llmsb-rc-edit-q {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
}
.llmsb-rc-edit-q-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.llmsb-rc-edit-q-head .components-base-control { margin: 0 !important; flex: 0 0 180px; }
.llmsb-rc-edit-q-head .components-base-control__field { margin: 0 !important; }
.llmsb-rc-edit-q-num {
    font-weight: 700;
    color: #c45e04;
    font-variant-numeric: tabular-nums;
}
.llmsb-rc-edit-opts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 0;
}
.llmsb-rc-edit-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.llmsb-rc-edit-opt .components-base-control { margin: 0 !important; flex: 1 1 auto; }
.llmsb-rc-edit-opt .components-base-control__field { margin: 0 !important; }
.llmsb-rc-edit-opt.is-correct {
    background: #f0fdf4;
    border-radius: 4px;
    padding: 4px 8px;
}

/* ── Mobile tweaks ── */
@media (max-width: 640px) {
    .llmsb-rc-block { padding: 16px 14px 18px; }
    .llmsb-rc-passage { padding: 14px 16px; }
    .llmsb-rc-question { padding: 12px 14px; }
    .llmsb-rc-option { padding: 9px 12px !important; font-size: 0.92rem !important; }
}
