/* Abi-Rechner NC-Check 1.2.0 – nutzt die Theme-Variablen (--abi-*) */
.abi-ncc, .abi-nct { --ncc-ok: var(--abi-ok, #2F6B3A); --ncc-ok-bg: var(--abi-ok-bg, #E6F0E4); --ncc-close: #8A5A00; --ncc-close-bg: #FFF4D6;
  --ncc-bad: var(--abi-bad, #B42318); --ncc-line: var(--abi-border, #E3DFD3); --ncc-muted: var(--abi-muted, #4A5568);
  --ncc-soft: var(--abi-soft, #F7F5EF); --ncc-primary: var(--abi-primary, #1F4E79); color: var(--abi-text, #14213A); }
.abi-ncc *, .abi-nct * { box-sizing: border-box; }

.abi-ncc { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--ncc-line); border-left: 4px solid var(--abi-accent, #FFD447);
  border-radius: var(--abi-radius, 16px); background: var(--abi-surface, #fff); }
.abi-ncc h3 { margin: 0 0 6px; font-size: 20px; }
.abi-ncc__lead { margin: 0 0 14px; color: var(--ncc-muted); }
.abi-ncc__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.abi-ncc__kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--ncc-line); border-radius: 12px;
  background: var(--ncc-soft); color: inherit; text-align: left; font: inherit; text-decoration: none; cursor: pointer; }
.abi-ncc__kpi b { font-size: 24px; line-height: 1.1; }
.abi-ncc__kpi span { font-size: 13px; color: var(--ncc-muted); line-height: 1.35; }
.abi-ncc__kpi.is-ok { background: var(--ncc-ok-bg); border-color: #9CC39A; }
.abi-ncc__kpi.is-ok b { color: var(--ncc-ok); }
.abi-ncc__kpi.is-close { background: var(--ncc-close-bg); border-color: #E9CB7A; }
.abi-ncc__kpi.is-close b { color: var(--ncc-close); }
.abi-ncc__kpi.is-active { outline: 2px solid var(--ncc-primary); outline-offset: 1px; }
.abi-ncc__kpi:hover { border-color: var(--ncc-primary); }

.abi-ncc__controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.abi-ncc__tabs { display: inline-flex; border: 1px solid var(--ncc-line); border-radius: 10px; overflow: hidden; }
.abi-ncc__tabs button { min-height: 40px; padding: 0 14px; border: 0; background: #fff; font: inherit; cursor: pointer; }
.abi-ncc__tabs button + button { border-left: 1px solid var(--ncc-line); }
.abi-ncc__tabs button.is-active { background: var(--ncc-primary); color: #fff; font-weight: 700; }
.abi-ncc__q, .abi-ncc__a, .abi-nct__controls input, .abi-nct__controls select {
  min-height: 40px; padding: 6px 10px; border: 1px solid var(--abi-border, #D9D4C5); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
.abi-ncc__q { flex: 1 1 220px; }

.abi-ncc__table td, .abi-nct__table td { vertical-align: top; }
.abi-ncc__table td small, .abi-nct__table td small { display: block; color: var(--ncc-muted); font-size: 12px; }
.abi-ncc .abi-table th:not(:first-child), .abi-ncc .abi-table td:not(:first-child) { text-align: left; }
.abi-ncc__nc { white-space: nowrap; }
.abi-ncc__more-wrap { margin: 10px 0 0; }
.abi-ncc__foot { margin: 14px 0 8px; }
.abi-ncc__hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ncc-muted); }

.abi-nc__final { color: var(--ncc-muted); font-size: 13px; }
.abi-nc__roh { font-size: 13px; }
.abi-nc__muted { color: var(--ncc-muted); }
.abi-nc__loading { color: var(--ncc-muted); }
.abi-nc__ok { color: var(--ncc-ok); font-weight: 700; white-space: nowrap; }
.abi-nc__close { color: var(--ncc-close); font-weight: 700; white-space: nowrap; }
.abi-nc__no { color: var(--ncc-bad); white-space: nowrap; }
.abi-nc__tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--ncc-soft); border: 1px solid var(--ncc-line); white-space: nowrap; }
.abi-nc__tag--s2, .abi-nc__tag--s3 { background: var(--ncc-ok-bg); border-color: #9CC39A; color: var(--ncc-ok); }
.abi-nc__info { display: inline-block; position: relative; white-space: normal; }
.abi-nc__info summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; border: 1px solid var(--ncc-line); font-size: 12px; font-weight: 700; color: var(--ncc-muted); cursor: pointer; }
.abi-nc__info summary::-webkit-details-marker { display: none; }
.abi-nc__info[open] span { display: block; position: absolute; z-index: 5; right: 0; top: 24px; width: min(300px, 80vw); padding: 8px 10px;
  border: 1px solid var(--ncc-line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(20,33,58,.12); font-size: 13px; line-height: 1.45; }

.abi-nct { margin: 16px 0 24px; }
.abi-nct__lead { color: var(--ncc-muted); }
.abi-nct__controls { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr 1.6fr; gap: 10px; margin: 0 0 10px; }
.abi-nct__controls label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
.abi-nct__controls input, .abi-nct__controls select { width: 100%; font-weight: 400; }
.abi-nct__count { margin: 0 0 6px; font-size: 14px; color: var(--ncc-muted); }
.abi-nct__scroll { overflow-x: auto; }
.abi-nct__table th button { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.abi-nct__table th[aria-sort="ascending"] button::after { content: " ▲"; font-size: 10px; }
.abi-nct__table th[aria-sort="descending"] button::after { content: " ▼"; font-size: 10px; }
.abi-nct .abi-table th:not(:first-child), .abi-nct .abi-table td:not(:first-child) { text-align: left; }
.abi-nct .abi-table th, .abi-nct .abi-table td { padding: 8px 14px 8px 0; }
.abi-nct .abi-table th { white-space: nowrap; }
.abi-nct__missing, .abi-nct__hint { font-size: 14px; color: var(--ncc-muted); }

@media (max-width: 760px) {
  .abi-ncc { padding: 14px; }
  .abi-ncc__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .abi-ncc__kpi b { font-size: 20px; }
  .abi-nct__controls { grid-template-columns: 1fr 1fr; }
  .abi-nct__controls label:first-child { grid-column: 1 / -1; }
  .abi-nct__scroll { overflow: visible; }
  .abi-nct__table thead { display: none; }
  .abi-nct__table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--ncc-line); }
  .abi-nct .abi-table td { padding: 0; border: 0; }
  .abi-nct__table td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; }
  .abi-nct__table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .abi-nct__table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .abi-nct__table tr.has-chance td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  .abi-nct__table td.abi-nct__q { grid-column: 1 / -1; font-size: 13px; }
  .abi-ncc__table thead { display: none; }
  .abi-ncc__table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--ncc-line); }
  .abi-ncc__table td { padding: 0; border: 0; }
  .abi-ncc__table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .abi-ncc__table td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
}

/* 1.2.0: Kurzzeile im Ergebnis-Kopf + Platz reservieren */
.abi-ncc__teaser { margin: 10px 0 0; }
.abi-ncc__teaser a { display: inline-block; padding: 8px 12px; border-radius: 10px; background: #E6F0E4; color: #2F6B3A; font-weight: 700; text-decoration: none; line-height: 1.35; }
.abi-ncc__teaser a:hover { background: #D6E8D3; }
.abi-ncc:has(.abi-nc__loading) { min-height: 420px; }
.abi-nc-hint { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--abi-accent, #FFD447); border-radius: 8px; background: #FFFBEA; font-size: 15px; line-height: 1.45; }
