/* MCQ Set Questions Page
   ----------------------- */

#set-questions {
    /* not used, but left for consistency if needed */
}

#set-questions .container {
    /* placeholder */
}

#set-questions .btn {
    /* uses global .btn styles from main CSS */
}

#mcq-set-questions {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.set-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* Header */

.set-header {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
    gap: 1.8rem;
    align-items: flex-start;
}

.set-header-main {
    max-width: 640px;
}

.set-tagline {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    font-weight: 600;
}

.set-title {
    margin: 0 0 0.5rem;
    font-size: 1.9rem;
    letter-spacing: -0.02em;
}

.set-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.set-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.12rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Level pill */
.set-pill-level {
    background: rgba(92, 108, 255, 0.08);
    color: #2731c0;
}

/* Access pill */
.set-pill-free {
    background: #ecfdf3;
    color: #166534;
}

.set-pill-premium {
    background: #fef3c7;
    color: #92400e;
}

/* Questions count */
.set-pill-questions {
    background: rgba(15, 23, 42, 0.04);
    color: #111827;
}

.set-info-text {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.set-info-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.set-info-text a:hover {
    text-decoration: underline;
}

.set-info-warning {
    color: #b91c1c;
}

/* Score card */

.set-score-card {
    background: radial-gradient(circle at 0% 0%, #dcfdfa 0, #f9fafb 40%, #ffffff 100%);
    border-radius: var(--radius-xl);
    padding: 1.2rem 1.3rem 1.4rem;
    border: 1px solid rgba(224, 227, 239, 0.9);
    box-shadow: var(--shadow-soft);
    max-width: 340px;
}

.set-score-card h2 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.score-main {
    margin: 0 0 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.score-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #047857;
}

.score-separator {
    font-size: 1.1rem;
    color: #4b5563;
}

.score-max {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b5563;
}

.score-note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Body / questions */

.set-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.set-empty {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    border: 1px dashed rgba(148, 163, 184, 0.8);
}

.set-empty h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.set-empty p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Question card */

.question-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.question-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(224, 227, 239, 0.95);
    box-shadow: 0 10px 24px rgba(15, 35, 52, 0.06);
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* Color borders after result */
.question-card.question-correct {
    border-color: rgba(22, 163, 74, 0.6);
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.18);
}

.question-card.question-wrong {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.18);
}

/* Header row */

.question-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
}

.question-number {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.question-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.question-text {
    font-size: 0.95rem;
}

.question-marks {
    font-size: 0.8rem;
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.marks-positive {
    color: #15803d;
    font-weight: 600;
}

.marks-negative {
    color: #b91c1c;
    font-weight: 500;
}

.marks-earned {
    padding-left: 0.6rem;
    border-left: 1px solid rgba(209, 213, 219, 0.9);
}

.question-result-pill {
    align-self: flex-start;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.result-correct {
    background: #ecfdf3;
    color: #166534;
}

.result-wrong {
    background: #fef2f2;
    color: #b91c1c;
}

/* Options */

.question-options {
    margin-top: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.option-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: flex-start;
    padding: 0.3rem 0.45rem;
    border-radius: 10px;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.option-input-wrapper {
    padding-top: 0.18rem;
}

.option-row input[type="radio"],
.option-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.option-text {
    font-size: 0.9rem;
}

/* Tag pills shown after submission */
.option-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    justify-self: flex-end;
}

.tag-pill {
    font-size: 0.7rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
}

.tag-correct {
    background: #ecfdf3;
    color: #166534;
}

.tag-your-answer {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Visual hints after submission */
.option-correct-selected {
    background: rgba(22, 163, 74, 0.06);
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.35);
}

.option-correct {
    background: rgba(16, 185, 129, 0.04);
}

.option-selected-wrong {
    background: rgba(239, 68, 68, 0.04);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
}

/* Guest disabled view */
.option-disabled {
    opacity: 0.85;
}

.option-disabled input {
    cursor: default;
}

/* Explanation */

.question-explanation {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(209, 213, 219, 0.9);
}

.explanation-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.explanation-body {
    font-size: 0.88rem;
    color: #4b5563;
}

/* Form actions */

.question-actions {
    margin-top: 0.6rem;
    display: flex;
    justify-content: flex-start;
}

/* Guest CTA */

.guest-cta {
    margin-top: 0.9rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    border: 1px solid rgba(224, 227, 239, 0.95);
    box-shadow: 0 10px 24px rgba(15, 35, 52, 0.06);
}

.guest-cta p {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.guest-cta-actions {
    display: flex;
    gap: 0.5rem;
}

/* Responsive */

@media (max-width: 960px) {
    .set-header {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    }
}

@media (max-width: 768px) {
    .set-header {
        grid-template-columns: minmax(0, 1fr);
    }

    .set-score-card {
        max-width: none;
    }

    .question-card {
        padding-inline: 0.85rem;
    }

    .option-row {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .option-tags {
        justify-self: flex-start;
        margin-left: 1.7rem;
    }
}