/* ============================================================
   ZahnlückenCheck – Styles
   Wendewerk GKV Tools v1.9.8
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
.wwgt-zl-app {
    --wwgt-primary:      #00acec;
    --wwgt-primary-dark: #0077b6;
    --wwgt-text:         #1a2332;
    --wwgt-text-muted:   #6b7280;
    --wwgt-border:       #e5e7eb;
    --wwgt-bg:           #f9fafb;
    --wwgt-white:        #ffffff;
    --wwgt-red:          #ef4444;
    --wwgt-green:        #22c55e;
    --wwgt-yellow:       #f59e0b;
    --wwgt-tooth:        #f0f4f8;
    --wwgt-tooth-miss:   #ef4444;
    --wwgt-radius: 8px;
    --wwgt-shadow: none;

    font-family: inherit;
    color: var(--wwgt-text);
    max-width: 860px;
    margin: 0 auto;
    box-sizing: border-box;
}

.wwgt-zl-app *,
.wwgt-zl-app *::before,
.wwgt-zl-app *::after {
    box-sizing: inherit;
}

/* ── Hero ───────────────────────────────────────────────────── */
.wwgt-zl-hero {
    position: relative;
    padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px);
    border-radius: var(--wwgt-radius) var(--wwgt-radius) 0 0;
    background: linear-gradient(135deg, #12405e 0%, #00acec 100%);
    text-align: center;
    overflow: hidden;
}

.wwgt-zl-hero--has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #12405e;
}

.wwgt-zl-hero__overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(0deg, #00aeed 0%, #12405e -100%);
    opacity: 0.9;
    z-index: 0;
}

.wwgt-zl-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wwgt-zl-hero__eyebrow {
    margin: 0 0 10px;
    color: var(--wwgt-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wwgt-zl-hero--has-image .wwgt-zl-hero__eyebrow {
    color: #00acec;
}

.wwgt-zl-hero__title {
    margin: 0 0 12px;
    color: var(--wwgt-white);
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 500;
}

.wwgt-zl-hero__subtitle {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255,255,255,.88);
    font-size: 17px;
    line-height: 1.7;
}

.wwgt-zl-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.wwgt-zl-hero__facts span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: var(--wwgt-white);
    font-size: 13px;
    line-height: 1.2;
}

/* ── Body ───────────────────────────────────────────────────── */
.wwgt-zl-body {
    background: var(--wwgt-white);
    border: 1px solid var(--wwgt-border);
    border-top: none;
    border-radius: 0 0 var(--wwgt-radius) var(--wwgt-radius);
    padding: clamp(20px, 4vw, 40px);
}

/* ── Section ────────────────────────────────────────────────── */
.wwgt-zl-section {
    margin-bottom: 28px;
}

.wwgt-zl-section:last-child {
    margin-bottom: 0;
}

.wwgt-zl-section__label,
.wwgt-zl-label {
    display: block;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wwgt-text);
}

/* ── Zahn-Anzeige ───────────────────────────────────────────── */
.wwgt-zl-teeth-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.wwgt-zl-teeth-display__number {
    font-size: 48px;
    font-weight: 800;
    color: var(--wwgt-primary);
    line-height: 1;
}

.wwgt-zl-teeth-display__label {
    font-size: 16px;
    color: var(--wwgt-text-muted);
}

/* ── Zahn-Reihe ─────────────────────────────────────────────── */
.wwgt-zl-teeth-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.wwgt-zl-tooth {
    width: 36px;
    height: 44px;
    color: var(--wwgt-tooth);
    transition: color .2s, transform .15s;
}

.wwgt-zl-tooth svg {
    width: 100%;
    height: 100%;
}

.wwgt-zl-tooth--present {
    color: #d1fae5;
}

.wwgt-zl-tooth--missing {
    color: var(--wwgt-tooth-miss);
    transform: scale(0.85);
    opacity: 0.6;
}

/* ── Range ──────────────────────────────────────────────────── */
.wwgt-zl-range-wrap {
    margin-bottom: 8px;
}

.wwgt-zl-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--wwgt-primary) 0%, var(--wwgt-primary) 12.5%, var(--wwgt-border) 12.5%, var(--wwgt-border) 100%);
    outline: none;
    cursor: pointer;
    margin-bottom: 6px;
}

