/* ============================================================
   Timikbaby Quiz v2 - Mobile-first
   Brand: #3f050f (deep burgundy), #faf7f2 (cream), #c5934b (gold accent)
   8 шагов wizard + видео + 2 карточки результата + палитра расцветок
============================================================ */

.tq-quiz {
    font-family: 'Gilroy', 'Inter', Arial, sans-serif;
    color: #1a1a1a;
    background: #faf7f2;
    padding: 32px 16px;
    border-radius: 24px;
    margin: 32px auto;
    max-width: 820px;
    box-sizing: border-box;
}

.tq-quiz *,
.tq-quiz *::before,
.tq-quiz *::after {
    box-sizing: border-box;
}

/* ---------- Hero ---------- */

.tq-quiz__hero {
    text-align: center;
    padding: 12px 0;
}

.tq-quiz__heading {
    font-size: 24px;
    line-height: 1.25;
    color: #3f050f;
    margin: 0 0 12px;
    font-weight: 700;
}

.tq-quiz__subheading {
    font-size: 16px;
    line-height: 1.55;
    color: #5a4f4a;
    margin: 0 0 24px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.tq-quiz__start-btn {
    display: inline-block;
    background: #3f050f;
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 17px;
    padding: 18px 40px;
    border-radius: 90px;
    cursor: pointer;
    min-height: 56px;
    transition: background .2s ease, transform .15s ease;
}

.tq-quiz__start-btn:hover,
.tq-quiz__start-btn:focus {
    background: #5a0716;
    outline: none;
}

.tq-quiz__start-btn:active {
    transform: scale(0.98);
}

.tq-quiz__meta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    color: #7a6f6a;
    font-size: 13px;
}

.tq-quiz__meta-item::before {
    content: "•";
    margin-right: 6px;
    color: #c5934b;
}

.tq-quiz__meta-item:first-child::before {
    content: "";
    margin: 0;
}

/* ---------- Screen ---------- */

.tq-quiz__stage {
    position: relative;
}

.tq-quiz__screen {
    background: #fff;
    border-radius: 20px;
    padding: 28px 20px;
    box-shadow: 0 2px 12px rgba(63, 5, 15, 0.06);
}

.tq-quiz__step-num {
    font-size: 12px;
    color: #c5934b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tq-quiz__q-title {
    font-size: 22px;
    line-height: 1.3;
    color: #3f050f;
    margin: 0 0 8px;
    font-weight: 700;
}

.tq-quiz__q-subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: #7a6f6a;
    margin: 0 0 24px;
}

/* ---------- Options ---------- */

.tq-quiz__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.tq-quiz__option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #faf7f2;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 18px 20px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    color: #1a1a1a;
    cursor: pointer;
    min-height: 56px;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}

.tq-quiz__option:hover,
.tq-quiz__option:focus {
    border-color: #c5934b;
    background: #fff5e8;
    outline: none;
}

.tq-quiz__option--selected {
    border-color: #3f050f;
    background: #fff5e8;
    color: #3f050f;
    font-weight: 600;
}

.tq-quiz__option:active {
    transform: scale(0.99);
}

/* Чекбокс-индикатор для multiple-выбора */
.tq-quiz__option-check {
    width: 22px;
    height: 22px;
    border: 2px solid #c5934b;
    border-radius: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: background .15s, border-color .15s;
}

.tq-quiz__option--selected .tq-quiz__option-check {
    background: #3f050f;
    border-color: #3f050f;
}

.tq-quiz__option--selected .tq-quiz__option-check::after {
    content: "";
    width: 6px;
    height: 11px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    margin-top: -2px;
}

.tq-quiz__option-label {
    flex: 1;
}

/* ---------- Back ---------- */

.tq-quiz__back {
    background: transparent;
    border: none;
    color: #7a6f6a;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    margin-top: 8px;
}

.tq-quiz__back:hover {
    color: #3f050f;
    text-decoration: underline;
}

/* ---------- Progress ---------- */

.tq-quiz__progress {
    margin-top: 24px;
    height: 6px;
    background: #f0e8dd;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.tq-quiz__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c5934b, #3f050f);
    border-radius: 6px;
    transition: width .35s ease;
}

.tq-quiz__progress-label {
    position: absolute;
    top: 12px;
    right: 0;
    font-size: 12px;
    color: #7a6f6a;
}

/* ---------- Email ---------- */

.tq-quiz__email {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #f0e8dd;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    color: #1a1a1a;
    background: #fff;
    margin-bottom: 16px;
    min-height: 56px;
}

.tq-quiz__email:focus {
    outline: none;
    border-color: #3f050f;
}

