/**
 * LebenszeitRechner – Styles
 * Scoped unter .wwgt-lz-app. Nutzt die geteilten wwgt-* Tokens.
 * Bewusst nur Light-Mode (wie alle anderen GKV-Tools, eingebettet auf hellen Seiten).
 */

.wwgt-lz-app {
    --lz-base: #0097cf;   /* Sterbetafel-Basis (WW-CI-Blau, kontraststark) */
    --lz-smoke: #dc2626;  /* aktuelles Rauchverhalten */
    --lz-amber: #f59e0b;  /* verbleibende Lebenszeit im Lebensbalken */
    --lz-navy: var(--wwgt-navy, #1a3d5c);

    font-family: var(--wwgt-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    color: var(--wwgt-text, #1a3d5c);
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.55;
}

.wwgt-lz-app *,
.wwgt-lz-app *::before,
.wwgt-lz-app *::after {
    box-sizing: border-box;
}

/* Astra-sicher: [hidden] muss greifen */
.wwgt-lz-app [hidden] {
    display: none !important;
}

/* ── Hero ─────────────────────────────────────────────── */
.wwgt-lz-hero {
    position: relative;
    border-radius: var(--wwgt-radius-lg, 12px);
    padding: 28px 26px 24px;
    color: #fff;
    background: var(--wwgt-hero-gradient, linear-gradient(135deg, #1a3d5c 0%, #1e5580 45%, #12304a 100%));
    background-size: cover;
    background-position: center;
    margin-bottom: 18px;
}

.wwgt-lz-hero__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.wwgt-lz-hero__title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.wwgt-lz-hero__subtitle {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 52ch;
}

/* ── Card ─────────────────────────────────────────────── */
.wwgt-lz-card {
    background: var(--wwgt-surface, #fff);
    border: 1px solid var(--wwgt-border, #e2e8f0);
    border-radius: var(--wwgt-radius-lg, 12px);
    padding: 26px 24px 24px;
    box-shadow: var(--wwgt-shadow, 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04));
}

/* ── Fortschritt ─────────────────────────────────────── */
.wwgt-lz-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.wwgt-lz-progress__step {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: var(--wwgt-border, #e2e8f0);
    transition: background 0.2s;
}

.wwgt-lz-progress__step.is-active,
.wwgt-lz-progress__step.is-done {
    background: var(--wwgt-primary, #00aeef);
}

/* ── Schritte ────────────────────────────────────────── */
.wwgt-lz-step {
    display: none;
    text-align: center;
}

.wwgt-lz-step.is-active {
    display: block;
    animation: wwgt-lz-fade 0.25s ease;
}

@keyframes wwgt-lz-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.wwgt-lz-step__q {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--lz-navy);
}

.wwgt-lz-step__hint {
    margin: 0 auto 18px;
    font-size: 13px;
    color: var(--wwgt-text-muted, #64748b);
    max-width: 46ch;
}

.wwgt-lz-bignum {
    font-size: 44px;
    font-weight: 800;
    color: var(--wwgt-primary, #00aeef);
    line-height: 1;
    margin: 6px 0 14px;
}

.wwgt-lz-bignum small {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wwgt-text-muted, #64748b);
    margin-top: 4px;
}

/* Range */
.wwgt-lz-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--wwgt-surface-blue, #ebf7fe);
    outline: none;
    margin: 4px 0 4px;
}
.wwgt-lz-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--wwgt-primary, #00aeef);
    border: 3px solid #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.wwgt-lz-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--wwgt-primary, #00aeef);
    border: 3px solid #fff;
    cursor: pointer;
}

/* Choices */
.wwgt-lz-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
}

.wwgt-lz-choice {
    flex: 1 1 140px;
    max-width: 220px;
    padding: 14px 12px;
    border: 2px solid var(--wwgt-border, #e2e8f0);
    border-radius: var(--wwgt-radius, 8px);
    background: #fff;
    font: inherit;
    font-weight: 600;
    color: var(--lz-navy);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.wwgt-lz-choice:hover { border-color: var(--wwgt-primary, #00aeef); }
.wwgt-lz-choice.is-active {
    border-color: var(--wwgt-primary, #00aeef);
    background: var(--wwgt-primary-light, #e8f7fd);
}

/* Chips */
.wwgt-lz-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 6px 0 16px;
}

.wwgt-lz-chip {
    min-width: 46px;
    padding: 8px 12px;
    border: 1px solid var(--wwgt-border, #e2e8f0);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-weight: 600;
    color: var(--wwgt-text-muted, #64748b);
    cursor: pointer;
}
.wwgt-lz-chip.is-active {
    border-color: var(--wwgt-primary, #00aeef);
    background: var(--wwgt-primary, #00aeef);
    color: #fff;
}

/* Price input + checkbox */
.wwgt-lz-priceinput {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 16px;
    font-weight: 600;
    color: var(--lz-navy);
}
.wwgt-lz-priceinput input {
    width: 110px;
    padding: 12px 14px;
    border: 2px solid var(--wwgt-border, #e2e8f0);
    border-radius: var(--wwgt-radius, 8px);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: var(--lz-navy);
}

.wwgt-lz-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    max-width: 42ch;
    margin: 0 auto 18px;
    font-size: 14px;
    color: var(--wwgt-text-muted, #64748b);
    cursor: pointer;
}
.wwgt-lz-check input { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; }

/* Nav */
.wwgt-lz-step__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

/* Buttons */
.wwgt-lz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: var(--wwgt-radius, 8px);
    background: var(--wwgt-primary, #00aeef);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.wwgt-lz-btn:hover { background: var(--wwgt-primary-dark, #0099d4); color: #fff; }
.wwgt-lz-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.wwgt-lz-btn--ghost {
    background: transparent;
    border-color: var(--wwgt-border, #e2e8f0);
    color: var(--lz-navy);
}
.wwgt-lz-btn--ghost:hover {
    background: var(--wwgt-surface-soft, #f8fafc);
    border-color: var(--wwgt-primary, #00aeef);
    color: var(--wwgt-primary, #00aeef);
}

.wwgt-lz-btn--go {
    background: var(--wwgt-success, #16a34a);
}
.wwgt-lz-btn--go:hover { background: #128a3e; }

/* ── Ergebnis ────────────────────────────────────────── */
.wwgt-lz-result { animation: wwgt-lz-fade 0.3s ease; }

.wwgt-lz-headline {
    text-align: center;
    padding: 22px 16px 20px;
    background: var(--wwgt-danger-bg, #fef2f2);
    border: 1px solid #fca5a5;
    border-radius: var(--wwgt-radius-lg, 12px);
    margin-bottom: 18px;
}
.wwgt-lz-headline__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lz-smoke);
}
.wwgt-lz-headline__num {
    font-size: 52px;
    font-weight: 800;
    color: var(--lz-smoke);
    line-height: 1.05;
    display: inline-block;
    margin: 4px 6px 0 0;
}
.wwgt-lz-headline__unit {
    font-size: 22px;
    font-weight: 800;
    color: var(--lz-smoke);
}
.wwgt-lz-headline__sub {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--wwgt-text-muted, #64748b);
}

.wwgt-lz-ministats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}
.wwgt-lz-ministat {
    text-align: center;
    padding: 14px 8px;
    background: var(--wwgt-surface-soft, #f8fafc);
    border: 1px solid var(--wwgt-border, #e2e8f0);
    border-radius: var(--wwgt-radius, 8px);
}
.wwgt-lz-ministat strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--lz-navy);
}
.wwgt-lz-ministat span {
    font-size: 12px;
    color: var(--wwgt-text-muted, #64748b);
}

/* ── Charts ──────────────────────────────────────────── */
.wwgt-lz-chart { margin-bottom: 24px; }

.wwgt-lz-chart__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--lz-navy);
}

.wwgt-lz-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 10px;
}
.wwgt-lz-lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--wwgt-text-muted, #64748b);
}
.wwgt-lz-lg i {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}
.wwgt-lz-lg--base i { background: var(--lz-base); }
.wwgt-lz-lg--smoke i { background: var(--lz-smoke); }
.wwgt-lz-lg--lived i { background: var(--lz-navy); }
.wwgt-lz-lg--left i { background: var(--lz-amber); }
.wwgt-lz-lg--gap i {
    background: repeating-linear-gradient(45deg, var(--lz-smoke) 0 3px, #fff 3px 6px);
    border: 1px solid var(--lz-smoke);
}

.wwgt-lz-chart__note {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--wwgt-text-muted, #64748b);
    line-height: 1.5;
}

/* Chart 1 – Balken */
.wwgt-lz-bars { display: flex; flex-direction: column; gap: 14px; }

.wwgt-lz-bar__cap {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--lz-navy);
    margin-bottom: 5px;
}

.wwgt-lz-bar__track {
    display: flex;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--wwgt-surface-soft, #f8fafc);
}

.wwgt-lz-bar__fill {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
    min-width: 0;
}
.wwgt-lz-bar__fill--base { background: var(--lz-base); }
.wwgt-lz-bar__fill--smoke {
    background: var(--lz-smoke);
    border-right: 2px solid #fff;
}

.wwgt-lz-bar__gap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, rgba(220, 38, 38, 0.85) 0 4px, #fdecec 4px 8px);
}
.wwgt-lz-bar__gapval {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--lz-smoke);
    background: rgba(255, 255, 255, 0.82);
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Chart 2 – Lebensbalken */
.wwgt-lz-lifebar__track {
    display: flex;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--wwgt-surface-soft, #f8fafc);
}
.wwgt-lz-lifebar__seg { height: 100%; }
.wwgt-lz-lifebar__seg--lived { background: var(--lz-navy); }
.wwgt-lz-lifebar__seg--left {
    background: var(--lz-amber);
    border-left: 2px solid #fff;
}
.wwgt-lz-lifebar__seg--gap {
    background: repeating-linear-gradient(45deg, rgba(220, 38, 38, 0.85) 0 4px, #fdecec 4px 8px);
    border-left: 2px solid #fff;
}

.wwgt-lz-lifebar__scale {
    position: relative;
    height: 30px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--wwgt-text-muted, #64748b);
}
.wwgt-lz-lifebar__scale > span:first-child { position: absolute; left: 0; }
.wwgt-lz-lifebar__scale > span:last-child { position: absolute; right: 0; }
.wwgt-lz-lifebar__now,
.wwgt-lz-lifebar__mark {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
    font-weight: 600;
}
.wwgt-lz-lifebar__now { color: var(--lz-navy); top: 0; }
.wwgt-lz-lifebar__mark { color: var(--lz-smoke); top: 15px; }

/* ── Gewinn ──────────────────────────────────────────── */
.wwgt-lz-gain {
    padding: 20px;
    background: var(--wwgt-success-bg, #f0fdf4);
    border: 1px solid #86efac;
    border-radius: var(--wwgt-radius-lg, 12px);
    margin-bottom: 20px;
}
.wwgt-lz-gaincards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.wwgt-lz-gaincard {
    text-align: center;
    padding: 14px 8px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: var(--wwgt-radius, 8px);
}
.wwgt-lz-gaincard strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--wwgt-success, #16a34a);
}
.wwgt-lz-gaincard span {
    font-size: 12px;
    color: var(--wwgt-text-muted, #64748b);
}
.wwgt-lz-gain__msg {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--lz-navy);
    line-height: 1.5;
}

/* ── CTA + Methodik ──────────────────────────────────── */
.wwgt-lz-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
}

.wwgt-lz-method {
    font-size: 12.5px;
    color: var(--wwgt-text-muted, #64748b);
    border-top: 1px solid var(--wwgt-border, #e2e8f0);
    padding-top: 14px;
}
.wwgt-lz-method summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--lz-navy);
}
.wwgt-lz-method ul {
    margin: 10px 0 8px;
    padding-left: 18px;
}
.wwgt-lz-method li { margin-bottom: 6px; line-height: 1.45; }
.wwgt-lz-method__note { margin: 8px 0 0; }

.wwgt-lz-restart {
    display: flex;
    margin: 16px auto 0;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 560px) {
    .wwgt-lz-hero { padding: 22px 18px; }
    .wwgt-lz-hero__title { font-size: 22px; }
    .wwgt-lz-card { padding: 20px 16px; }
    .wwgt-lz-ministats,
    .wwgt-lz-gaincards { grid-template-columns: 1fr; }
    .wwgt-lz-headline__num { font-size: 42px; }
    .wwgt-lz-bignum { font-size: 38px; }
}
