/* static/css/affiliate.css: Seitenteile des Affiliate-Programms (Praefix af-), seit 23.10.2026 (UI-Audit Welle 3).
   Geladen nach app.css aus templates/affiliate/*.html (Startseite, Bewerbung, Dashboard, FAQ) und
   templates/admin/affiliate*.html (Affiliates, Detail, Provisionen, Auszahlungen). Alles Uebrige kommt aus
   den gemeinsamen Bausteinen (nv-*). Farben nur aus den nv-Variablen: Lila ist der einzige Akzent
   (Markenfarbe, unslop-ignore), Gruen, Gelb, Rot nur als Bedeutung am Statuspunkt und an Fehlern.
   Abstaende aus der Skala 4/8/12/16/20/24/32/48, keine Hover-Spruenge, keine Bewegung. */

/* ── Seitenbreiten ──────────────────────────────────────────────────────────────────────────────── */
.af-page--schmal { max-width: 784px; }          /* Panel 720 px plus 2 x 32 px Rand */
.af-page--app { max-width: 1400px; }            /* Nutzer-Dashboard wie Dashboard und Journal */

.af-page a.af-zurueck { color: inherit; text-decoration: none; }
.af-page a.af-zurueck:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.af-page a.af-zurueck:focus-visible { outline: 2px solid var(--nv-focus); outline-offset: 2px; border-radius: 4px; }

/* ── Text ───────────────────────────────────────────────────────────────────────────────────────── */
.af-text {
    margin-bottom: 0;   /* oben 0 aus Bootstrap; nv-mt-* setzt den Abstand */
    max-width: 72ch;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--nv-fg2);
}

.af-text--klein { font-size: 0.82rem; color: var(--nv-fg3); }
.af-text b { color: var(--nv-fg); font-weight: 600; }

.af-sub {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--nv-fg3);
}

/* Codes und Kennungen ohne Inter-Ligaturen (aus "7x2" wird sonst ein Malzeichen) */
.af-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    font-weight: 600;
    color: var(--nv-fg);
    letter-spacing: 0.02em;
}

.af-umbruch { overflow-wrap: anywhere; }
.af-zahl {
    margin-left: 4px;
    font-weight: 500;
    color: var(--nv-fg3);
    font-variant-numeric: tabular-nums;
}

.af-zeile-titel { color: #fff; font-weight: 600; }

.nv-card__note.af-card-link { font-size: 0.8rem; }

.af-grid-oben { align-items: start; }

/* ── Startseite ─────────────────────────────────────────────────────────────────────────────────── */
.af-schritte {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: af-schritt;
}

.af-schritte li {
    position: relative;
    padding: 0 0 16px 32px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--nv-fg2);
    counter-increment: af-schritt;
}

.af-schritte li:last-child { padding-bottom: 0; }

/* Ziffer im Tint, ohne Kreis */
.af-schritte li::before {
    content: counter(af-schritt);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--nv-tint);
    font-variant-numeric: tabular-nums;
}

.af-schritte b { color: var(--nv-fg); font-weight: 600; }

.af-teaser {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 24px;
}

.af-teaser__frage h3 {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.af-teaser__frage h3 a { color: var(--nv-fg); text-decoration: none; }
.af-teaser__frage h3 a:hover { color: var(--nv-tint); text-decoration: underline; text-underline-offset: 3px; }
.af-teaser__frage h3 a:focus-visible { outline: 2px solid var(--nv-focus); outline-offset: 2px; border-radius: 4px; }

.af-teaser__frage p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--nv-fg3);
}

