/* ===================================
   QuizMarshall - customer area, checkout and forms
   (builds on style.css tokens)
   =================================== */

.app-hero {
    padding: 130px 0 48px;
    background: var(--gradient-hero);
    color: var(--white);
    position: relative;
}

.app-hero h1 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.app-hero p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.app-hero .breadcrumb-link {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    text-decoration: none;
}

.app-hero .breadcrumb-link:hover {
    color: var(--white);
}

.app-section {
    padding: 40px 0 80px;
    background: var(--gray-50);
    min-height: 50vh;
}

.app-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}

.app-card h2,
.app-card h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.app-card .card-subtle {
    color: var(--gray-500);
    font-size: 0.92rem;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.app-nav a {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.app-nav a.active,
.app-nav a:hover {
    background: var(--primary);
    color: var(--white);
}

/* Forms */
.app-form label {
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-700);
}

.app-form .form-control,
.app-form .form-select {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
}

.app-form .form-control:focus,
.app-form .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.app-form .form-text {
    color: var(--gray-500);
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
}

/* Option cards (product / format choice) */
.choice-card {
    display: block;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 18px;
    cursor: pointer;
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
    height: 100%;
}

.choice-card:hover {
    border-color: var(--primary-light);
}

.choice-input:checked + .choice-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card .choice-title {
    font-weight: 600;
    color: var(--dark);
}

.choice-card .choice-meta {
    font-size: 0.88rem;
    color: var(--gray-500);
}

/* Order summary */
.summary-card {
    position: sticky;
    top: 100px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--gray-200);
    font-size: 0.95rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-scheduled { background: var(--blue-light); color: #1e40af; }
.status-generating { background: var(--yellow-light); color: #92400e; }
.status-ready { background: var(--green-light); color: #166534; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-cancelled { background: var(--gray-200); color: var(--gray-600); }
.status-pending { background: var(--yellow-light); color: #92400e; }
.status-paid { background: var(--green-light); color: #166534; }
.status-refunded { background: var(--gray-200); color: var(--gray-600); }
.status-active { background: var(--green-light); color: #166534; }
.status-past_due { background: #fee2e2; color: #991b1b; }
.status-incomplete { background: var(--yellow-light); color: #92400e; }
.status-waiting { background: var(--blue-light); color: #1e40af; }
.status-queued { background: var(--yellow-light); color: #92400e; }
.status-printing { background: var(--orange-light); color: #9a3412; }
.status-printed { background: var(--teal-light); color: #115e59; }
.status-posted { background: var(--green-light); color: #166534; }

/* Quiz list */
.quiz-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

.quiz-row:last-child {
    border-bottom: none;
}

.quiz-date-tile {
    flex-shrink: 0;
    width: 62px;
    text-align: center;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    padding: 4px 0;
    line-height: 1.1;
}

.quiz-date-tile .day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
}

.quiz-date-tile .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gray-500);
}

.quiz-row .quiz-info {
    flex: 1;
    min-width: 0;
}

.quiz-row .quiz-info .title {
    font-weight: 600;
    color: var(--dark);
}

.quiz-row .quiz-info .meta {
    font-size: 0.87rem;
    color: var(--gray-500);
}

/* Quiz view */
.round-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}

.round-card .round-head {
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.round-question {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.round-question:last-child {
    border-bottom: none;
}

.round-question .num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.round-question .body {
    flex: 1;
    min-width: 0;
}

.round-question .answer {
    color: #0f766e;
    font-weight: 600;
    margin-top: 4px;
}

.round-question .tags {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.round-question .tags:empty {
    display: none;
}

.round-question .swap-btn {
    flex-shrink: 0;
    align-self: center;
}

.round-question.swapped {
    animation: swapFlash 1.5s ease;
}

@keyframes swapFlash {
    0% { background: var(--yellow-light); }
    100% { background: transparent; }
}

.answers-hidden .round-question .answer {
    filter: blur(6px);
    user-select: none;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 2.6rem;
    color: var(--primary-light);
    display: block;
    margin-bottom: 10px;
}

/* Generating spinner */
.generating-box {
    text-align: center;
    padding: 50px 20px;
}

.generating-box .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
}

.date-list .date-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.date-list .date-input-row .idx {
    width: 28px;
    color: var(--gray-500);
    font-size: 0.85rem;
    text-align: right;
}

/* Legal pages */
.legal-content h2 {
    font-size: 1.35rem;
    margin-top: 28px;
}

.legal-content p,
.legal-content li {
    color: var(--gray-700);
    line-height: 1.75;
}

@media (max-width: 767px) {
    .app-hero {
        padding: 110px 0 36px;
    }

    .app-hero h1 {
        font-size: 1.7rem;
    }

    .app-card {
        padding: 20px;
    }

    .round-question {
        padding: 12px 14px;
        flex-wrap: wrap;
    }

    .round-question .swap-btn {
        width: 100%;
    }
}
