/* =========================================================
   ProTint — Стили квиза по подбору PPF
   Подключается только на странице с шаблоном page-quiz.php
   ========================================================= */

.quiz-section { background:#f8f9fa; }
.quiz-wrap {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

/* === Прогресс-бар === */
.quiz-progress-wrap { margin-bottom: 36px; }
.quiz-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 10px;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E63946, #c1121f);
    border-radius: 50px;
    transition: width 0.4s ease;
}
.quiz-progress-text {
    text-align: right;
    font-size: 14px;
    color: #6c757d;
}
.quiz-progress-text strong { color: #E63946; }

/* === Шаги === */
.quiz-step { display: none; animation: quizFadeIn 0.4s ease; }
.quiz-step.active { display: block; }

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

.quiz-question {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    text-align: center;
}
.quiz-hint {
    text-align: center;
    color: #6c757d;
    font-size: 15px;
    margin: 0 0 28px;
}

/* === Варианты ответов === */
.quiz-options { display: grid; gap: 16px; margin-bottom: 16px; }
.quiz-options-grid-3 { grid-template-columns: repeat(3, 1fr); }
.quiz-options-grid-4 { grid-template-columns: repeat(4, 1fr); }

.quiz-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    font-family: inherit;
    color: inherit;
}
.quiz-option:hover {
    border-color: #E63946;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230,57,70,0.12);
}
.quiz-option.active {
    border-color: #E63946;
    background: linear-gradient(135deg, rgba(230,57,70,0.05), rgba(193,18,31,0.08));
    box-shadow: 0 8px 20px rgba(230,57,70,0.18);
}

.quiz-option-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    color: #E63946;
    font-size: 22px;
    transition: all 0.25s ease;
}
.quiz-option.active .quiz-option-icon {
    background: linear-gradient(135deg, #E63946, #c1121f);
    color: #fff;
    transform: scale(1.1);
}

.quiz-option-title {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
}
.quiz-option-desc {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.quiz-option-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #E63946;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.25s ease;
}
.quiz-option.active .quiz-option-check { opacity: 1; transform: scale(1); }

.quiz-option-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff9800, #f44336);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.quiz-option-hot { border-color: #ff9800; }
.quiz-option-hot:hover { border-color: #f44336; }

/* === Поле ввода (марка авто) === */
.quiz-input-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto 16px;
}
.quiz-input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #E63946;
    font-size: 18px;
}
.quiz-input {
    width: 100%;
    padding: 18px 20px 18px 56px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fff;
    color: #1a1a1a;
}
.quiz-input:focus { border-color: #E63946; }
.quiz-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 520px;
    margin: 0 auto;
}
.quiz-suggestion {
    padding: 6px 14px;
    background: #f1f3f5;
    border-radius: 50px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.quiz-suggestion:hover { background: #E63946; color: #fff; }

/* === Поля формы внутри квиза === */
.quiz-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}
.quiz-form input[type="text"],
.quiz-form input[type="tel"],
.quiz-form input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-text-fill-color: #1a1a1a;
    opacity: 1;
}
.quiz-form input::placeholder {
    color: #adb5bd;
    opacity: 1;
}
.quiz-form input:focus {
    border-color: #E63946;
    background: #fff;
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
}
.quiz-form input:-webkit-autofill,
.quiz-form input:-webkit-autofill:hover,
.quiz-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1a1a1a !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    caret-color: #1a1a1a;
}
.quiz-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.quiz-form .form-consent {
    margin-top: 14px;
}
.quiz-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #6c757d;
    cursor: pointer;
}
.quiz-form .checkbox-label a { color: #E63946; }

/* === Навигация === */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f1f3f5;
}

/* === Финальный шаг — результат === */
.quiz-result-block {
    text-align: center;
    padding: 20px 0 28px;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 28px;
}
.quiz-result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #E63946, #c1121f);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    animation: quizPulse 1.5s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(230,57,70,0.35);
}
@keyframes quizPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}
.quiz-result-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a1a;
}
.quiz-recommendation {
    font-size: 16px;
    line-height: 1.6;
    color: #495057;
    max-width: 640px;
    margin: 0 auto 20px;
    min-height: 60px;
}
.quiz-recommendation.typing-active::after {
    content: "\258E";
    color: #E63946;
    animation: quizBlink 0.8s steps(2) infinite;
}
@keyframes quizBlink { 50% { opacity: 0; } }

/* Точки "печатает" */
.quiz-typing { display: inline-flex; gap: 6px; }
.quiz-typing-dot {
    width: 10px; height: 10px;
    background: #E63946;
    border-radius: 50%;
    animation: quizTyping 1.2s ease-in-out infinite;
}
.quiz-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.quiz-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes quizTyping {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30%           { opacity: 1;   transform: scale(1.1); }
}

.quiz-promo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fff3cd, #ffe69c);
    border: 1px dashed #ff9800;
    padding: 14px 22px;
    border-radius: 12px;
    margin-top: 12px;
}
.quiz-promo i {
    font-size: 22px;
    color: #ff9800;
}
.quiz-promo strong {
    display: block;
    font-size: 16px;
    color: #5c3a00;
}
.quiz-promo span {
    font-size: 13px;
    color: #856404;
}

.quiz-form-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    text-align: center;
    color: #1a1a1a;
}
.quiz-form-subtitle {
    text-align: center;
    color: #6c757d;
    margin: 0 0 20px;
}

/* === Экран успеха === */
.quiz-success {
    text-align: center;
    padding: 40px 20px;
}
.quiz-success-icon {
    font-size: 80px;
    color: #28a745;
    margin-bottom: 20px;
    animation: quizPop 0.5s ease;
}
@keyframes quizPop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.quiz-success h3 {
    font-size: 28px;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.quiz-success p {
    font-size: 16px;
    color: #495057;
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

/* === Адаптив === */
@media (max-width: 768px) {
    .quiz-wrap { padding: 24px 16px; border-radius: 14px; }
    .quiz-question { font-size: 20px; }
    .quiz-hint { font-size: 14px; margin-bottom: 20px; }
    .quiz-options-grid-3, .quiz-options-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .quiz-option { padding: 18px 12px; }
    .quiz-option-icon { width: 48px; height: 48px; font-size: 18px; }
    .quiz-option-title { font-size: 14px; }
    .quiz-option-desc { font-size: 12px; }
    .quiz-result-title { font-size: 20px; }
    .quiz-recommendation { font-size: 15px; }
    .quiz-form .form-row { grid-template-columns: 1fr; }
    .quiz-nav { flex-direction: column-reverse; }
    .quiz-nav .btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .quiz-options-grid-3, .quiz-options-grid-4 { grid-template-columns: 1fr; }
}