/*
 * NhPanel – "Automatisch bezahlen" (Startseite, Rechnungsliste, Bezahl-Dialog, Zahlungsarten-Seite).
 * Wird auf allen Kontoseiten geladen – daher alles unter .nh-shell-page (ohne Shell keine Wirkung).
 * Baut auf .nh-todo (panel.css) auf; nur vorhandene Tokens (--nh-*). Schalter: nhpanel.autopay_hint.
 */

/* ---------- Startseite: Karte ---------- */

.nh-shell-page .nh-autopay {
    align-items: flex-start;   /* mehrere Absätze: Symbol oben statt mittig */
    flex-wrap: nowrap;         /* auch mobil: Text bleibt rechts vom Symbol (panel.css bricht .nh-todo unter 576 px um) */
    margin-top: 12px;
}

/* Die Karte ist ein <section>: panel.css nimmt Abschnitten in der Shell den senkrechten Innenabstand
   (.nh-shell-page .nh-shell section) – hier den Abstand der .nh-todo-Karte wiederherstellen. */
.nh-shell-page .nh-shell section.nh-autopay { padding-top: 16px; padding-bottom: 16px; }

.nh-shell-page .nh-autopay .nh-todo-body { flex: 1 1 0; }

.nh-shell-page .nh-autopay-title { font-family: inherit; font-size: 1rem; letter-spacing: normal; }

.nh-shell-page .nh-autopay .nh-todo-text + .nh-todo-text { margin-top: 6px; }

.nh-shell-page .nh-autopay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* panel.css setzt mobil .nh-todo .btn auf volle Breite mit 50 px Einzug – hier stehen die Knöpfe schon im Textblock */
.nh-shell-page .nh-autopay .nh-autopay-actions .btn {
    margin-left: 0;
    width: auto;
    white-space: normal;
}

@media (max-width: 575.98px) {
    .nh-shell-page .nh-autopay .nh-autopay-actions .btn { flex: 1 1 100%; }
}

/* ---------- Startseite: Bestätigung bei aktivem Mandat ---------- */

.nh-shell-page .nh-autopay-ok {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--nh-surface);
    border: 1px solid var(--nh-line);
    border-radius: 12px;
    box-shadow: var(--nh-shadow);   /* wie .nh-todo (panel-visual.css) */
}

.nh-shell-page .nh-autopay-ok > i { flex: 0 0 auto; color: var(--nh-success-ink); }

.nh-shell-page .nh-autopay-ok-text {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    color: var(--nh-ink);
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.nh-shell-page .nh-autopay-ok-note { display: block; color: var(--nh-muted); font-size: .88rem; }

.nh-shell-page .nh-autopay-ok-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
}

/* ---------- Rechnungsliste / Bezahl-Dialog: eine Zeile ---------- */

.nh-shell-page .nh-autopay-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--nh-muted);
    font-size: .9rem;
}

.nh-shell-page .nh-autopay-line > i { flex: 0 0 auto; margin-top: .2em; color: var(--nh-primary-ink); }
.nh-shell-page .nh-autopay-line a { font-weight: 600; white-space: nowrap; }
.nh-shell-page .modal .nh-autopay-line { margin: 12px 0 0; }

@media (max-width: 991.98px) {
    .nh-shell-page .nh-autopay-line a { display: inline-flex; align-items: center; min-height: 44px; white-space: normal; }
}

/* ---------- Zahlungsarten-Seite: Erklärung ---------- */

.nh-shell-page .nh-autopay-explain .nh-autopay-points {
    margin: 6px 0 0;
    padding-left: 1.1rem;
}

.nh-shell-page .nh-autopay-explain .nh-autopay-points li + li { margin-top: 4px; }
.nh-shell-page .nh-autopay-explain .nh-autopay-points a { font-weight: 600; }