.wwgt-zl-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--wwgt-white);
    border: 2px solid var(--wwgt-primary);
    box-shadow: none;
    cursor: pointer;
    transition: transform .1s;
}

.wwgt-zl-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.wwgt-zl-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--wwgt-white);
    border: 2px solid var(--wwgt-primary);
    box-shadow: none;
    cursor: pointer;
}

.wwgt-zl-range-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--wwgt-text-muted);
}

/* ── Toggle ─────────────────────────────────────────────────── */
.wwgt-zl-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.wwgt-zl-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--wwgt-border);
    border-radius: 8px;
    background: var(--wwgt-white);
    color: var(--wwgt-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.4;
}

.wwgt-zl-toggle__btn--active,
.wwgt-zl-toggle__btn[aria-pressed="true"] {
    background: var(--wwgt-primary);
    color: var(--wwgt-white);
    border-color: var(--wwgt-primary);
    font-weight: 600;
}

.wwgt-zl-toggle__btn:hover:not(.wwgt-zl-toggle__btn--active):not([aria-pressed="true"]) {
    background: var(--wwgt-bg);
    border-color: var(--wwgt-primary);
}

.wwgt-zl-toggle__badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(0,0,0,.08);
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
}

.wwgt-zl-toggle__btn--active .wwgt-zl-toggle__badge,
.wwgt-zl-toggle__btn[aria-pressed="true"] .wwgt-zl-toggle__badge {
    background: rgba(255,255,255,.25);
}

.wwgt-zl-toggle__icon {
    font-size: 16px;
}

/* ── Note ───────────────────────────────────────────────────── */
.wwgt-zl-note {
    margin: 0;
    font-size: 13px;
    color: var(--wwgt-text-muted);
    line-height: 1.6;
    padding: 10px 14px;
    background: var(--wwgt-bg);
    border-radius: 6px;
    border-left: 3px solid var(--wwgt-primary);
}

.wwgt-zl-note--info {
    border-left-color: var(--wwgt-yellow);
}

/* ── Buttons ────────────────────────────────────────────────── */
.wwgt-zl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s, box-shadow .15s;
    text-decoration: none;
    line-height: 1.4;
}

.wwgt-zl-button--primary {
    background: var(--wwgt-primary);
    color: var(--wwgt-white);
    box-shadow: none;
}

.wwgt-zl-button--primary:hover {
    background: var(--wwgt-primary-dark);
    transform: translateY(-1px);
    box-shadow: none;
}

.wwgt-zl-button--secondary {
    background: var(--wwgt-white);
    color: var(--wwgt-text-muted);
    border: 1px solid var(--wwgt-border);
    font-weight: 500;
}

.wwgt-zl-button--secondary:hover {
    background: var(--wwgt-bg);
}

.wwgt-zl-section--action {
    text-align: center;
}

.wwgt-zl-section--reset {
    text-align: center;
    margin-top: 20px;
}

/* ── Ergebnis ───────────────────────────────────────────────── */
.wwgt-zl-result {
    margin-top: 32px;
    border-top: 2px solid var(--wwgt-border);
    padding-top: 32px;
}

/* ── Result Hero ────────────────────────────────────────────── */
.wwgt-zl-result__hero {
    text-align: center;
    margin-bottom: 28px;
}

.wwgt-zl-result__hero-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--wwgt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}

.wwgt-zl-result__hero-amount {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    color: var(--wwgt-red);
    line-height: 1;
    margin: 0 0 4px;
}

.wwgt-zl-result__hero-sub {
    font-size: 14px;
    color: var(--wwgt-text-muted);
    margin: 0;
}

/* ── Balkendiagramm ─────────────────────────────────────────── */
.wwgt-zl-chart {
    background: var(--wwgt-bg);
    border: 1px solid var(--wwgt-border);
    border-radius: var(--wwgt-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.wwgt-zl-chart__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wwgt-text);
    margin-bottom: 16px;
    text-align: center;
}

.wwgt-zl-chart__bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 220px;
    padding-bottom: 32px;
    position: relative;
}

.wwgt-zl-chart__bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    position: relative;
    min-width: 80px;
}

.wwgt-zl-chart__bar-stack {
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    transition: height .5s ease;
}

.wwgt-zl-chart__bar-segment {
    width: 100%;
    transition: height .5s ease;
    position: relative;
}

