/**
 * E3DC POWER Rechenbeispiele
 */
.e3pw-bsp {
    padding: var(--pw-sec) 0;
    overflow: hidden;
    background:
        radial-gradient(50% 35% at 50% 35%, rgba(92, 194, 68, 0.1), transparent 70%),
        radial-gradient(40% 40% at 85% 85%, rgba(252, 178, 37, 0.08), transparent 70%);
}

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.e3pw-bsp__tabs {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto clamp(28px, 4vw, 44px);
    padding: 6px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pw-line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.e3pw-bsp__tab-glider {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(92, 194, 68, 0.32), rgba(92, 194, 68, 0.14));
    box-shadow: inset 0 0 0 1px rgba(143, 226, 94, 0.55), 0 10px 30px -10px rgba(92, 194, 68, 0.6);
    transition: transform 0.55s var(--pw-ease), width 0.55s var(--pw-ease);
    pointer-events: none;
}

.e3pw .e3pw-bsp__tab {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    padding: 12px 20px 12px 14px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s;
}

.e3pw .e3pw-bsp__tab:hover,
.e3pw .e3pw-bsp__tab.is-active {
    color: #fff;
}

.e3pw .e3pw-bsp__tab:focus-visible {
    outline: 2px solid var(--pw-yellow);
    outline-offset: 2px;
}

.e3pw-bsp__tab-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    transition: color 0.3s, background 0.3s;
}

.e3pw-bsp__tab.is-active .e3pw-bsp__tab-icon {
    color: var(--pw-green);
    background: rgba(13, 26, 8, 0.6);
}

.e3pw-bsp__tab-icon svg {
    width: 24px;
    height: 24px;
}

.e3pw-bsp__tab-text strong {
    display: block;
    font-family: var(--pw-f-display);
    font-weight: 400;
    font-size: 22px;
    line-height: 1;
    text-transform: uppercase;
}

.e3pw-bsp__tab-text small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.2;
}

/* ── Panel ────────────────────────────────────────────────────────────── */
.e3pw-bsp__panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.65fr);
    gap: 18px;
    align-items: stretch;
}

.e3pw-bsp__plant {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px;
    border-radius: var(--pw-radius);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--pw-line);
}

.e3pw-bsp__plant-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.e3pw-bsp__plant-icon {
    display: grid;
    place-items: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: var(--pw-green);
    background: rgba(92, 194, 68, 0.12);
    box-shadow: inset 0 0 0 1px rgba(92, 194, 68, 0.4), 0 0 30px rgba(92, 194, 68, 0.2);
}

.e3pw-bsp__plant-icon svg {
    width: 30px;
    height: 30px;
}

.e3pw-bsp__plant-head small {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.65);
}

.e3pw-bsp__plant-head strong {
    display: block;
    font-family: var(--pw-f-display);
    font-weight: 400;
    font-size: 40px;
    line-height: 1;
    color: var(--pw-green);
    text-shadow: 0 0 30px rgba(92, 194, 68, 0.35);
}

.e3pw-bsp__plant-head strong em {
    font-style: inherit;
    font-size: 0.5em;
    color: #fff;
}

.e3pw .e3pw-bsp__stats {
    display: grid;
    gap: 2px;
    margin: 0;
}

.e3pw-bsp__stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.e3pw .e3pw-bsp__stat dt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
}

.e3pw .e3pw-bsp__stat dd {
    margin: 0;
    font-family: var(--pw-f-bold);
    font-size: 17px;
    color: #fff;
    white-space: nowrap;
}

.e3pw-bsp__stat--hl dd {
    color: var(--pw-yellow);
}

.e3pw-bsp__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 9px;
}

