/* ==========================================================
   True/False quiz — front-end styles (lavender theme)
   Solid colours only: no gradients, glass, blur or transparency.
   Visual design only; markup and behaviour are unchanged.
   ========================================================== */

.xtf-quiz {
    --xtf-lavender: #E6E0F8;
    --xtf-blue: #1D4ED8;
    --xtf-blue-dark: #1E40AF;
    --xtf-correct: #1B7A34;
    --xtf-wrong: #C62828;
    --xtf-warn: #B07C00;
    --xtf-shadow-card: 0 2px 6px rgba(60, 40, 120, .16);
    --xtf-shadow-lift: 0 4px 10px rgba(60, 40, 120, .22);

    box-sizing: border-box;
    max-width: 900px;
    margin: 20px auto;
    padding: 28px;
    background: var(--xtf-lavender);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(60, 40, 120, .18), 0 3px 8px rgba(60, 40, 120, .12);
    font-family: inherit;
    line-height: 1.5;
}

.xtf-quiz,
.xtf-quiz * {
    box-sizing: border-box;
}

/* All text black on every theme (the Submit button is white-on-blue, below) */
.xtf-quiz *:not(.xtf-submit) {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* The script shows the result by removing [hidden] — keep it honoured */
.xtf-quiz [hidden] {
    display: none !important;
}

/* ---------- Statement cards ----------
   Constant 2px border so state changes (correct / wrong) never shift the layout. */

.xtf-quiz .xtf-question {
    margin: 0 0 14px;
    padding: 18px 20px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 14px;
    box-shadow: var(--xtf-shadow-card);
}

.xtf-quiz .xtf-question-text {
    margin-bottom: 14px;
    font-size: 17px;
    line-height: 1.55;
}

.xtf-quiz .xtf-qnum {
    font-weight: 800;
}

/* ---------- TRUE / FALSE choices ---------- */

.xtf-quiz .xtf-buttons {
    display: flex;
    gap: 10px;
}

.xtf-quiz .xtf-answer {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 10px 24px;
    background: #fff;
    border: 2px solid #B9AEE6;
    border-radius: 10px;
    box-shadow: var(--xtf-shadow-card);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
    transition: box-shadow .12s ease, border-color .12s ease;
}

.xtf-quiz .xtf-answer:hover {
    background: #fff;
    border-color: var(--xtf-blue);
    box-shadow: var(--xtf-shadow-lift);
}

.xtf-quiz .xtf-answer:focus-visible {
    outline: 3px solid var(--xtf-blue);
    outline-offset: 2px;
}

/* Selected: blue border + a ● marker (not colour alone) */
.xtf-quiz .xtf-answer.selected {
    background: #fff;
    border-color: var(--xtf-blue);
    box-shadow: inset 0 0 0 1px var(--xtf-blue), var(--xtf-shadow-card);
}

.xtf-quiz .xtf-answer.selected::before {
    content: "\25CF\00A0";
}

/* After submitting: correct answer = solid green + ✓, wrong pick = dashed red + ✗.
   (Declared after .selected so it wins when both classes are present.) */
.xtf-quiz .xtf-answer.correct-answer {
    background: #fff;
    border: 2px solid var(--xtf-correct);
    box-shadow: inset 0 0 0 1px var(--xtf-correct), var(--xtf-shadow-card);
}

.xtf-quiz .xtf-answer.correct-answer::before {
    content: "\2713\00A0";
}

.xtf-quiz .xtf-answer.wrong-answer {
    background: #fff;
    border: 2px dashed var(--xtf-wrong);
    box-shadow: var(--xtf-shadow-card);
}

.xtf-quiz .xtf-answer.wrong-answer::before {
    content: "\2717\00A0";
}

.xtf-quiz .xtf-feedback {
    min-height: 20px;
    margin-top: 10px;
    font-weight: 600;
}

/* Card states: still white — the border carries the state, and the feedback
   text says the same in words ("Correct" / "Incorrect…" / "Please choose…"). */
.xtf-quiz .xtf-question.is-correct {
    border: 2px solid var(--xtf-correct);
}

.xtf-quiz .xtf-question.is-wrong {
    border: 2px dashed var(--xtf-wrong);
}

.xtf-quiz .xtf-question.is-unanswered {
    border: 2px dotted var(--xtf-warn);
}

/* ---------- Submit button ---------- */

.xtf-quiz .xtf-submit {
    appearance: none;
    -webkit-appearance: none;
    margin: 8px 0 0;
    padding: 12px 30px;
    background: var(--xtf-blue);
    border: 0;
    border-radius: 10px;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .4px;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .24);
    transition: background-color .12s ease, box-shadow .12s ease;
}

.xtf-quiz .xtf-submit:hover,
.xtf-quiz .xtf-submit:active {
    background: var(--xtf-blue-dark);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 4px 10px rgba(60, 40, 120, .3);
}

.xtf-quiz .xtf-submit:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Once submitted the label changes to SUBMITTED; show it in a darker blue */
.xtf-quiz.xtf-submitted .xtf-submit {
    background: #1E3A8A;
}

/* ---------- Result card ---------- */

.xtf-quiz .xtf-result {
    margin-top: 18px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--xtf-shadow-card);
    font-size: 18px;
}

.xtf-quiz .xtf-result strong {
    font-size: 26px;
    font-weight: 800;
}

.xtf-quiz .xtf-note {
    margin-top: 6px;
    font-size: 14px;
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
    .xtf-quiz {
        padding: 16px;
        border-radius: 18px;
    }

    .xtf-quiz .xtf-question {
        padding: 14px;
    }

    .xtf-quiz .xtf-question-text {
        font-size: 16px;
    }

    .xtf-quiz .xtf-buttons {
        width: 100%;
    }

    .xtf-quiz .xtf-answer {
        flex: 1;
        padding: 12px 8px;
    }

    .xtf-quiz .xtf-submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xtf-quiz .xtf-answer,
    .xtf-quiz .xtf-submit {
        transition: none;
    }
}
