/* BattlePack™ Quiz Styles */

.bp-quiz-wrap {
    max-width: 680px;
    margin: 32px auto;
    padding-left: 32px;
    padding-right: 32px;
}

.bp-quiz-retry-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
}

.bp-quiz-question {
    display: none;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e4e7;
}

.bp-quiz-question.is-active {
    display: block;
}

.bp-quiz-question:last-of-type { border-bottom: none; }

/* Review mode (after submit): every question visible at once, nav hidden */
.bp-quiz-form.bp-quiz-review-mode .bp-quiz-question {
    display: block;
}

.bp-quiz-form.bp-quiz-review-mode .bp-quiz-progress,
.bp-quiz-form.bp-quiz-review-mode .bp-quiz-nav {
    display: none;
}

.bp-quiz-q-text {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    line-height: 1.5;
}

.bp-quiz-q-num {
    color: #a800ff;
    font-weight: 800;
    margin-right: 6px;
}

.bp-quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-quiz-answer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid #e2e4e7;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-weight: 500;
}

.bp-quiz-answer:hover { border-color: #a800ff; background: #f9f0ff; }

.bp-quiz-answer input[type="radio"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #a800ff;
}

.bp-quiz-answer.bp-answer-correct {
    border-color: #00a32a;
    background: #f0fff4;
}

.bp-quiz-answer.bp-answer-wrong {
    border-color: #d63638;
    background: #fff0f0;
}

.bp-quiz-explanation {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #495258;
    display: none;
}

/* Progress bar */
.bp-quiz-progress {
    margin-bottom: 28px;
}

.bp-quiz-progress-bar {
    height: 6px;
    background: #e2e4e7;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bp-quiz-progress-fill {
    height: 100%;
    background: #a800ff;
    width: 20%;
    transition: width 0.25s ease;
}

.bp-quiz-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #64747d;
    text-align: right;
}

/* Question / answer nav */
.bp-quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}

.bp-quiz-back-btn {
    background: none;
    border: 1.5px solid #e2e4e7;
    color: #2c3236;
    padding: 12px 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
}

.bp-quiz-back-btn:hover { border-color: #a800ff; color: #a800ff; }
.bp-quiz-back-btn.is-hidden { visibility: hidden; }

.bp-quiz-next-btn {
    background: #a800ff;
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    margin-left: auto;
}

.bp-quiz-next-btn:hover:not(:disabled) { background: #9000e0; }

.bp-quiz-submit-btn {
    background: #a800ff;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
}

.bp-quiz-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.bp-quiz-submit-btn:hover:not(:disabled) { background: #9000e0; }

/* Result */
.bp-quiz-result {
    margin-top: 24px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.bp-quiz-result.bp-quiz-pass {
    background: #f0fff4;
    border: 2px solid #00a32a;
}

.bp-quiz-result.bp-quiz-fail {
    background: #fff0f0;
    border: 2px solid #d63638;
}

.bp-quiz-score {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.bp-quiz-pass .bp-quiz-score { color: #00a32a; }
.bp-quiz-fail .bp-quiz-score { color: #d63638; }

.bp-quiz-result-msg {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
}

.bp-quiz-retry-btn {
    background: #2c3236;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
}

/* Passed state */
.bp-quiz-passed {
    text-align: center;
    padding: 40px 20px;
    background: #f0fff4;
    border: 2px solid #00a32a;
    border-radius: 8px;
}

.bp-quiz-passed-icon {
    font-size: 48px;
    color: #00a32a;
    line-height: 1;
    margin-bottom: 12px;
}

.bp-quiz-passed h3 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #00a32a;
    margin: 0 0 8px;
}

/* ── Start Quiz card ─────────────────────────────────────────────────── */

.bp-quiz-start-card {
    text-align: center;
    padding: 36px 24px;
    background: #f9f0ff;
    border: 2px solid #a800ff;
    border-radius: 8px;
}

.bp-quiz-start-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #2c3236;
    margin: 0 0 6px;
}

.bp-quiz-start-meta {
    font-size: 14px;
    color: #64747d;
    margin: 0 0 20px;
}

.bp-quiz-start-btn {
    background: #a800ff;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
}

.bp-quiz-start-btn:hover { background: #9000e0; }

.bp-quiz-start-card .bp-quiz-retry-notice {
    text-align: left;
    margin-bottom: 20px;
}

/* ── Quiz modal ───────────────────────────────────────────────────────── */

.bp-quiz-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.bp-quiz-modal.is-open {
    display: block;
}

.bp-quiz-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 24, 0.65);
}

.bp-quiz-modal-dialog {
    position: relative;
    z-index: 1;
    width: 92%;
    max-width: 720px;
    max-height: 88vh;
    margin: 6vh auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bp-quiz-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 6px;
}

.bp-quiz-modal-close:hover { color: #2c3236; }

.bp-quiz-modal-body {
    overflow-y: auto;
    padding: 40px 32px 32px;
}

body.bp-quiz-modal-open {
    overflow: hidden;
}

.bp-quiz-done-btn {
    background: #2c3236;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 10px;
}

@media (max-width: 600px) {
    .bp-quiz-modal-dialog {
        width: 100%;
        max-height: 100vh;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }
    .bp-quiz-modal-body {
        padding: 48px 18px 24px;
    }
}
