/**
 * Mobile card mode styling for the quiz.
 *
 * Applies ONLY when js/quiz-card-mobile.js has activated (it adds
 * .sp-mobile-cards to the wrapper on <=767px viewports for flagged quizzes).
 * Desktop and unflagged quizzes never match these selectors.
 */

/* Break-card progress line is server-rendered, so it appears on every device.
   Base styling lives outside the mobile query; the card-mode query below only
   tightens spacing. */
.motivation-progress {
    margin: 0 0 10px;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #b60f0a;
    text-align: center;
}

@media (max-width: 767px) {

    /* Crest blank — sharpens with progress (inline filter/opacity set by JS) */
    .sp-mobile-cards .sp-card-emblem-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin: 0 0 14px;
    }

    .sp-mobile-cards .sp-card-emblem {
        transition: filter 0.5s ease, opacity 0.5s ease;
        line-height: 0;
    }

    .sp-mobile-cards .sp-card-emblem-caption {
        margin: 0;
        font-size: 0.74em;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #9ca3af;
    }

    .sp-mobile-cards .motivation-progress {
        margin: 0 0 10px;
        font-size: 0.8em;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #b60f0a;
        text-align: center;
    }

    .sp-mobile-cards .quiz-page.active {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
        padding: 24px 18px 20px;
        margin: 0 0 14px;
        animation: spCardIn 0.28s ease both;
    }

    @keyframes spCardIn {
        from { opacity: 0; transform: translateX(24px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .sp-mobile-cards .sportpersonalities-question-title {
        font-size: 1.15em;
        line-height: 1.45;
        font-weight: 700;
        margin-bottom: 18px;
    }

    /* Big, unmissable tap targets */
    .sp-mobile-cards .sportpersonalities-question-answers label {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        padding: 14px 16px;
        margin: 0 0 10px;
        background: #f9fafb;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 1em;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .sp-mobile-cards .sportpersonalities-question-answers label.selected,
    .sp-mobile-cards .sportpersonalities-question-answers label:has(input:checked) {
        border-color: #b60f0a;
        background: #fef8f8;
        font-weight: 600;
    }

    .sp-mobile-cards .motivation-break {
        text-align: center;
        padding: 8px 0;
    }

    .sp-mobile-cards .motivation-continue-btn {
        display: inline-block;
        background: #b60f0a;
        color: #fff;
        border: none;
        border-radius: 50px;
        padding: 13px 34px;
        font-size: 1em;
        font-weight: 700;
        cursor: pointer;
        margin-top: 14px;
    }

    .sp-mobile-cards .quiz-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .sp-mobile-cards .quiz-nav-btn.back-btn {
        background: transparent;
        border: 1px solid #d1d5db;
        color: #6b7280;
        border-radius: 50px;
        padding: 10px 22px;
        font-size: 0.92em;
    }

    .sp-mobile-cards .quiz-submit-btn {
        flex: 1;
        border-radius: 50px;
        padding: 14px 22px;
        font-size: 1.02em;
        font-weight: 700;
    }

    /* Reduce motion for users who ask for it */
    @media (prefers-reduced-motion: reduce) {
        .sp-mobile-cards .quiz-page.active {
            animation: none;
        }
    }
}
