/* ==========================================================================
   Solutions: Produktseiten (/solutions) + Konto-Bereich (/konto)
   Ergänzt style.css — nutzt deren Design-Tokens, wird nur auf diesen
   Seiten per $extra_css im header.php geladen.
   ========================================================================== */

/* ── Produkt-Badge (Hero) ─────────────────────────────────── */

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.35em 0.9em;
    border-radius: var(--radius-full);
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-100);
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* ── Hero-Screenshot (Produktbild) ────────────────────────── */

.hero-screenshot {
    display: block;
    width: 100%;
    max-width: 860px;
    height: auto;
    margin: var(--space-xl) auto 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-xl);
}

/* ── Screenshot-Figur (Inhaltsbereich) ────────────────────── */

.screenshot-figure {
    max-width: 1000px;
    margin: 0 auto var(--space-2xl);
}

.screenshot-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-xl);
}

/* Dialog-Aufnahme (kleines Fenster): nie über die native Breite skalieren.
   Radius größer als die Windows-Fensterrundung (8px), damit die unsauberen
   Snipping-Ecken sicher weggeschnitten werden. */
.screenshot-figure--dialog {
    max-width: 522px;
    margin-top: var(--space-2xl);
}

.screenshot-figure figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* ── Free/Pro-Vergleichstabelle ───────────────────────────── */

.compare-wrap {
    max-width: 860px;
    margin: 0 auto;
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
    padding: 0.85em 1em;
    text-align: center;
    border-bottom: 1px solid var(--color-gray-200);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table th[scope="row"],
.compare-table td:first-child {
    text-align: left;
    font-weight: 400;
    color: var(--color-text);
}

.compare-table thead th {
    background: var(--color-bg-alt);
    font-weight: 700;
    color: var(--color-heading);
}

.compare-table thead th.compare-pro {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
}

.compare-table td.compare-pro {
    background: color-mix(in srgb, var(--color-primary-50) 45%, transparent);
}

.compare-yes,
.compare-no {
    display: inline-block;
    font-weight: 700;
}

.compare-yes { color: var(--color-accent); }
.compare-no  { color: var(--color-gray-400); }

.compare-note {
    max-width: 860px;
    margin: var(--space-md) auto 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ── Download-Bereich ─────────────────────────────────────── */

.dl-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    text-align: center;
}

.dl-card h3 {
    margin: 0 0 var(--space-sm);
    color: var(--color-heading);
}

.dl-card p {
    color: var(--color-text-light);
    margin: 0 0 var(--space-md);
}

.dl-requirements {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg);
}

.dl-requirements li {
    padding: 0.3em 0.8em;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-gray-200);
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.dl-status {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    min-height: 1.4em;
}

.dl-status.is-error { color: #b91c1c; }

.dl-fallback {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: var(--space-sm) 0 0;
}

.dl-fallback a {
    color: var(--color-primary);
    cursor: pointer;
}

.dl-fallback a:hover { text-decoration: underline; }

.dl-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: var(--space-md) 0 0;
    text-align: left;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 0.75em 1em;
}

/* ── Konto-Seite ──────────────────────────────────────────── */

.konto-main {
    max-width: none;
    padding: 0;
}

/* Angemeldeter Bereich: dezente graue Fläche über die volle Breite, damit
   die weißen Karten die Seite sichtbar strukturieren. Die Anmeldung (Option C,
   ohne Karten-Chrome) bleibt bewusst auf Weiß. Browser ohne :has() behalten
   überall Weiß — rein kosmetischer Fallback. */
.konto-main:has(.konto-account:not([hidden])) {
    background: var(--color-bg-alt);
}

/* Der angemeldete Bereich bleibt schmal und zentriert */
.konto-account {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md) var(--space-4xl);
}

/* hidden-Attribut auch gegen display:flex/grid durchsetzen — sonst sind
   alle drei Auth-Formulare gleichzeitig sichtbar */
.konto-main [hidden],
.konto-main[hidden] {
    display: none !important;
}

.konto-main h1 {
    color: var(--color-heading);
    margin-bottom: var(--space-xs);
}

.konto-intro {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.konto-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.konto-card h2 {
    font-size: 1.15rem;
    color: var(--color-heading);
    margin: 0 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-gray-100);
}

.konto-card p {
    color: var(--color-text-light);
}

/* ── Anmeldung: Editorial-Layout (Designentscheidung "Option C") ──
   Ohne Karten-Chrome: große Typografie links, schlankes Formular rechts
   an einer feinen Trennlinie. */

.auth-editorial {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1080px;
    margin: var(--space-xl) auto 0;
    padding: var(--space-2xl) var(--space-md) var(--space-4xl);
}

