/* ==========================================================
   pressotherapy.co.uk - Quiz Page Styles
   Extends shared.css with interactive quiz components.
   ========================================================== */

/* ========== QUIZ HERO ========== */
.quiz-hero {
    background: var(--navy);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.quiz-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(11,122,117,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.quiz-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,97,84,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.quiz-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    position: relative;
}
.quiz-hero h1 em {
    color: var(--coral);
    font-style: normal;
}
.quiz-hero p {
    color: var(--grey-400);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}
.quiz-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    position: relative;
}
.quiz-trust-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--grey-400);
}
.quiz-trust-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* ========== PROGRESS BAR ========== */
.quiz-progress {
    background: white;
    border-bottom: 1px solid var(--grey-200);
    padding: 1rem 2rem;
    position: sticky;
    top: 64px;
    z-index: 50;
}
.quiz-progress-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.quiz-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--grey-200);
    border-radius: 3px;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--coral));
    border-radius: 3px;
    transition: width 0.4s ease;
}
.quiz-progress-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--grey-500);
    white-space: nowrap;
}
.quiz-progress-dots {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}
.quiz-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grey-200);
    transition: var(--transition);
}
.quiz-dot.active { background: var(--teal); }
.quiz-dot.completed { background: var(--teal); }

/* ========== QUIZ CONTAINER ========== */
.quiz-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    min-height: 60vh;
}

/* ========== QUIZ STEP ========== */
.quiz-step {
    display: none;
    animation: quizFadeIn 0.35s ease;
}
.quiz-step.active { display: block; }
@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.quiz-step-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal);
    margin-bottom: 0.5rem;
}
.quiz-step h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.quiz-step-hint {
    font-size: 0.9375rem;
    color: var(--grey-500);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ========== QUIZ OPTIONS ========== */
.quiz-options {
    display: grid;
    gap: 0.75rem;
}
.quiz-options.cols-2 { grid-template-columns: 1fr 1fr; }
.quiz-options.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.quiz-options.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.quiz-option {
    background: white;
    border: 2px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
}
.quiz-option:hover {
    border-color: var(--teal);
    box-shadow: var(--shadow-sm);
}
.quiz-option.selected {
    border-color: var(--teal);
    background: var(--teal-50);
    box-shadow: 0 0 0 1px var(--teal);
}
.quiz-option-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: var(--grey-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}
.quiz-option.selected .quiz-option-icon {
    background: var(--teal-light);
}
.quiz-option-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.25rem;
}
.quiz-option-desc {
    font-size: 0.8125rem;
    color: var(--grey-500);
    line-height: 1.4;
}
.quiz-option-check {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--grey-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.quiz-option.selected .quiz-option-check {
    background: var(--teal);
    border-color: var(--teal);
}
.quiz-option-check svg {
    width: 12px;
    height: 12px;
    stroke: white;
    opacity: 0;
    transition: var(--transition);
}
.quiz-option.selected .quiz-option-check svg { opacity: 1; }

/* ========== QUIZ NAVIGATION ========== */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--grey-100);
}
.quiz-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--grey-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: inherit;
}
.quiz-back:hover { color: var(--navy); background: var(--grey-50); }
.quiz-back svg { width: 16px; height: 16px; }
.quiz-back.hidden { visibility: hidden; }
.quiz-next {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1.5rem;
    background: var(--teal);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.quiz-next:hover { background: var(--teal-dark); transform: translateY(-1px); }
.quiz-next:disabled {
    background: var(--grey-200);
    color: var(--grey-400);
    cursor: not-allowed;
    transform: none;
}
.quiz-next svg { width: 16px; height: 16px; }

/* ========== LOADING STATE ========== */
.quiz-loading {
    text-align: center;
    padding: 4rem 2rem;
}
.quiz-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--grey-200);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: quizSpin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}
@keyframes quizSpin { to { transform: rotate(360deg); } }
.quiz-loading p {
    font-size: 1rem;
    color: var(--grey-500);
    font-weight: 500;
}

/* ========== RESULTS SECTION ========== */
.quiz-results {
    animation: quizFadeIn 0.5s ease;
}
.quiz-results-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.quiz-results-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
}
.quiz-results-header p {
    color: var(--grey-500);
    font-size: 1rem;
}

/* Hero Result Card (Top Match) */
.result-hero {
    background: white;
    border: 2px solid var(--teal);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}
.result-hero-badge {
    background: var(--teal);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.result-hero-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem;
}
.result-hero-image {
    background: var(--grey-50);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}
.result-hero-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}
.result-hero-info { display: flex; flex-direction: column; }
.result-match {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--teal-50);
    color: var(--teal);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    width: fit-content;
}
.result-match svg { width: 16px; height: 16px; }
.result-hero-info .result-brand {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-400);
    margin-bottom: 0.25rem;
}
.result-hero-info h3 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}
.result-hero-info .result-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.result-stars { color: var(--gold); font-size: 0.875rem; }
.result-rating-text { font-size: 0.8125rem; color: var(--grey-500); }
.result-why {
    font-size: 0.9375rem;
    color: var(--grey-600);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}
.result-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.result-tag {
    padding: 0.25rem 0.625rem;
    background: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--grey-600);
}
.result-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 1rem;
}
.result-price small {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--grey-400);
}
.result-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.result-ctas .btn { font-size: 0.875rem; padding: 0.625rem 1.25rem; }

/* Runner-up Cards */
.result-runners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.result-runner-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--grey-500);
    margin-bottom: 1rem;
}
.result-card {
    background: white;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}
.result-card:hover {
    border-color: var(--teal);
    box-shadow: var(--shadow-md);
}
.result-card-top {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.result-card-img {
    width: 80px;
    height: 80px;
    background: var(--grey-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.5rem;
}
.result-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.result-card-info { min-width: 0; }
.result-card-info .result-match {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
}
.result-card-info .result-brand {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-400);
}
.result-card-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}
.result-card-price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
}
.result-card-ctas {
    display: flex;
    gap: 0.5rem;
}
.result-card-ctas .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    flex: 1;
    justify-content: center;
}

/* Retake / Explore */
.quiz-results-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--grey-200);
}
.quiz-results-footer p {
    font-size: 0.9375rem;
    color: var(--grey-500);
    margin-bottom: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .quiz-hero { padding: 2rem 1.5rem; }
    .quiz-hero h1 { font-size: 1.5rem; }
    .quiz-trust { flex-wrap: wrap; gap: 0.75rem; }
    .quiz-container { padding: 2rem 1.5rem 3rem; }
    .quiz-options.cols-3,
    .quiz-options.cols-4 { grid-template-columns: 1fr 1fr; }
    .result-hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .result-hero-image { max-height: 200px; }
    .result-runners { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .quiz-hero h1 { font-size: 1.25rem; }
    .quiz-options.cols-2,
    .quiz-options.cols-3,
    .quiz-options.cols-4 { grid-template-columns: 1fr; }
    .quiz-step h2 { font-size: 1.25rem; }
    .result-hero-info h3 { font-size: 1.125rem; }
    .result-card-ctas { flex-direction: column; }
    .quiz-progress { top: 0; }
}
