/*
 * quiz.css — Jazz Guitar Learning Path Quiz
 * ratemygear.de
 * Inherits: --jazz-gold, --jazz-cream from main stylesheet
 */

/* ── Layout ───────────────────────────────────────────────────────────────── */

.quiz-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* ── Progress Bar ─────────────────────────────────────────────────────────── */

.quiz-progress {
    margin-bottom: 2.5rem;
}

.quiz-progress-track {
    height: 4px;
    background: rgba(201, 168, 76, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.quiz-progress-fill {
    height: 100%;
    background: #C9A84C;
    background: var(--jazz-gold, #C9A84C);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-progress-label {
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.45);
    -webkit-text-fill-color: rgba(245, 240, 232, 0.45);
    letter-spacing: 0.03em;
}

/* ── Question Card ────────────────────────────────────────────────────────── */

.quiz-question-card {
    animation: quiz-fade-in 0.28s ease forwards;
}

@keyframes quiz-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.quiz-question-text {
    font-size: 1.55rem;
    font-weight: 700;
    color: #F5F0E8;
    color: var(--jazz-cream, #F5F0E8);
    -webkit-text-fill-color: #F5F0E8;
    line-height: 1.3;
    margin: 0 0 2rem;
}

@media (max-width: 500px) {
    .quiz-question-text { font-size: 1.25rem; }
}

/* ── Option Buttons ───────────────────────────────────────────────────────── */

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(201, 168, 76, 0.08);
    border: 1.5px solid rgba(201, 168, 76, 0.35);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
    text-align: left;

    /* Explicit color — prevents Safari from rendering text dark on dark */
    color: #F5F0E8;
    color: var(--jazz-cream, #F5F0E8);
    -webkit-text-fill-color: #F5F0E8;

    font-size: 0.97rem;
    line-height: 1.4;
    width: 100%;
}

.quiz-option:hover {
    border-color: rgba(201, 168, 76, 0.7);
    background: rgba(201, 168, 76, 0.15);
    transform: translateX(3px);
}

.quiz-option.selected {
    border-color: #C9A84C;
    border-color: var(--jazz-gold, #C9A84C);
    background: rgba(201, 168, 76, 0.22);
    border-width: 2px;
}

/* Radio dot */
.quiz-option-dot {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(201, 168, 76, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.quiz-option.selected .quiz-option-dot {
    border-color: #C9A84C;
    border-color: var(--jazz-gold, #C9A84C);
    background: #C9A84C;
    background: var(--jazz-gold, #C9A84C);
}

.quiz-option.selected .quiz-option-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16213E;
    display: block;
}

/* Option text span — explicit color critical for Safari */
.quiz-option span:not(.quiz-option-dot) {
    color: #F5F0E8;
    color: var(--jazz-cream, #F5F0E8);
    -webkit-text-fill-color: #F5F0E8;
}

.quiz-option.selected span:not(.quiz-option-dot) {
    color: #F5F0E8;
    -webkit-text-fill-color: #F5F0E8;
    font-weight: 600;
}

/* ── Back Button ──────────────────────────────────────────────────────────── */

.quiz-back-btn {
    background: none;
    border: none;
    color: rgba(245, 240, 232, 0.4);
    -webkit-text-fill-color: rgba(245, 240, 232, 0.4);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease;
}

.quiz-back-btn:hover {
    color: rgba(245, 240, 232, 0.75);
    -webkit-text-fill-color: rgba(245, 240, 232, 0.75);
}

.quiz-back-btn svg {
    width: 14px;
    height: 14px;
}

/* ── Loading State ────────────────────────────────────────────────────────── */

.quiz-loading {
    text-align: center;
    padding: 4rem 0;
}

.quiz-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(201, 168, 76, 0.15);
    border-top-color: #C9A84C;
    border-top-color: var(--jazz-gold, #C9A84C);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Result Page ──────────────────────────────────────────────────────────── */

.quiz-result-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.25rem 5rem;
    animation: quiz-fade-in 0.35s ease forwards;
}

/* ── Resource Cards ───────────────────────────────────────────────────────── */

.quiz-resource-cta {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    background: #C9A84C;
    background: var(--jazz-gold, #C9A84C);
    color: #16213E;
    -webkit-text-fill-color: #16213E;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.15s ease;
    margin-top: auto;
}

.quiz-resource-cta:hover {
    background: #dbb95c;
    transform: translateY(-1px);
}

/* ── Email Capture ────────────────────────────────────────────────────────── */

.quiz-email-section {
    background: linear-gradient(135deg, rgba(26, 42, 74, 0.8), rgba(22, 33, 62, 0.8));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 12px;
    padding: 2rem 1.75rem;
    text-align: center;
    margin-top: 1rem;
}

.quiz-email-input {
    flex: 1;
    padding: 0.65rem 1rem;
    background: #1a2a4a;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(201, 168, 76, 0.25);
    border-radius: 6px;
    color: #F5F0E8;
    color: var(--jazz-cream, #F5F0E8);
    -webkit-text-fill-color: #F5F0E8;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease;
    color-scheme: dark;
}

.quiz-email-input::placeholder {
    color: rgba(245, 240, 232, 0.3);
}

.quiz-email-input:focus {
    border-color: rgba(201, 168, 76, 0.55);
}

.quiz-email-submit {
    padding: 0.65rem 1.25rem;
    background: #C9A84C;
    background: var(--jazz-gold, #C9A84C);
    color: #16213E;
    -webkit-text-fill-color: #16213E;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease;
}

.quiz-email-submit:hover {
    background: #dbb95c;
}

/* ── Lernen Banner ────────────────────────────────────────────────────────── */

.quiz-lernen-banner {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(22, 33, 62, 0.5));
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.quiz-lernen-banner-cta {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    background: #C9A84C;
    background: var(--jazz-gold, #C9A84C);
    color: #16213E;
    -webkit-text-fill-color: #16213E;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.quiz-lernen-banner-cta:hover {
    background: #dbb95c;
    transform: translateY(-1px);
}
