/**
 * Quiz Engine - Estilos do quiz dinamico
 * Subsistema: site (publico)
 * Usado por: quiz.php
 * Dependencias: base.css (loaded via header)
 */

        :root {
            --quiz-theme:
                <?= htmlspecialchars($corTema) ?>
            ;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .quiz-page {
            min-height: 100vh;
            background: linear-gradient(180deg, #fafaf8 0%, #f5f0eb 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem 1rem;
        }

        .quiz-brand {
            text-align: center;
            margin-bottom: 1.5rem;
            opacity: 0.6;
            font-size: 0.75rem;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: #999;
        }

        .quiz-brand a {
            color: inherit;
            text-decoration: none;
        }

        .quiz-container {
            max-width: 600px;
            width: 100%;
        }

        .quiz-progress {
            height: 3px;
            background: #e5e5e5;
            border-radius: 100px;
            margin-bottom: 2rem;
            overflow: hidden;
        }

        .quiz-progress__bar {
            height: 100%;
            background: linear-gradient(90deg, var(--quiz-theme), color-mix(in srgb, var(--quiz-theme) 70%, #000));
            border-radius: 100px;
            transition: width 0.5s ease;
            width: 0%;
        }

        /* Step card */
        .quiz-step {
            background: #fff;
            border-radius: 16px;
            padding: 2rem;
            border: 1px solid #e5e5e5;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
            display: none;
        }

        .quiz-step.active {
            display: block;
            animation: quizFadeIn 0.4s ease;
        }

        @keyframes quizFadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .quiz-step__number {
            font-size: 0.7rem;
            font-weight: 600;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: var(--quiz-theme);
            margin-bottom: 1rem;
        }

        .quiz-step__question {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.35rem;
            color: #1a1a1a;
            margin-bottom: 1.25rem;
            line-height: 1.4;
        }

        .quiz-step__subtitle {
            color: #777;
            font-size: 0.875rem;
            margin-bottom: 1.25rem;
        }

        .quiz-step__desc {
            color: #777;
            font-size: 0.875rem;
            line-height: 1.7;
            margin-bottom: 1.25rem;
        }

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

        .quiz-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.875rem 1.25rem;
            border: 2px solid #e5e5e5;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.875rem;
            color: #333;
        }

        .quiz-option:hover {
            border-color: var(--quiz-theme);
            background: color-mix(in srgb, var(--quiz-theme) 5%, transparent);
        }

        .quiz-option.selected {
            border-color: var(--quiz-theme);
            background: color-mix(in srgb, var(--quiz-theme) 8%, transparent);
        }

        .quiz-option__check {
            width: 20px;
            height: 20px;
            border: 2px solid #ccc;
            border-radius: 50%;
            flex-shrink: 0;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: auto;
        }

        .quiz-option.selected .quiz-option__check {
            background: var(--quiz-theme);
            border-color: var(--quiz-theme);
        }

        .quiz-option.selected .quiz-option__check::after {
            content: '\2713';
            color: white;
            font-size: 12px;
            font-weight: 700;
        }

        .quiz-option--checkbox .quiz-option__check {
            border-radius: 4px;
        }

        /* Navigation */
        .quiz-nav {
            display: flex;
            justify-content: space-between;
            margin-top: 1.5rem;
        }

        .quiz-nav .btn {
            min-width: 120px;
        }

        /* Welcome step */
        .quiz-welcome {
            text-align: center;
        }

        .quiz-welcome__benefits {
            list-style: none;
            padding: 0;
            margin: 1.25rem 0;
            text-align: left;
        }

        .quiz-welcome__benefits li {
            padding: 0.5rem 0;
            font-size: 0.875rem;
            color: #666;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .quiz-welcome__benefits li::before {
            content: '\2713';
            color: var(--quiz-theme);
            font-weight: 700;
        }

        /* Form step */
        .quiz-form .form-group {
            margin-bottom: 0.875rem;
        }

        .quiz-form .form-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid #e5e5e5;
            border-radius: 8px;
            font-size: 0.875rem;
            font-family: 'Inter', sans-serif;
        }

        .quiz-form .form-input:focus {
            outline: none;
            border-color: var(--quiz-theme);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--quiz-theme) 15%, transparent);
        }

        /* Result page */
        .quiz-result {
            background: #fff;
            border-radius: 16px;
            padding: 2.5rem 2rem;
            border: 1px solid #e5e5e5;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            text-align: center;
            display: none;
        }

        .quiz-result.active {
            display: block;
            animation: quizFadeIn 0.5s ease;
        }

        .quiz-result__icon {
            font-size: 3rem;
            margin-bottom: 1rem;
        }

        .quiz-result__title {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.5rem;
            color: #1a1a1a;
            margin-bottom: 0.75rem;
            line-height: 1.3;
        }

        .quiz-result__desc {
            color: #666;
            font-size: 0.875rem;
            line-height: 1.7;
            margin-bottom: 1.5rem;
            max-width: 480px;
            margin-left: auto;
            margin-right: auto;
        }

        /* Result: video */
        .quiz-result__video {
            margin-bottom: 1.5rem;
            border-radius: 12px;
            overflow: hidden;
            aspect-ratio: 16/9;
            background: #000;
        }

        .quiz-result__video iframe {
            width: 100%;
            height: 100%;
            border: 0;
        }

        /* Result: image */
        .quiz-result__image {
            margin-bottom: 1.5rem;
            border-radius: 12px;
            overflow: hidden;
        }

        .quiz-result__image img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* CTA button */
        .quiz-result__cta {
            margin-top: 1.5rem;
        }

        .quiz-result__cta .btn-cta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.875rem 2rem;
            border-radius: 100px;
            font-size: 0.9375rem;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
            border: none;
        }

        .btn-cta--whatsapp {
            background: #25D366;
            color: #fff;
        }

        .btn-cta--whatsapp:hover {
            background: #1fb855;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
        }

        .btn-cta--comprar {
            background: var(--quiz-theme);
            color: #fff;
        }

        .btn-cta--comprar:hover {
            opacity: 0.9;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .btn-cta--iniciar {
            background: #1a1a1a;
            color: #fff;
        }

        .btn-cta--iniciar:hover {
            background: #333;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .btn-cta--agendar {
            background: var(--quiz-theme);
            color: #fff;
        }

        .btn-cta--agendar:hover {
            opacity: 0.9;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .btn-cta--custom {
            background: var(--quiz-theme);
            color: #fff;
        }

        .btn-cta--custom:hover {
            opacity: 0.9;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* Loading */
        .quiz-loading {
            display: none;
            text-align: center;
            padding: 3rem;
        }

        .quiz-loading.active {
            display: block;
        }

        .quiz-loading__spinner {
            width: 40px;
            height: 40px;
            border: 3px solid #e5e5e5;
            border-top-color: var(--quiz-theme);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 1rem;
        }

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

        .quiz-loading p {
            color: #777;
            font-size: 0.875rem;
        }

        /* Alert */
        .quiz-alert {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #991b1b;
            padding: 0.625rem 1rem;
            border-radius: 8px;
            font-size: 0.875rem;
            margin-bottom: 1rem;
            display: none;
        }

        /* Powered by */
        .quiz-footer {
            text-align: center;
            margin-top: 2rem;
            opacity: 0.4;
            font-size: 0.7rem;
            color: #999;
        }

        .quiz-footer a {
            color: inherit;
            text-decoration: none;
        }

        /* ====== New Step Types (v2.13.0) ====== */

        /* Radio Buttons */
        .quiz-radios {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin: 1.25rem 0;
        }

        .quiz-radio-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.875rem 1rem;
            border: 1px solid #e2e0dc;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            background: #fff;
            font-size: 0.9375rem;
        }

        .quiz-radio-option:hover {
            border-color: var(--quiz-theme);
            background: rgba(0, 0, 0, 0.01);
        }

        .quiz-radio-option input[type="radio"] {
            display: none;
        }

        .quiz-radio__circle {
            width: 20px;
            height: 20px;
            border: 2px solid #ccc;
            border-radius: 50%;
            flex-shrink: 0;
            position: relative;
            transition: all 0.2s;
        }

        .quiz-radio-option input[type="radio"]:checked ~ .quiz-radio__circle {
            border-color: var(--quiz-theme);
        }

        .quiz-radio-option input[type="radio"]:checked ~ .quiz-radio__circle::after {
            content: '';
            width: 10px;
            height: 10px;
            background: var(--quiz-theme);
            border-radius: 50%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .quiz-radio-option:has(input:checked) {
            border-color: var(--quiz-theme);
            background: rgba(0, 0, 0, 0.02);
            box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
        }

        /* Rating Stars */
        .quiz-rating {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin: 1.5rem 0;
        }

        .quiz-star {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.25rem;
            color: #d4d4d4;
            transition: all 0.2s;
        }

        .quiz-star:hover,
        .quiz-star.active {
            color: var(--quiz-theme);
        }

        .quiz-star.active svg {
            fill: var(--quiz-theme);
        }

        .quiz-star:hover svg {
            transform: scale(1.15);
        }

        /* Email & Phone field feedback */
        .quiz-field-feedback {
            font-size: 0.75rem;
            margin-top: 0.25rem;
            min-height: 1rem;
            color: #dc2626;
        }

        .form-input.valid {
            border-color: #16a34a;
        }

        .form-input.invalid {
            border-color: #dc2626;
        }

        /* Number input styling */
        .quiz-number-input {
            text-align: center;
            font-size: 1.25rem;
            font-weight: 600;
            letter-spacing: 1px;
        }

        .quiz-number-input::-webkit-inner-spin-button,
        .quiz-number-input::-webkit-outer-spin-button {
            opacity: 1;
            height: 2rem;
        }