.tq-quiz__consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #5a4f4a;
    cursor: pointer;
}

.tq-quiz__consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3f050f;
}

.tq-quiz__consent a {
    color: #3f050f;
    text-decoration: underline;
}

.tq-quiz__req {
    color: #c0392b;
    font-weight: 700;
}

.tq-quiz__hint {
    font-size: 12px;
    color: #7a6f6a;
    margin: 8px 0 16px;
    line-height: 1.5;
}

.tq-quiz__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.tq-quiz__submit {
    display: block;
    width: 100%;
    background: #3f050f;
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 17px;
    padding: 18px 28px;
    border-radius: 90px;
    cursor: pointer;
    min-height: 56px;
    margin-top: 16px;
    transition: background .2s ease, transform .15s ease;
}

.tq-quiz__submit:hover,
.tq-quiz__submit:focus {
    background: #5a0716;
    outline: none;
}

.tq-quiz__submit:active {
    transform: scale(0.99);
}

.tq-quiz__error {
    color: #c0392b;
    background: #fff5f4;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin: 8px 0 0;
    line-height: 1.45;
}

.tq-quiz__error:empty {
    display: none;
}

/* ---------- Loading ---------- */

.tq-quiz__screen--loading {
    text-align: center;
    padding: 60px 20px;
    color: #7a6f6a;
}

.tq-quiz__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f0e8dd;
    border-top-color: #3f050f;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: tq-spin 0.9s linear infinite;
}

@keyframes tq-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Result ---------- */

.tq-quiz__screen--result {
    padding: 28px 20px 32px;
}

.tq-quiz__result-title {
    font-size: 24px;
    line-height: 1.3;
    color: #3f050f;
    margin: 0 0 8px;
    font-weight: 700;
    text-align: center;
}

.tq-quiz__result-subtitle {
    font-size: 15px;
    color: #7a6f6a;
    margin: 0 0 16px;
    text-align: center;
    line-height: 1.5;
}

.tq-quiz__result-msg {
    font-size: 14px;
    line-height: 1.5;
    color: #46a932;
    background: #ecf7ec;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 0 0 20px;
    text-align: center;
}

.tq-quiz__result-footnote {
    font-size: 14px;
    line-height: 1.55;
    color: #7a6f6a;
    margin: 28px 0 0;
    text-align: center;
    padding: 16px;
    background: #faf7f2;
    border-radius: 12px;
}

/* ---------- Video ---------- */

.tq-quiz__video {
    margin: 20px 0 28px;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    position: relative;
    aspect-ratio: 16 / 9;
}

.tq-quiz__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.tq-quiz__video-caption {
    position: absolute;
    bottom: 8px;
    left: 12px;
    background: rgba(63, 5, 15, 0.85);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0;
    pointer-events: none;
}

/* ---------- Cards ---------- */

.tq-quiz__card {
    background: #fff;
    border: 2px solid #f0e8dd;
    border-radius: 18px;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.tq-quiz__card--ideal {
    border-color: #3f050f;
    box-shadow: 0 6px 24px rgba(63, 5, 15, 0.1);
}

.tq-quiz__card--alt {
    background: #faf7f2;
}

.tq-quiz__card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #3f050f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.tq-quiz__card--alt .tq-quiz__card-badge {
    background: #c5934b;
}

.tq-quiz__card-body {
    display: flex;
    flex-direction: column;
}

.tq-quiz__card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.tq-quiz__card-info {
    padding: 20px;
}

.tq-quiz__card-title {
    font-size: 18px;
    line-height: 1.3;
    color: #3f050f;
    font-weight: 700;
    margin: 0 0 8px;
}

.tq-quiz__card-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #5a4f4a;
    margin: 0 0 14px;
}

.tq-quiz__card-price {
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 16px;
}

.tq-quiz__card-price del {
    color: #aaa;
    font-weight: 400;
    margin-right: 8px;
    font-size: 16px;
}

.tq-quiz__card-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tq-quiz__card-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 90px;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease;
    border: none;
}

.tq-quiz__card-btn--primary {
    background: #3f050f;
    color: #fff;
}

.tq-quiz__card-btn--primary:hover {
    background: #5a0716;
    color: #fff;
}

.tq-quiz__card--alt .tq-quiz__card-btn--primary {
    background: #c5934b;
}

.tq-quiz__card--alt .tq-quiz__card-btn--primary:hover {
    background: #a87a37;
}

/* ---------- Secondary button ---------- */

.tq-quiz__card-btn--secondary {
    background: transparent;
    color: #3f050f;
    border: 2px solid #3f050f;
}

