/**
 * Teehaus v2 — Teeberater Styles (Theme-Override des Modul-CSS).
 * Nutzt die globalen Theme-Tokens (var(--color-*), var(--font-display)) aus styles.css.
 * Stylt Intro, Quiz, Antwort-Karten (.teeberater__answer vom JS erzeugt), Ergebnis-Produkte
 * (.teeberater__product vom JS erzeugt), E-Mail-Capture.
 */

.teeberater {
    max-width: 56rem;
    margin: 2.5rem auto 4rem;
    padding-inline: 1rem;
    color: var(--color-foreground);
}

.teeberater [hidden] { display: none !important; }

.teeberater__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-primary);
}

.teeberater__title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 4.5vw, 2.75rem);
    line-height: 1.1;
    color: var(--color-foreground);
    margin-top: 0.5rem;
}

/* ---------- Intro ---------- */
.teeberater__intro {
    position: relative;
    overflow: hidden;
    text-align: center;
    border-radius: 2rem;
    padding: 3.5rem 1.75rem;
    background-image:
        radial-gradient(70% 80% at 0 0, rgb(255 225 205 / 0.7), transparent 60%),
        radial-gradient(75% 80% at 100% 100%, rgb(216 249 221 / 0.6), transparent 60%),
        linear-gradient(#fffdfa, #fff7eb);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
}

.teeberater__lead {
    max-width: 36rem;
    margin: 1rem auto 0;
    color: var(--color-muted-foreground);
    font-size: 1.05rem;
    line-height: 1.6;
}

.teeberater__intro .teeberater__start { margin-top: 1.75rem; }

.teeberater__steps {
    list-style: none;
    margin: 2.75rem auto 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    max-width: 38rem;
}
.teeberater__steps li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-muted-foreground);
}
.teeberater__steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: calc(infinity * 1px);
    background-color: var(--color-primary-soft);
    color: var(--color-primary-darker, #153c1d);
    font-weight: 700;
    font-size: 0.8rem;
}

/* ---------- Buttons ---------- */
.teeberater__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: calc(infinity * 1px);
    padding: 0.8rem 1.7rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}
.teeberater__btn--primary {
    background-color: var(--color-primary);
    color: var(--color-on-primary, #fcfaf3);
}
.teeberater__btn--primary:hover:not(:disabled) {
    background-color: var(--color-primary-darker, #153c1d);
}
.teeberater__btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.teeberater__btn--ghost {
    background-color: var(--color-card, #fff);
    color: var(--color-foreground);
    border-color: var(--color-border);
}
.teeberater__btn--ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ---------- Quiz ---------- */
.teeberater__app {
    display: flex;
    flex-direction: column;
    border-radius: 2rem;
    padding: 2.5rem 1.75rem;
    background-color: var(--color-card, #fff);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    box-shadow: 0 12px 32px rgb(21 60 29 / 0.05);
}
@media (min-width: 768px) { .teeberater__app { padding: 3rem; } }

.teeberater__progress { margin-bottom: 1rem; }
.teeberater__progress-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-primary);
    padding: 0.35rem 0.85rem;
    border-radius: calc(infinity * 1px);
    background-color: var(--color-primary-soft);
}

.teeberater__question {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    line-height: 1.2;
    color: var(--color-foreground);
    margin-bottom: 1.75rem;
    outline: none;
}

.teeberater__answers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}
@media (min-width: 640px) { .teeberater__answers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.teeberater__answer {
    position: relative;
    text-align: left;
    padding: 1.1rem 1.3rem;
    border-radius: 1.1rem;
    background-color: var(--color-background, #fffdfa);
    border: 1.5px solid var(--color-border);
    color: var(--color-foreground);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.teeberater__answer:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
}
.teeberater__answer.is-selected {
    border-color: var(--color-primary);
    background-color: var(--color-primary-soft);
    color: var(--color-primary-darker, #153c1d);
    font-weight: 600;
}
.teeberater__answer.is-selected::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    transform: translateY(-50%);
    border-radius: calc(infinity * 1px);
    background: var(--color-primary)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/0.75rem no-repeat;
}

.teeberater__nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}
.teeberater__nav .teeberater__next { margin-left: auto; }

/* ---------- Loading ---------- */
.teeberater__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3.5rem 1rem;
    text-align: center;
    color: var(--color-muted-foreground);
    font-size: 1.05rem;
}
.teeberater__spinner {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: calc(infinity * 1px);
    border: 3px solid var(--color-primary-soft);
    border-top-color: var(--color-primary);
    animation: teeberater-spin 0.8s linear infinite;
}
@keyframes teeberater-spin { to { transform: rotate(360deg); } }

/* ---------- Ergebnis ---------- */
.teeberater__results-head { text-align: center; margin-bottom: 2rem; }

.teeberater__products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 640px) { .teeberater__products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .teeberater__products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.teeberater__product {
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: var(--color-card, #fff);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.teeberater__product:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgb(21 60 29 / 0.08);
}
.teeberater__product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: var(--color-muted);
}
.teeberater__product-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.25rem;
    flex: 1;
}
.teeberater__product-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-foreground);
}
.teeberater__reason {
    font-size: 0.9rem;
    color: var(--color-muted-foreground);
    line-height: 1.5;
}
.teeberater__price {
    margin-top: 0.25rem;
    font-weight: 600;
    color: var(--color-foreground);
}
.teeberater__product [data-product-link] {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: calc(infinity * 1px);
    padding: 0.6rem 1.2rem;
    background-color: var(--color-primary);
    color: var(--color-on-primary, #fcfaf3);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.teeberater__product [data-product-link]:hover { background-color: var(--color-primary-darker, #153c1d); }

/* ---------- E-Mail-Capture ---------- */
.teeberater__email {
    margin-top: 2.5rem;
    padding: 1.75rem;
    border-radius: 1.5rem;
    background-color: var(--color-muted, #f5f3ed);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
}
.teeberater__email-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
    color: var(--color-foreground);
}
.teeberater__email-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.teeberater__email-row input {
    flex: 1;
    min-width: 12rem;
    border-radius: calc(infinity * 1px);
    border: 1px solid var(--color-border);
    background-color: var(--color-card, #fff);
    padding: 0.7rem 1.1rem;
    font-size: 0.95rem;
    color: var(--color-foreground);
}
.teeberater__email-row input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.teeberater__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--color-muted-foreground);
    line-height: 1.45;
}
.teeberater__consent input { margin-top: 0.2rem; accent-color: var(--color-primary); }
.teeberater__email-hint {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--color-muted-foreground);
}
.teeberater__form-message {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
}

.teeberater__restart { text-align: center; margin-top: 2rem; }

/* ---------- Fehler ---------- */
.teeberater__error {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background-color: color-mix(in srgb, var(--color-destructive) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-destructive) 35%, transparent);
    color: var(--color-destructive, #d01d21);
    font-size: 0.92rem;
}