.e3pw-bsp__dot--sun {
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.e3pw-bsp__dot--own {
    background: var(--pw-green);
    box-shadow: 0 0 10px var(--pw-green);
}

.e3pw-bsp__dot--surplus {
    background: var(--pw-yellow);
    box-shadow: 0 0 10px var(--pw-yellow);
}

.e3pw-bsp__split {
    position: relative;
    display: flex;
    height: 12px;
    margin-top: auto;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.e3pw-bsp__split-own {
    height: 100%;
    background: linear-gradient(90deg, #3f9a2c, var(--pw-green));
    transition: width 0.9s var(--pw-ease);
}

.e3pw-bsp__split-surplus {
    flex: 1;
    height: 100%;
    margin-left: 3px;
    border-radius: 0 99px 99px 0;
    background: var(--pw-grad);
    box-shadow: 0 0 18px rgba(252, 178, 37, 0.5);
}

.e3pw-bsp__split-legend {
    display: flex;
    justify-content: space-between;
    margin-top: -12px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Ergebnis-Karten ──────────────────────────────────────────────────── */
.e3pw-bsp__results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.e3pw-bsp__card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 30px;
    border-radius: var(--pw-radius);
    overflow: hidden;
    isolation: isolate;
}

.e3pw-bsp__card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.e3pw-bsp__card:hover::before {
    opacity: 1;
}

.e3pw-bsp__card--fix {
    background: linear-gradient(160deg, #25561a 0%, #173a0f 45%, #0f2409 100%);
    border: 1px solid rgba(92, 194, 68, 0.4);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.e3pw-bsp__card--share {
    --pw-logo-a: #ffe96b;
    --pw-logo-b: #142108;
    color: #142108;
    background: linear-gradient(150deg, #ffe96b 0%, #fcb225 55%, #f99e34 100%);
    box-shadow: 0 30px 70px -30px rgba(249, 158, 52, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.e3pw-bsp__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.e3pw-bsp__logo {
    width: 150px;
    max-width: 60%;
}

.e3pw-bsp__rate {
    padding: 6px 12px;
    border-radius: 99px;
    font-family: var(--pw-f-bold);
    font-size: 14px;
    white-space: nowrap;
}

.e3pw-bsp__card--fix .e3pw-bsp__rate {
    color: var(--pw-green);
    background: rgba(92, 194, 68, 0.14);
    box-shadow: inset 0 0 0 1px rgba(92, 194, 68, 0.45);
}

.e3pw-bsp__card--share .e3pw-bsp__rate {
    color: #142108;
    background: rgba(255, 255, 255, 0.45);
}

.e3pw .e3pw-bsp__note {
    font-size: 14px;
    line-height: 1.35;
    opacity: 0.75;
}

.e3pw .e3pw-bsp__formula {
    margin-top: auto;
    padding-top: 24px;
    font-family: var(--pw-f-bold);
    font-size: 16px;
    opacity: 0.85;
}

.e3pw .e3pw-bsp__value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 10px;
    margin-top: 4px;
    font-family: var(--pw-f-display);
    font-size: clamp(56px, 6.2vw, 96px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.e3pw-bsp__value em {
    font-style: inherit;
    font-size: 0.62em;
}

.e3pw-bsp__value small {
    flex-basis: 100%;
    margin-top: 6px;
    font-family: var(--pw-f-bold);
    font-size: 16px;
    letter-spacing: 0.02em;
    opacity: 0.75;
}

.e3pw-bsp__card--fix .e3pw-bsp__value {
    color: #fff;
}

.e3pw .e3pw-bsp__delta {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding: 8px 14px;
    border-radius: 99px;
    background: #142108;
    color: #fff;
    font-size: 14px;
}

.e3pw-bsp__delta strong {
    font-family: var(--pw-f-bold);
    color: var(--pw-yellow);
}

.e3pw .e3pw-bsp__foot {
    margin-top: 28px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.e3pw-bsp.is-switching .e3pw-bsp__formula,
.e3pw-bsp.is-switching .e3pw-bsp__plant-head {
    animation: e3pwBlink 0.5s var(--pw-ease);
}

@keyframes e3pwBlink {
    0% { opacity: 1; transform: none; }
    40% { opacity: 0.2; transform: translateY(4px); }
    100% { opacity: 1; transform: none; }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .e3pw-bsp__panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .e3pw-bsp__tabs {
        width: 100%;
    }
    .e3pw .e3pw-bsp__tab {
        min-width: 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 8px;
        gap: 8px;
    }
    .e3pw-bsp__tab-text small {
        font-size: 11px;
    }
}

@media (max-width: 690px) {
    .e3pw-bsp__results {
        grid-template-columns: 1fr;
    }
    .e3pw-bsp__plant,
    .e3pw-bsp__card {
        padding: 22px;
    }
    .e3pw-bsp__tab-text small {
        display: none;
    }
    .e3pw-bsp__tab-text strong {
        font-size: 20px;
    }
}

/* Ganze FIX-Kachel verlinkt */
.e3pw .e3pw-bsp__cardlink {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
}

.e3pw-bsp__card--fix.is-link {
    cursor: pointer;
    transition: transform 0.4s var(--pw-ease), border-color 0.3s, box-shadow 0.4s var(--pw-ease);
}

.e3pw-js .e3pw .e3pw-bsp__card--fix.is-link[data-pw-reveal].is-revealed {
    transition: transform 0.35s var(--pw-ease), border-color 0.3s, box-shadow 0.35s var(--pw-ease);
}

.e3pw-bsp__card--fix.is-link:hover,
.e3pw-js .e3pw .e3pw-bsp__card--fix.is-link[data-pw-reveal].is-in:hover {
    transform: translateY(-4px);
    border-color: rgba(92, 194, 68, 0.75);
}

.e3pw .e3pw-bsp__cardlink:focus-visible {
    outline: 2px solid var(--pw-yellow);
    outline-offset: 3px;
}

/* FIX-Link und SHARE-Hinweis */
.e3pw .e3pw-bsp__cta {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 16px 10px 18px;
    border-radius: 999px;
    font-family: var(--pw-f-bold);
    font-size: 14px;
    line-height: 1;
    color: #fff;
    background: var(--pw-green);
    text-decoration: none;
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
    transition: background 0.3s, transform 0.3s var(--pw-ease);
}

.e3pw .e3pw-bsp__cta:hover {
    background: #52b53b;
    transform: translateY(-2px);
}

.e3pw-bsp__cta svg {
    width: 16px;
    height: 16px;
}

.e3pw .e3pw-bsp__soon {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 7px;
    margin: -6px 0 8px;
    padding: 4px 8px 3px;
    border-radius: 6px;
    font-family: var(--pw-f-bold);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffe96b;
    background: #142108;
}

.e3pw-bsp__soon i {
    display: none;
}

/* ── Kompakt: Überschrift, Tabs und Karten passen auf Laptops in einen Screen ── */
@media (min-width: 1000px) {
    .e3pw-bsp {
        padding: calc(var(--pw-sec) * 0.8) 0;
    }
    .e3pw .e3pw-bsp .e3pw-head {
        gap: 8px;
        margin-bottom: clamp(18px, 2.2vw, 30px);
    }
    .e3pw .e3pw-bsp .e3pw-h2 {
        font-size: clamp(30px, 3.1vw, 50px);
        text-wrap: nowrap;
    }
    .e3pw-bsp__tabs {
        margin-bottom: clamp(18px, 2.2vw, 28px);
    }
    .e3pw .e3pw-bsp__tab {
        padding: 9px 18px 9px 10px;
    }
    .e3pw-bsp__tab-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }
    .e3pw-bsp__tab-text strong {
        font-size: 20px;
    }
    .e3pw-bsp__plant {
        gap: 16px;
        padding: 22px 24px;
    }
    .e3pw-bsp__stat {
        padding: 9px 0;
    }
    .e3pw-bsp__card {
        padding: 20px 24px 20px;
    }
    .e3pw-bsp__card-top {
        margin-bottom: 12px;
    }
    .e3pw .e3pw-bsp__formula {
        padding-top: 14px;
    }
    .e3pw .e3pw-bsp__value {
        font-size: clamp(50px, 4.6vw, 78px);
    }
    .e3pw .e3pw-bsp__delta {
        margin-top: 14px;
    }
    .e3pw .e3pw-bsp__foot {
        margin-top: 18px;
    }
}

/* Gleiche Fußzeile in beiden Kacheln: Preise stehen nebeneinander auf einer Höhe,
   egal ob unten Pille, Button oder nichts steht */
.e3pw-bsp__slot {
    display: flex;
    align-items: flex-end;
    min-height: 38px;
    margin-top: 12px;
}

.e3pw .e3pw-bsp__slot .e3pw-bsp__delta,
.e3pw .e3pw-bsp__slot .e3pw-bsp__cta {
    margin-top: 0;
}

@media (max-width: 690px) {
    .e3pw-bsp__slot {
        min-height: 0;
    }
    .e3pw-bsp__slot:empty {
        display: none;
    }
}