/* Provisionstabelle */
.af-beispiele__paket { white-space: nowrap; }
.af-beispiele__paket b { color: #fff; font-weight: 600; }
.af-beispiele__wert { display: inline-flex; flex-direction: column; align-items: flex-end; }
.af-beispiele__wert b { color: var(--nv-fg); font-weight: 600; }

/* ── Bewerbung ──────────────────────────────────────────────────────────────────────────────────── */
.af-aktionen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* ── Link mit Kopieren ──────────────────────────────────────────────────────────────────────────── */
.af-link__zeile {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.af-link__feld {
    flex: 1 1 auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
}

.af-link__zeile .nv-btn { flex: 0 0 auto; }

/* ── Leitzahl mit Auszahlung ────────────────────────────────────────────────────────────────────── */
.af-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}

.af-hero__zahl { flex: 1 1 320px; min-width: 0; }
.af-hero__zahl .nv-hero__sub { max-width: 72ch; line-height: 1.5; }
.af-hero__weg { display: block; width: min(100%, 320px); margin-top: 12px; }
.af-hero__aktion { position: relative; flex: 0 0 auto; margin: 0; }

/* ── FAQ ────────────────────────────────────────────────────────────────────────────────────────── */
.af-faq {
    border: 1px solid var(--nv-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.af-faq__item + .af-faq__item { border-top: 1px solid var(--nv-line-soft); }

.af-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nv-fg);
    cursor: pointer;
    list-style: none;
    border-radius: 12px;
}

.af-faq__item summary::-webkit-details-marker { display: none; }
.af-faq__item summary:hover { background: rgba(255, 255, 255, 0.04); }
.af-faq__item summary:focus-visible { outline: 2px solid var(--nv-focus); outline-offset: -2px; }
.af-faq__item summary .bi { flex: 0 0 auto; font-size: 0.85rem; color: var(--nv-fg3); transition: transform var(--nv-ease); }
.af-faq__item[open] summary .bi { transform: rotate(180deg); }

.af-faq__antwort { padding: 0 16px 16px; }

.af-faq__antwort p {
    margin: 0 0 10px;
    max-width: 72ch;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--nv-fg2);
}

.af-faq__antwort > p:last-child { margin-bottom: 0; }
.af-faq__antwort .nv-tablewrap { margin: 4px 0 0; }

/* ── Admin ──────────────────────────────────────────────────────────────────────────────────────── */
.af-admin-views { margin-top: 24px; }

.af-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.af-filter .nv-search { flex: 1 1 280px; max-width: 420px; }

.af-person__name { color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
a.af-person__name:hover { color: var(--nv-tint); }
.af-person__mail { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--nv-fg3); overflow-wrap: anywhere; }

/* Kopieren neben einer Adresse */
.af-kopierbar { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.af-kopierbar > span { min-width: 0; overflow-wrap: anywhere; }

.af-notiz {
    display: block;
    margin-top: 4px;
    max-width: 46ch;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--nv-fg3);
    overflow-wrap: anywhere;
}

/* Einstellungen im Detail */
.af-einstellung { display: grid; gap: 12px; }
.af-einstellung .nv-group { margin: 0; }
.af-satz { display: flex; align-items: center; gap: 8px; }
.af-satz .nv-field { width: 112px; }
.af-satz__einheit { color: var(--nv-fg3); }
.af-notizfeld { min-height: 88px; resize: vertical; }

/* Dialog Auszahlung */
.af-dialog__fakten { margin-bottom: 16px; }
.af-dialog__teil + .af-dialog__teil {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--nv-line);
}

.af-dialog__titel {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nv-fg);
}

/* [hidden] verliert sonst gegen display-Regeln der Bausteine */
.af-page [hidden] { display: none; }

/* ── Bewegung ───────────────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .af-faq__item summary .bi { transition: none; }
}

/* ── Schmale Bildschirme ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .af-teaser { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
    .af-aktionen > .nv-btn { flex: 1 1 100%; }
    .af-hero__aktion { flex: 1 1 100%; }
    .af-hero__aktion .nv-btn { width: 100%; }
    .af-link__zeile { flex-wrap: wrap; }
    .af-link__feld { flex-basis: 100%; }
    .af-link__zeile .nv-btn { flex: 1 1 100%; }
    .af-filter .nv-search { flex-basis: 100%; max-width: none; }
    .af-faq__item summary { padding: 12px 14px; }
    .af-faq__antwort { padding: 0 14px 14px; }
    .af-satz .nv-field { flex: 1 1 auto; width: auto; }
    .af-kopierbar { justify-content: flex-end; }

    .af-page .nv-table--stacked td.nv-row-actions:empty { display: none; }

    /* drei Reiter passen bei 375 px ohne Wischen in eine Zeile */
    .af-page .nv-views { gap: 0; }
    .af-page .nv-view { flex: 1 1 auto; padding: 10px 6px; font-size: 0.85rem; text-align: center; }
    .af-page .nv-view .af-zahl { margin-left: 2px; }
}