.tq-quiz__card-btn--secondary:hover {
    background: #3f050f;
    color: #fff;
}

.tq-quiz__card--alt .tq-quiz__card-btn--secondary {
    color: #c5934b;
    border-color: #c5934b;
}

.tq-quiz__card--alt .tq-quiz__card-btn--secondary:hover {
    background: #c5934b;
    color: #fff;
}

/* ---------- Modal расцветок ---------- */

.tq-quiz-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(63, 5, 15, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: tq-modal-fade .2s ease;
}

@keyframes tq-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tq-quiz-modal__dialog {
    background: #fff;
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    position: relative;
    font-family: 'Gilroy', 'Inter', Arial, sans-serif;
}

.tq-quiz-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: #faf7f2;
    color: #3f050f;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

.tq-quiz-modal__close:hover {
    background: #fff5e8;
}

.tq-quiz-modal__title {
    font-size: 22px;
    color: #3f050f;
    margin: 0 0 6px;
    font-weight: 700;
    padding-right: 40px;
}

.tq-quiz-modal__subtitle {
    font-size: 14px;
    color: #7a6f6a;
    margin: 0 0 20px;
}

.tq-quiz-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.tq-quiz-modal__variant {
    background: #faf7f2;
    border: 2px solid #f0e8dd;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color .15s ease;
}

.tq-quiz-modal__variant:hover {
    border-color: #c5934b;
}

.tq-quiz-modal__variant-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.tq-quiz-modal__variant-name {
    font-size: 14px;
    color: #3f050f;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.tq-quiz-modal__variant-price {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 10px;
}

.tq-quiz-modal__add-btn {
    width: 100%;
    background: #3f050f;
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 30px;
    cursor: pointer;
    min-height: 40px;
    transition: background .15s ease;
}

.tq-quiz-modal__add-btn:hover:not(:disabled) {
    background: #5a0716;
}

.tq-quiz-modal__add-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.tq-quiz-modal__add-btn--done {
    background: #46a932;
}

.tq-quiz-modal__add-btn--done:hover:not(:disabled) {
    background: #46a932;
}

/* ---------- Cart toast ---------- */

.tq-quiz-cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100001;
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 12px 40px rgba(63, 5, 15, 0.25);
    border-left: 4px solid #46a932;
    max-width: 320px;
    font-family: 'Gilroy', 'Inter', Arial, sans-serif;
    animation: tq-toast-slide .3s ease;
}

@keyframes tq-toast-slide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.tq-quiz-cart-toast__title {
    font-size: 15px;
    font-weight: 700;
    color: #3f050f;
    margin-bottom: 4px;
}

.tq-quiz-cart-toast__count {
    font-size: 13px;
    color: #7a6f6a;
    margin-bottom: 12px;
}

.tq-quiz-cart-toast__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tq-quiz-cart-toast__btn {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease;
}

.tq-quiz-cart-toast__btn--primary {
    background: #3f050f;
    color: #fff;
}

.tq-quiz-cart-toast__btn--primary:hover {
    background: #5a0716;
    color: #fff;
}

.tq-quiz-cart-toast__btn--secondary {
    background: #faf7f2;
    color: #3f050f;
}

.tq-quiz-cart-toast__btn--secondary:hover {
    background: #fff5e8;
}

@media (max-width: 600px) {
    .tq-quiz-cart-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* ---------- Alternative heading ---------- */

.tq-quiz__alt-heading {
    font-size: 16px;
    color: #7a6f6a;
    margin: 24px 0 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.tq-quiz__no-match {
    text-align: center;
    padding: 30px 20px;
    color: #7a6f6a;
    background: #faf7f2;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
}

/* ---------- Tablet+ ---------- */

@media (min-width: 700px) {
    .tq-quiz {
        padding: 48px 32px;
    }
    .tq-quiz__heading {
        font-size: 32px;
    }
    .tq-quiz__subheading {
        font-size: 17px;
    }
    .tq-quiz__screen {
        padding: 36px 36px;
    }
    .tq-quiz__q-title {
        font-size: 26px;
    }
    .tq-quiz__options {
        gap: 12px;
    }
    .tq-quiz__card-body {
        flex-direction: row;
    }
    .tq-quiz__card-img {
        width: 45%;
        height: auto;
        max-height: 380px;
    }
    .tq-quiz__card--ideal .tq-quiz__card-img {
        width: 50%;
    }
    .tq-quiz__card-info {
        flex: 1;
        padding: 28px;
    }
    .tq-quiz__card--ideal .tq-quiz__card-title {
        font-size: 22px;
    }
}
