/* =============================================================
   PflegekostenCheck – Stylesheet
   Wendewerk GKV Tools
   ============================================================= */

/* ── Root / Variables ──────────────────────────────────────── */
.wwgt-pflegekostencheck {
    --pkc-primary:    #00acec;
    --pkc-dark:       #12405e;
    --pkc-danger:     #e53e3e;
    --pkc-warning:    #d97706;
    --pkc-success:    #16a34a;
    --pkc-kg:         #00acec;
    --pkc-zuschlag:   #16a34a;
    --pkc-eigenanteil:#e53e3e;
    --pkc-radius: 8px;
    --pkc-shadow: none;

    font-family: inherit;
    color: #1a202c;
    max-width: 900px;
    margin: 0 auto;
}

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

.wwgt-pkc-hero--has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

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

.wwgt-pkc-hero__inner {
    position: relative;
    z-index: 1;
}

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

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

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

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

.wwgt-pkc-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.wwgt-pkc-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: #ffffff;
    font-size: 13px;
    line-height: 1.2;
}

/* ── Form Section ───────────────────────────────────────────── */
.wwgt-pkc-form-section {
    background: #ffffff;
    border-radius: var(--pkc-radius);
    box-shadow: none;
    padding: clamp(24px, 4vw, 48px);
    margin-bottom: 32px;
}

.wwgt-pkc-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ── Fields ─────────────────────────────────────────────────── */
.wwgt-pkc-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wwgt-pkc-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
}

.wwgt-pkc-label__value {
    font-size: 15px;
    font-weight: 700;
    color: var(--pkc-primary);
    background: rgba(0,172,236,.08);
    padding: 2px 10px;
    border-radius: 999px;
}

.wwgt-pkc-hint {
    margin: 0;
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

/* ── Slider ─────────────────────────────────────────────────── */
.wwgt-pkc-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wwgt-pkc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
}

.wwgt-pkc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pkc-primary);
    border: 3px solid #ffffff;
    box-shadow: none;
    cursor: pointer;
    transition: transform .15s;
}

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

.wwgt-pkc-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pkc-primary);
    border: 3px solid #ffffff;
    box-shadow: none;
    cursor: pointer;
}

.wwgt-pkc-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #a0aec0;
}

/* ── Select ─────────────────────────────────────────────────── */
.wwgt-pkc-select-wrap {
    position: relative;
}

.wwgt-pkc-select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2300acec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.wwgt-pkc-select {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    color: #1a202c;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.wwgt-pkc-select:focus {
    outline: none;
    border-color: var(--pkc-primary);
    box-shadow: 0 0 0 3px rgba(0,172,236,.15);
}

/* ── Grade Grid ─────────────────────────────────────────────── */
.wwgt-pkc-grade-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.wwgt-pkc-grade-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}

.wwgt-pkc-grade-btn:hover {
    border-color: var(--pkc-primary);
    background: rgba(0,172,236,.05);
}

.wwgt-pkc-grade-btn.is-active {
    border-color: var(--pkc-primary);
    background: rgba(0,172,236,.08);
    box-shadow: 0 0 0 3px rgba(0,172,236,.15);
}

.wwgt-pkc-grade-btn__num {
    font-size: 22px;
    font-weight: 800;
    color: var(--pkc-primary);
    line-height: 1;
}

.wwgt-pkc-grade-btn.is-active .wwgt-pkc-grade-btn__num {
    color: var(--pkc-dark);
}

.wwgt-pkc-grade-btn__label {
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
    line-height: 1.2;
}

.wwgt-pkc-grade-btn__desc {
    font-size: 10px;
    color: #a0aec0;
    line-height: 1.3;
}

/* ── Calc Button ────────────────────────────────────────────── */
.wwgt-pkc-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--pkc-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .15s;
    align-self: center;
}

.wwgt-pkc-calc-btn:hover {
    background: #0090c8;
    transform: translateY(-1px);
}

