/*
 * Stromkosten-Rechner Erweiterung 2026-08-28
 * Ergänzt Portionskosten, typische Garzeiten und den A/B-Gerätevergleich.
 */

.afg-energy-page select {
    font: inherit;
}

.afg-energy-page [hidden] {
    display: none !important;
}

.afg-energy-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: 1rem;
    padding: .4rem;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 12px;
    background: rgba(7, 17, 29, .82);
}

.afg-energy-mode-button {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .65rem .9rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #cbd7e7;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.afg-energy-mode-button:hover,
.afg-energy-mode-button:focus-visible {
    border-color: rgba(var(--energy-accent-rgb), .34);
    color: #fff;
    outline: 0;
}

.afg-energy-mode-button[aria-pressed="true"] {
    border-color: rgba(var(--energy-accent-rgb), .55);
    color: #111827;
    background: linear-gradient(180deg, #ffe68f, var(--energy-accent));
}

.afg-energy-select {
    width: 100%;
    min-height: 52px;
    padding: .7rem 2.35rem .7rem .8rem;
    border: 1px solid rgba(var(--energy-accent-rgb), .23);
    border-radius: 10px;
    color: #fff;
    background-color: rgba(7, 18, 30, .96);
    background-image:
        linear-gradient(45deg, transparent 50%, #a9bdd5 50%),
        linear-gradient(135deg, #a9bdd5 50%, transparent 50%);
    background-position:
        calc(100% - 17px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    appearance: none;
    outline: 0;
}

.afg-energy-select:focus {
    border-color: var(--energy-accent);
    box-shadow: 0 0 0 3px rgba(var(--energy-accent-rgb), .10);
}

.afg-energy-select:disabled {
    color: #718399;
    cursor: not-allowed;
    opacity: .72;
}

.afg-energy-select option {
    color: #f4f7fb;
    background: #0a1727;
}

.afg-energy-number-button:disabled {
    color: #66778d;
    background: rgba(255, 255, 255, .015);
    cursor: not-allowed;
    filter: none;
    transform: none;
}

.afg-energy-number input[readonly] {
    color: #f8e9a8;
    cursor: default;
}

.afg-energy-checkline {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
    margin: 0 0 .9rem;
    padding: .8rem .85rem;
    border: 1px solid rgba(var(--energy-accent-rgb), .18);
    border-radius: 10px;
    background: rgba(9, 21, 36, .58);
    cursor: pointer;
}

.afg-energy-checkline input {
    width: 18px;
    height: 18px;
    margin: .15rem 0 0;
    accent-color: var(--energy-accent);
}

.afg-energy-checkline strong,
.afg-energy-checkline small {
    display: block;
}

.afg-energy-checkline strong {
    color: #fff;
    font-size: .92rem;
}

.afg-energy-checkline small {
    margin-top: .15rem;
    color: var(--energy-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.afg-energy-compare-devices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.afg-energy-compare-device {
    min-width: 0;
    padding: .85rem;
    border: 1px solid rgba(var(--energy-accent-rgb), .18);
    border-radius: 11px;
    background: rgba(9, 21, 36, .70);
}

.afg-energy-compare-device .afg-energy-field + .afg-energy-field {
    margin-top: .7rem;
}

.afg-energy-compare-device-head {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.afg-energy-compare-device-head h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.afg-energy-my-device-button {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    min-height: 34px;
    padding: .35rem .6rem;
    border: 1px solid rgba(var(--energy-accent-rgb), .40);
    border-radius: 8px;
    color: #f7edc1;
    background: rgba(var(--energy-accent-rgb), .08);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
}

.afg-energy-my-device-button:hover,
.afg-energy-my-device-button:focus-visible {
    border-color: var(--energy-accent);
    color: #111827;
    background: var(--energy-accent);
    outline: 0;
}

.afg-energy-device-details {
    min-height: 44px;
    margin-top: .75rem;
    padding: .65rem .7rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 8px;
    color: #cbd7e7;
    background: rgba(255, 255, 255, .025);
    font-size: .82rem;
    line-height: 1.5;
}

.afg-energy-individual-time {
    margin-top: .75rem !important;
}

.afg-energy-single-result .afg-energy-result-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.afg-energy-compare-context {
    margin: 0 0 .8rem;
    padding: .65rem .75rem;
    border-left: 3px solid var(--energy-accent);
    border-radius: 0 8px 8px 0;
    color: #d9e2ee;
    background: rgba(var(--energy-accent-rgb), .07);
    font-size: .86rem;
    line-height: 1.5;
}

.afg-energy-compare-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.afg-energy-compare-result-card {
    min-width: 0;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 11px;
    background: rgba(7, 18, 30, .72);
}

.afg-energy-compare-kicker,
.afg-energy-compare-name,
.afg-energy-compare-meta {
    display: block;
}

.afg-energy-compare-kicker {
    margin-bottom: .25rem;
    color: var(--energy-accent);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.afg-energy-compare-name {
    color: #fff;
    font-size: 1rem;
    line-height: 1.35;
}

.afg-energy-compare-meta {
    min-height: 2.7em;
    margin-top: .28rem;
    color: var(--energy-muted);
    font-size: .8rem;
    line-height: 1.4;
}

.afg-energy-compare-values {
    margin: .8rem 0 0;
}

.afg-energy-compare-values > div {
    display: flex;
    gap: .7rem;
    align-items: baseline;
    justify-content: space-between;
    padding: .42rem 0;
    border-top: 1px solid rgba(148, 163, 184, .11);
}

.afg-energy-compare-values dt,
.afg-energy-compare-values dd {
    margin: 0;
}

.afg-energy-compare-values dt {
    color: var(--energy-muted);
    font-size: .8rem;
    font-weight: 500;
}

.afg-energy-compare-values dd {
    color: #fff;
    font-size: .86rem;
    font-weight: 800;
    text-align: right;
}

.afg-energy-difference {
    margin-top: .85rem;
    padding: .8rem .9rem;
    border: 1px solid rgba(var(--energy-accent-rgb), .30);
    border-radius: 10px;
    color: #fff;
    background: rgba(var(--energy-accent-rgb), .08);
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.5;
}

.afg-energy-compare-disclaimer {
    margin: .65rem 0 0;
    color: var(--energy-muted);
    font-size: .8rem;
    line-height: 1.5;
}

@media (max-width: 1120px) {
    .afg-energy-single-result .afg-energy-result-hero {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .afg-energy-mode-switch,
    .afg-energy-compare-devices,
    .afg-energy-compare-result-grid,
    .afg-energy-single-result .afg-energy-result-hero {
        grid-template-columns: 1fr;
    }

    .afg-energy-compare-meta {
        min-height: 0;
    }
}

/* Update 2026-08-28 20:33: Ergebnis- und Vergleichsausrichtung */
.afg-energy-compare-result-card {
    display: flex;
    flex-direction: column;
}

.afg-energy-compare-values {
    width: 100%;
    margin-top: auto;
    padding-top: .8rem;
}

.afg-energy-single-result .afg-energy-result-main {
    display: flex;
    min-height: 200px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.afg-energy-single-result .afg-energy-result-main strong {
    order: 1;
    margin: .15rem 0 .45rem;
}

.afg-energy-single-result .afg-energy-result-main > span {
    order: 2;
    margin: 0;
}

.afg-energy-single-result .afg-energy-result-main small {
    order: 3;
    margin-top: auto;
    min-height: 1.4em;
}

.afg-energy-result-copy {
    min-width: 0;
}

.afg-energy-result-copy strong,
.afg-energy-result-copy span {
    display: block;
}

.afg-energy-result-copy strong {
    color: #fff;
    font-size: .92rem;
    line-height: 1.35;
}

.afg-energy-result-copy span {
    margin-top: .16rem;
    color: var(--energy-muted);
    font-size: .76rem;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .afg-energy-single-result .afg-energy-result-main {
        min-height: 0;
    }

    .afg-energy-single-result .afg-energy-result-main small {
        margin-top: .55rem;
    }
}