.auth-intro {
    padding: 64px 56px 64px 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.auth-overline {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary);
}

.auth-heading {
    margin: 0;
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.2;
}

.auth-sub {
    margin: 0;
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
    max-width: 380px;
}

.auth-products {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: var(--space-sm);
}

.auth-product {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.auth-product-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--color-primary-50);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-panel {
    border-left: 1px solid var(--color-gray-200);
    padding: 64px 0 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel .konto-form input {
    height: 48px;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-top: 4px;
}

.auth-actions a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
}

.auth-actions a:hover { text-decoration: underline; }

.auth-alt {
    border-top: 1px solid var(--color-gray-200);
    padding-top: var(--space-lg);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.auth-alt a {
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
}

.auth-alt a:hover { text-decoration: underline; }

/* Einwilligungs-Checkbox der Registrierung (Konzept 3.2a) */
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
    cursor: pointer;
}

.auth-consent input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

.auth-consent a {
    color: var(--color-primary);
}

@media (max-width: 860px) {
    .auth-editorial {
        grid-template-columns: 1fr;
        margin-top: var(--space-md);
    }
    .auth-intro {
        padding: var(--space-lg) 0;
    }
    .auth-heading br { display: none; }
    .auth-panel {
        border-left: none;
        border-top: 1px solid var(--color-gray-200);
        padding: var(--space-xl) 0 0;
    }
}

/* Formulare (Login, Registrierung, Passwort) */

.konto-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.konto-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.3em;
}

.konto-form input[type="email"],
.konto-form input[type="password"],
.konto-form input[type="text"] {
    width: 100%;
    padding: 0.65em 0.9em;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.konto-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

.konto-form .btn { align-self: flex-start; }

.konto-form-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    font-size: 0.9rem;
}

.konto-form-links a {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.konto-form-links a:hover { text-decoration: underline; }

.konto-msg {
    border-radius: var(--radius-md);
    padding: 0.7em 1em;
    font-size: 0.9rem;
}

.konto-msg.is-ok    { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.konto-msg.is-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Kontodaten + Plan */

.konto-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5em 1.5em;
    margin: 0;
}

.konto-facts dt {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.konto-facts dd {
    margin: 0;
    color: var(--color-text);
    word-break: break-word;
}

.plan-badge {
    display: inline-block;
    padding: 0.25em 0.8em;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
}

.plan-badge.plan-free  { background: var(--color-gray-100); color: var(--color-gray-600); }
.plan-badge.plan-trial { background: #fef3c7; color: #b45309; }
.plan-badge.plan-pro   { background: var(--color-primary-50); color: var(--color-primary-dark); }

/* Beta-Infoboxen in den Produktkarten (Add-in + Viewer): getönte Fläche
   hebt Status und Aktionen vom restlichen Karteninhalt ab. */
.konto-beta-box {
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-100);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
    font-size: 0.9rem;
}

.konto-beta-box p {
    margin: 0;
    color: var(--color-text-light);
}

.konto-beta-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.konto-beta-actions a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
}

.konto-beta-actions a:hover { text-decoration: underline; }

/* Geräteliste */

.device-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 0.75em 1em;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
}

.device-item strong {
    display: block;
    color: var(--color-text);
    font-size: 0.95rem;
}

.device-item span {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.btn-small {
    padding: 0.4em 0.9em;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-300);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.btn-small:hover {
    border-color: #b91c1c;
    color: #b91c1c;
}

.btn-danger-link {
    background: none;
    border: none;
    padding: 0;
    color: #b91c1c;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

/* Details/Summary-Abschnitte (Passwort ändern, Konto löschen) */

.konto-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    padding: var(--space-sm) 0;
}

.konto-details[open] summary { margin-bottom: var(--space-md); }

@media (max-width: 560px) {
    .konto-card { padding: var(--space-lg); }
    .konto-facts { grid-template-columns: 1fr; gap: 0.15em; }
    .konto-facts dd { margin-bottom: 0.6em; }
    .device-item { flex-direction: column; align-items: flex-start; }
}

/* ── Pro Closed Beta (/solutions/parameter-manager/pro-beta) ── */

.beta-panel {
    max-width: 620px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
}

.beta-panel [hidden] { display: none !important; }

.beta-state p { color: var(--color-text-light); }

.beta-conditions {
    margin: var(--space-lg) 0 0;
    padding: 0;
    list-style: none;
}

.beta-conditions li {
    position: relative;
    padding-left: 1.4em;
    margin-bottom: var(--space-sm);
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.beta-conditions li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}