.wwgt-zl-chart__bar-segment--gkv  { background: var(--wwgt-primary); }
.wwgt-zl-chart__bar-segment--own  { background: var(--wwgt-red); }
.wwgt-zl-chart__bar-segment--zzv  { background: var(--wwgt-green); }

.wwgt-zl-chart__bar-value {
    position: absolute;
    top: -22px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--wwgt-text);
    white-space: nowrap;
}

.wwgt-zl-chart__bar-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: var(--wwgt-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
}

.wwgt-zl-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--wwgt-text-muted);
    align-items: center;
}

.wwgt-zl-legend__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.wwgt-zl-legend__dot--gkv { background: var(--wwgt-primary); }
.wwgt-zl-legend__dot--own { background: var(--wwgt-red); }
.wwgt-zl-legend__dot--zzv { background: var(--wwgt-green); }

/* ── KPI-Karten ─────────────────────────────────────────────── */
.wwgt-zl-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.wwgt-zl-kpi {
    background: var(--wwgt-bg);
    border: 1px solid var(--wwgt-border);
    border-radius: var(--wwgt-radius);
    padding: 16px;
    text-align: center;
}

.wwgt-zl-kpi__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wwgt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}

.wwgt-zl-kpi__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--wwgt-text);
    margin: 0;
    line-height: 1.2;
}

.wwgt-zl-kpi__value--primary { color: var(--wwgt-primary); }
.wwgt-zl-kpi__value--red     { color: var(--wwgt-red); }
.wwgt-zl-kpi__value--green   { color: var(--wwgt-green); }

.wwgt-zl-kpi__sub {
    font-size: 11px;
    color: var(--wwgt-text-muted);
    margin: 4px 0 0;
}

/* ── Bonus-Vergleichstabelle ────────────────────────────────── */
.wwgt-zl-bonus-table {
    background: var(--wwgt-bg);
    border: 1px solid var(--wwgt-border);
    border-radius: var(--wwgt-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.wwgt-zl-bonus-table__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wwgt-text);
    margin-bottom: 14px;
}

.wwgt-zl-bonus-table__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
    border: 1px solid var(--wwgt-border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
}

.wwgt-zl-bonus-table__cell {
    padding: 10px 12px;
    border-right: 1px solid var(--wwgt-border);
    border-bottom: 1px solid var(--wwgt-border);
    line-height: 1.4;
}

.wwgt-zl-bonus-table__cell:last-child,
.wwgt-zl-bonus-table__cell:nth-child(4n) {
    border-right: none;
}

.wwgt-zl-bonus-table__cell--header {
    background: #f3f4f6;
    font-weight: 700;
    font-size: 12px;
    color: var(--wwgt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wwgt-zl-bonus-table__cell--active {
    background: rgba(0,172,236,.06);
    font-weight: 600;
}

.wwgt-zl-bonus-table__cell--red {
    color: var(--wwgt-red);
    font-weight: 600;
}

.wwgt-zl-bonus-table__cell--green {
    color: var(--wwgt-green);
    font-weight: 600;
}

/* ── Alert ──────────────────────────────────────────────────── */
.wwgt-zl-alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.wwgt-zl-alert--warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #92400e;
}

.wwgt-zl-alert--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.wwgt-zl-alert__title {
    font-weight: 700;
    margin: 0 0 4px;
}

/* ── CTA ────────────────────────────────────────────────────── */
.wwgt-zl-cta {
    background: linear-gradient(135deg, #e0f7ff 0%, #f0f9ff 100%);
    border: 1px solid rgba(0,172,236,.2);
    border-radius: var(--wwgt-radius);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 20px;
}

.wwgt-zl-cta__badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--wwgt-primary);
    color: var(--wwgt-white);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.wwgt-zl-cta__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wwgt-text);
    margin: 0 0 8px;
}

.wwgt-zl-cta__copy {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--wwgt-text);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wwgt-zl-body {
        padding: 20px 16px;
    }

    .wwgt-zl-toggle__btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .wwgt-zl-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .wwgt-zl-chart__bars {
        height: 170px;
        gap: 6px;
    }

    .wwgt-zl-bonus-table__grid {
        font-size: 12px;
    }

    .wwgt-zl-bonus-table__cell {
        padding: 8px 8px;
    }

    .wwgt-zl-teeth-row {
        gap: 4px;
    }

    .wwgt-zl-tooth {
        width: 28px;
        height: 34px;
    }
}