/* ── Result Section ─────────────────────────────────────────── */
.wwgt-pkc-result {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wwgt-pkc-result-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Headline Block ─────────────────────────────────────────── */
.wwgt-pkc-headline-block {
    background: linear-gradient(135deg, #12405e 0%, #1a5276 100%);
    border-radius: var(--pkc-radius);
    padding: clamp(28px, 4vw, 48px);
    text-align: center;
    color: #ffffff;
}

.wwgt-pkc-headline-block__label {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wwgt-pkc-headline-block__amount {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
}

.wwgt-pkc-headline-block__sub {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,.7);
}

/* ── KPI Grid ───────────────────────────────────────────────── */
.wwgt-pkc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.wwgt-pkc-kpi {
    background: #ffffff;
    border-radius: var(--pkc-radius);
    box-shadow: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wwgt-pkc-kpi--danger {
    border-left: 4px solid var(--pkc-danger);
}

.wwgt-pkc-kpi__label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wwgt-pkc-kpi__value {
    font-size: 24px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.1;
}

.wwgt-pkc-kpi--danger .wwgt-pkc-kpi__value {
    color: var(--pkc-danger);
}

.wwgt-pkc-kpi__sub {
    font-size: 12px;
    color: #a0aec0;
}

/* ── Chart Block ────────────────────────────────────────────── */
.wwgt-pkc-chart-block {
    background: #ffffff;
    border-radius: var(--pkc-radius);
    box-shadow: none;
    padding: 28px;
}

.wwgt-pkc-chart-block__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

.wwgt-pkc-chart-block__note {
    margin: 0 0 20px;
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.wwgt-pkc-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 180px;
    padding: 0 0 8px;
    border-bottom: 2px solid #e2e8f0;
}

.wwgt-pkc-chart__bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

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

.wwgt-pkc-chart__bar-seg {
    width: 100%;
    transition: height .4s ease;
}

.wwgt-pkc-chart__bar-seg--eigenanteil { background: var(--pkc-eigenanteil); }
.wwgt-pkc-chart__bar-seg--kg          { background: var(--pkc-kg); }
.wwgt-pkc-chart__bar-seg--zuschlag    { background: var(--pkc-zuschlag); }

.wwgt-pkc-chart__bar-label {
    font-size: 11px;
    color: #718096;
    text-align: center;
    white-space: nowrap;
}

.wwgt-pkc-chart__bar-amount {
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
    text-align: center;
}

.wwgt-pkc-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.wwgt-pkc-chart-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4a5568;
}

.wwgt-pkc-chart-legend__item::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.wwgt-pkc-chart-legend__item--eigenanteil::before { background: var(--pkc-eigenanteil); }
.wwgt-pkc-chart-legend__item--kg::before          { background: var(--pkc-kg); }
.wwgt-pkc-chart-legend__item--zuschlag::before    { background: var(--pkc-zuschlag); }

/* ── Breakdown Table ────────────────────────────────────────── */
.wwgt-pkc-breakdown {
    background: #ffffff;
    border-radius: var(--pkc-radius);
    box-shadow: none;
    overflow: hidden;
}

.wwgt-pkc-breakdown table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wwgt-pkc-breakdown th {
    background: #f7fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}

.wwgt-pkc-breakdown td {
    padding: 12px 16px;
    border-bottom: 1px solid #f7fafc;
    color: #1a202c;
}

.wwgt-pkc-breakdown tr:last-child td {
    border-bottom: none;
}

.wwgt-pkc-breakdown .td-zuschlag {
    color: var(--pkc-success);
    font-weight: 600;
}

.wwgt-pkc-breakdown .td-eigenanteil {
    color: var(--pkc-danger);
    font-weight: 700;
}

/* ── Alert Box ──────────────────────────────────────────────── */
.wwgt-pkc-alert {
    border-radius: var(--pkc-radius);
    padding: 20px 24px;
    font-size: 15px;
    line-height: 1.6;
}

.wwgt-pkc-alert--danger {
    background: #fff5f5;
    border-left: 4px solid var(--pkc-danger);
    color: #742a2a;
}

.wwgt-pkc-alert--warning {
    background: #fffbeb;
    border-left: 4px solid var(--pkc-warning);
    color: #78350f;
}

.wwgt-pkc-alert strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

/* ── CTA Block ──────────────────────────────────────────────── */
.wwgt-pkc-cta-block {
    background: linear-gradient(135deg, #12405e 0%, #1a5276 100%);
    border-radius: var(--pkc-radius);
    overflow: hidden;
}

.wwgt-pkc-cta-block__inner {
    padding: clamp(28px, 4vw, 48px);
    text-align: center;
}

.wwgt-pkc-cta-block__icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.wwgt-pkc-cta-block__title {
    margin: 0 0 12px;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: #ffffff;
}

.wwgt-pkc-cta-block__text {
    margin: 0 0 24px;
    font-size: 15px;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.wwgt-pkc-cta-block__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.wwgt-pkc-cta-block__note {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,.65);
    line-height: 1.5;
}

/* ── Buttons ────────────────────────────────────────────────── */
.wwgt-pkc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    border: none;
}

.wwgt-pkc-btn--primary {
    background: var(--pkc-primary);
    color: #ffffff;
}

.wwgt-pkc-btn--primary:hover {
    background: #0090c8;
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

.wwgt-pkc-btn--secondary {
    background: rgba(255,255,255,.15);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.3);
}

.wwgt-pkc-btn--secondary:hover {
    background: rgba(255,255,255,.25);
    color: #ffffff;
    text-decoration: none;
}

/* ── Reset ──────────────────────────────────────────────────── */
.wwgt-pkc-reset-wrap {
    text-align: center;
}

.wwgt-pkc-reset-btn {
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    color: #718096;
    cursor: pointer;
    transition: all .2s;
}

.wwgt-pkc-reset-btn:hover {
    border-color: var(--pkc-primary);
    color: var(--pkc-primary);
}

/* ── Source Note ────────────────────────────────────────────── */
.wwgt-pkc-source-note {
    margin-top: 16px;
    font-size: 11px;
    color: #a0aec0;
    line-height: 1.5;
    text-align: center;
    padding: 0 16px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .wwgt-pkc-grade-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .wwgt-pkc-grade-btn__desc {
        display: none;
    }

    .wwgt-pkc-kpi-grid {
        grid-template-columns: 1fr;
    }

    .wwgt-pkc-chart {
        height: 140px;
        gap: 6px;
    }

    .wwgt-pkc-chart__bar-amount {
        display: none;
    }

    .wwgt-pkc-breakdown th:nth-child(3),
    .wwgt-pkc-breakdown td:nth-child(3) {
        display: none;
    }
}

@media (max-width: 400px) {
    .wwgt-pkc-grade-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
