/* /features/ausfallrechnung/ – Kopf (ah-), Ausfall-Liste (al-), Zeitleiste (az-), Raster (ab-) */

/* ---------- Kopf: ein iPhone, daneben die eine Zeile aus dem Cockpit */
.sx-ausfallrechnung { padding-bottom: 0; }
.ah { position: relative; display: grid; justify-items: center; padding-bottom: 48px; }
.sx-ausfallrechnung .kp { zoom: 1.14; }
.sx-ausfallrechnung .kp-status { transition: color .3s; }
.sx-ausfallrechnung .kp-screen:has(.ksp.on) .kp-status { color: #fff; }
.sx-ausfallrechnung .kp-screen:has(.ksp.on) .kp-home { background: #fff; }
.sx-ausfallrechnung .ksp { pointer-events: none; }
.sx-ausfallrechnung .kn { position: relative; }
.sx-ausfallrechnung .kw-pdf strong { font-size: 12.5px; white-space: nowrap; letter-spacing: -.01em; }
.sx-ausfallrechnung .kn-t { position: static; }
.ah-chip { position: absolute; left: calc(50% + 128px); bottom: 150px; z-index: 8; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 18px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px #e6e8ee, 0 24px 44px -20px rgba(19,23,34,.4); font-size: 15px; color: #131722; white-space: nowrap; text-align: left; }
.ah-wer { display: flex; flex-direction: column; gap: 7px; }
.ah-wer b { font-weight: 600; }
.ah-chip > b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ah-chip .k-badge { padding: 3px 10px; font-size: 12px; }
.ah-chip .k-badge.go { background: #eef0fb; color: #4f46e5; }
.ah-chip .k-badge.ok { background: #e6f4ec; color: #1a9b59; }
.ah-chip .k-swap { justify-items: end; min-width: 68px; }

/* ---------- Abschnitte */
.ar-sec .sec-head { margin-bottom: 44px; }
.ar-lead { max-width: 600px; margin: 14px auto 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); }

/* ---------- Ausfall-Liste über die volle Breite */
.al { position: relative; max-width: 1080px; margin: 0 auto; }
.al .kwin-main { padding: 26px 30px 70px; }
.al-kt { --cols: 1.1fr 1.25fr 1.2fr .6fr 168px; }
.al-kt .kt-r { padding: 16px 0; }
.al-kt .kt-r > span:nth-child(2) { display: flex; flex-direction: column; gap: 7px; }
.al-kt .kt-r small { margin: 0; }
.al-kt .kt-r > span:nth-child(4), .al-kt .kt-h > span:nth-child(4) { text-align: right; }
.al-kt .k-swap { justify-items: end; }
.al-kt .kt-r:first-of-type { position: relative; }
.al-busy { gap: 7px; opacity: .6; }
.al-busy i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: alSpin .7s linear infinite; }
@keyframes alSpin { to { transform: rotate(360deg); } }
.al-toast { position: absolute; left: 50%; bottom: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 12px; background: #131722; color: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap; box-shadow: 0 16px 30px -14px rgba(19,23,34,.55); transform: translate(-50%, 10px); }
.k-flow .al-toast.on { transform: translate(-50%, 0); }
.al-toast svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: #1a9b59; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Zeitleiste: vier Stationen, die Strecke dazwischen füllt sich */
.az { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; max-width: 1080px; margin: 0 auto; text-align: left; }
.az-p { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding-top: 40px; }
.k-flow .az-p[data-at] { opacity: .32; transition: opacity .5s var(--ease); }
.k-flow .az-p[data-at].on { opacity: 1; }
.az-dot { position: absolute; left: 0; top: 0; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #C9C5B8; transition: border-color .3s, background .3s, box-shadow .3s; }
.az-p.on .az-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.az-p.ok.on .az-dot { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.az-seg { position: absolute; left: 26px; top: 8px; width: calc(100% + 28px - 34px); height: 2px; border-radius: 2px; background: #DDD9CD; overflow: hidden; }
.k-flow .az-seg[data-at] { opacity: 1; }
.az-seg::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.3s linear; }
.az-seg.on::before { transform: none; }
.az-p time { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.az-p > b { margin: 2px 0 16px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.az-msg { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; width: 100%; padding: 12px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--hair); box-shadow: 0 14px 28px -20px rgba(20,22,27,.35); }
.az-msg + .az-msg { margin-top: 8px; }
.az-msg > span { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.az-msg b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.az-app { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8.5px; }
.az-app.brief { background: #EFEDE6; }
.az-app.brief svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linejoin: round; }
.az-ok { border-color: #BFE3CD; background: #F3FAF6; }
.az-ok .k-ok { width: 34px; height: 34px; stroke: var(--green); }
.az-ok b { font-size: 17px; font-variant-numeric: tabular-nums; }
.az-ok .k-grau { background: rgba(30,127,79,.16); }

/* ---------- Raster */
.ab { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; max-width: 1080px; margin: 0 auto; }
.ab-k { display: flex; flex-direction: column; border-radius: 24px; border: 1px solid var(--hair); background: #fff; overflow: hidden; text-align: left; }
.ab-a, .ab-d { grid-column: span 7; }
.ab-b, .ab-c { grid-column: span 5; }
.ab-g { flex: 1; display: grid; place-items: center; min-height: 250px; padding: 32px 28px; background: var(--paper-2); }
.ab-g > .k-flow { width: 100%; display: grid; place-items: center; }
.ab-k > p { margin: 0; padding: 20px 24px 22px; font-size: 17px; line-height: 1.45; font-weight: 500; color: var(--ink); }
/* Einstellungen wie in der App: Bezeichnung links, Feld rechts */
.ab-set { width: 100%; max-width: 420px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px #e6e8ee, 0 20px 40px -26px rgba(19,23,34,.35); }
.ab-r { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px 13px 18px; border-bottom: 1px solid #f0f1f5; font-size: 14.5px; color: #3d4659; }
.ab-r:last-child { border-bottom: none; }
.ab-in { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 112px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #dfe2ea; background: #fff; font-style: normal; font-size: 15px; font-weight: 600; color: #131722; font-variant-numeric: tabular-nums; }
.ab-st { justify-content: space-between; padding: 0 4px; }
.ab-st u { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #f3f4f8; text-decoration: none; font-weight: 500; color: #687184; }
/* Eine Zeile aus der Liste mit dem Menü hinter den drei Punkten */
.ab-ent { position: relative; width: 100%; max-width: 380px; padding-bottom: 96px; }
.ab-z { display: flex; align-items: center; gap: 10px; padding: 14px 10px 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px #e6e8ee, 0 20px 40px -26px rgba(19,23,34,.35); font-size: 14.5px; color: #131722; }
.ab-wer { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-right: auto; min-width: 0; }
.ab-wer b { font-weight: 600; }
.ab-ent .k-badge { padding: 2px 8px; font-size: 11px; }
.ab-ent .k-badge.warn { background: #fff7ed; color: #b5740f; }
.ab-ent .k-btn { font-size: 12.5px; padding: 7px 12px; }
.ab-mehr { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.ab-mehr s { width: 3.5px; height: 3.5px; border-radius: 50%; background: #9aa1ae; box-shadow: 0 -6px 0 #9aa1ae, 0 6px 0 #9aa1ae; }
.ab-menu { position: absolute; right: 0; top: 60px; z-index: 2; display: flex; flex-direction: column; width: 224px; padding: 6px 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e6e8ee, 0 18px 36px -14px rgba(19,23,34,.4); font-size: 14px; color: #3d4659; transform: translateY(-6px); }
.k-flow .ab-menu.on { transform: none; }
.ab-menu span { position: relative; padding: 9px 16px; }
.ab-menu .rot { color: #b91c1c; }
.k-flow .ab-menu .rot[data-at] { opacity: 1; transition: background .2s; }
.k-flow .ab-menu .rot[data-at].on { background: #fef2f2; }
.ab-c .k-pays { justify-content: center; gap: 12px; }
.ab-c .k-pays > span { height: 54px; min-width: 104px; border-radius: 12px; font-size: 23px; box-shadow: 0 14px 26px -18px rgba(20,22,27,.4); }
.ab-c .k-pays .k-gpay svg { width: 23px; height: 23px; }
.ab-c .k-pays .k-cardpay { font-size: 17px; }
.ab-konto { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; max-width: 380px; padding: 18px 20px 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px #e6e8ee, 0 20px 40px -26px rgba(19,23,34,.35); color: #131722; }
.ab-aktiv { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px; background: #e6f4ec; color: #1a9b59; font-size: 11.5px; font-weight: 700; font-style: normal; }
.ab-aktiv i { width: 6px; height: 6px; border-radius: 50%; background: #1a9b59; }
.ab-konto > span { font-size: 12.5px; color: #687184; }
.ab-konto > b { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.ab-konto .k-grau { height: 9px; }

@media (max-width: 960px) {
  .ah-chip { left: calc(50% + 96px); }
  .az { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .az-seg { display: none; }
  .ab-a, .ab-b, .ab-c, .ab-d { grid-column: span 6; }
}
@media (max-width: 720px) {
  .sx-ausfallrechnung .kp { zoom: 1; }
  .ah { padding-bottom: 26px; }
  .ah-chip { position: relative; left: auto; bottom: auto; margin-top: 14px; padding: 12px 14px 12px 16px; font-size: 14.5px; }
  .ar-sec .sec-head { margin-bottom: 26px; }
  .ar-lead { font-size: 16.5px; }
  .al .kwin-main { padding: 14px 14px 62px; }
  .al-kt .kt-r { grid-template-columns: 1fr auto; gap: 10px; padding: 14px; }
  .al-kt .kt-r > span:nth-child(2) { grid-column: 1 / -1; margin-top: -4px; font-size: 13px; }
  .al-kt .kt-r > span:nth-child(3) { grid-column: 1 / -1; }
  .al-kt .kt-r > span:nth-child(4) { text-align: left; align-self: center; }
  .al-kt .kt-r:nth-child(n+4) { display: none; }
  .al-toast { bottom: 12px; font-size: 13px; }
  /* senkrecht: Punkt und Strecke links, Inhalt rechts */
  .az { grid-template-columns: 1fr; gap: 26px; max-width: 420px; }
  .az-p { padding: 0 0 0 38px; }
  .az-dot { top: 2px; }
  .az-seg { display: block; left: 8px; top: 28px; width: 2px; height: calc(100% + 26px - 34px); }
  .az-seg::before { transform: scaleY(0); transform-origin: 50% 0; }
  .az-p > b { margin-bottom: 12px; font-size: 19px; }
  .ab { grid-template-columns: 1fr; gap: 14px; }
  .ab-a, .ab-b, .ab-c, .ab-d { grid-column: auto; }
  .ab-g { min-height: 0; padding: 26px 16px; }
  .ab-k { border-radius: 20px; }
  .ab-k > p { padding: 16px 18px 18px; font-size: 16.5px; }
  .ab-c .k-pays { gap: 8px; }
  .ab-c .k-pays > span { height: 46px; min-width: 88px; font-size: 20px; }
  .ab-r { padding: 11px 12px 11px 14px; font-size: 14px; }
  .ab-in { min-width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .az-seg::before, .al-busy i { transition: none; animation: none; }
}
