/* Upgrade-Hinweise: Credits im Kopf, Hinweis-Karten, Upgrade-Dialog, Pakete (app/upgrade.js) */

/* ---- Kopf: Credits als schlichter Link (Blitz + Zahl), Upgrade-Knopf ---- */
.credits-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px; border-radius: 10px; color: var(--text); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; flex: none; }
.credits-link:empty { display: none; }
.credits-link:hover .cr-zahl { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.cr-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gruen); border: 1.5px solid var(--text); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.cr-icon svg { width: 12px; height: 12px; fill: var(--text); }
/* Wenig Credits: nur die Zahl dezent einfärben */
.credits-link[data-stufe="knapp"] .cr-zahl { color: #c25e00; }
.credits-link[data-stufe="leer"] .cr-zahl { color: var(--error); }
.credits-link:focus-visible, .upgrade-knopf:focus-visible, .uh-zu:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }
.upgrade-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--text); color: var(--gruen); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; transition: transform .15s, box-shadow .15s; }
.upgrade-knopf svg { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.upgrade-knopf:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, .14); }
.upgrade-knopf[hidden] { display: none; }

/* ---- Kleine Hinweis-Karte (Paket-Grenze, Erfolg) und „zu wenig Credits“ ---- */
.upgrade-hinweis.klein, .upgrade-hinweis.erfolg, .credits-fehlen { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; margin: 16px 0; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); max-width: 760px; }
.upgrade-hinweis.voll { background: var(--gruen-soft); border-color: transparent; }
.credits-fehlen { grid-template-columns: 1fr auto; background: #fff1e2; border-color: transparent; color: #8a4300; }
.credits-fehlen .uh-text span { color: #9a5a1e; }
.uh-symbol { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--gruen); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.uh-symbol .schloss { width: 18px; height: 18px; }
.upgrade-hinweis.erfolg .uh-symbol { background: var(--gruen-soft); }
.uh-text { min-width: 0; }
.uh-text b { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; }
.uh-text span { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.upgrade-hinweis .btn-small, .credits-fehlen .btn-small { height: 40px; padding: 0 16px; font-size: 14px; }
.uh-zu { all: unset; cursor: pointer; grid-column: 4; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.uh-zu:hover { background: var(--bg); color: var(--text); }
.uh-zu svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.wt-bar + .upgrade-hinweis, .cr-bar + .upgrade-hinweis { margin-top: 4px; }

/* ---- Start-Seite: Upgrade-Karte ---- */
.start-karte { position: relative; margin-top: 16px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; padding: 40px 44px; border-radius: 32px; background: var(--text); color: #fff; box-shadow: var(--schatten); }
.sk-marke { display: inline-flex; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gruen); background: rgba(185, 242, 124, .12); border-radius: 999px; padding: 6px 12px; }
.start-karte h2 { margin-top: 16px; font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; max-width: 460px; }
.start-karte .sk-text > p { margin-top: 12px; font-size: 16px; color: #bdbdb6; max-width: 440px; }
.sk-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.start-karte .btn-gross { height: 54px; font-size: 16px; padding: 0 22px; }
.start-karte .btn-gross:not(.hell) { background: var(--gruen); color: var(--text); }
.start-karte .btn-gross:not(.hell) .pfeil { background: var(--text); color: var(--gruen); }
.start-karte .btn-gross.hell { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.start-karte .btn-gross.hell:hover { border-color: #fff; box-shadow: none; }
.start-karte .msg { margin-top: 12px; }
.start-karte .msg.error { color: #ff8a80; }
.sk-fakten { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; }
.sk-fakten li { background: rgba(255, 255, 255, .06); border-radius: 20px; padding: 18px; }
.sk-fakten b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--gruen); }
.sk-fakten span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: #bdbdb6; }
.start-karte .uh-zu { position: absolute; top: 16px; right: 16px; color: #a6a69f; }
.start-karte .uh-zu:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---- Dialog: nachkaufen oder größeres Paket ---- */
.upgrade-dialog { max-width: 660px; }
.upgrade-dialog .modal-head h2 { font-size: 24px; padding-right: 12px; }
.upgrade-dialog > .sub { margin-top: 4px; font-size: 15px; }
.ud-wege { margin-top: 20px; display: grid; gap: 12px; }
.ud-wege.zwei { grid-template-columns: 1fr 1fr; }
.ud-weg { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; background: var(--bg); }
.ud-weg .sub { margin-top: 0; }
.ud-weg.empfohlen { background: var(--text); color: #fff; }
.ud-marke { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ud-weg.empfohlen .ud-marke { color: var(--gruen); }
.ud-liste { list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.ud-liste li { padding-left: 22px; position: relative; color: #4a4a45; }
.ud-liste li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--gruen); border-bottom: 2px solid var(--gruen); transform: rotate(-45deg); }
.ud-liste b { color: var(--text); }
/* Hervorgehobene (dunkle) Box: helle Schrift; die normale Box ist hell (z. B. Ultra neben „Credits nachkaufen“ bei Pro) */
.ud-weg.empfohlen .ud-liste li { color: #d6d6d0; }
.ud-weg.empfohlen .ud-liste b { color: #fff; }
.ud-weg:not(.empfohlen) .ud-liste li::before { border-color: #43b02a; }
.ud-preis { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin-top: 2px; }
.ud-preis span { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ud-preis small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; line-height: 1.4; color: var(--muted); }
.ud-weg.empfohlen .ud-preis span, .ud-weg.empfohlen .ud-preis small { color: #a6a69f; }
.ud-weg .btn-small { margin-top: auto; width: 100%; }
.ud-weg.empfohlen .btn-small { background: var(--gruen); color: var(--text); }
.ud-credits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ud-credit { height: auto; margin: 0; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; }
.ud-credit:hover { border-color: var(--text); box-shadow: none; }
.ud-credit b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.ud-credit span { font-size: 13px; font-weight: 600; color: var(--muted); }
.ud-credit .spinner { margin: 0 auto; }
.ud-fuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 14px; }
.ud-fuss a { font-weight: 600; }
.upgrade-dialog #ud-msg { margin-top: 12px; }

/* ---- Pakete in den Einstellungen ---- */
.plan-grid { margin-top: 24px; }
.plan.empfohlen { position: relative; box-shadow: 0 0 0 2px var(--text), var(--schatten-hoch); }
.plan-band { position: absolute; top: -12px; left: 24px; background: var(--gruen); color: var(--text); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 4px 12px; }
.plan-limits b { color: var(--text); font-weight: 700; }
.plan.current .plan-limits b { color: #fff; }
.plan-limits li.ohne { color: var(--line-strong); }
.plan-limits li.ohne .schloss { width: 13px; height: 13px; vertical-align: -1px; }
.plan.current .plan-limits li.ohne { color: #77776f; }

@media (max-width: 900px) {
  .upgrade-hinweis.klein, .upgrade-hinweis.erfolg { grid-template-columns: auto 1fr auto; gap: 10px 12px; }
  .upgrade-hinweis.klein .btn-small, .upgrade-hinweis.erfolg .btn-small { grid-row: 2; grid-column: 2 / -1; justify-self: start; }
  .upgrade-hinweis .uh-zu { grid-column: 3; grid-row: 1; align-self: start; }
  .upgrade-hinweis.voll { grid-template-columns: auto 1fr; }
  .credits-fehlen { grid-template-columns: 1fr; }
  .credits-fehlen .btn-small { justify-self: start; }
  .start-karte { grid-template-columns: 1fr; gap: 24px; padding: 30px 22px 22px; border-radius: 26px; }
  .start-karte h2 { padding-right: 30px; }
  .sk-knoepfe .btn-gross { width: 100%; }
  .sk-fakten li { padding: 14px; }
  .sk-fakten b { font-size: 24px; }
  .ud-wege.zwei { grid-template-columns: 1fr; }
  .upgrade-dialog { padding: 24px 20px; }
}
/* Einrichtungs-Assistent: keine Credits- oder Upgrade-Elemente im Kopf */
body.einrichtung-modus .credits-link, body.einrichtung-modus .upgrade-knopf { display: none !important; }
/* Anzeigenbilder: freies Kontingent direkt unter dem Erstellen-Knopf */
.cr-frei { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.cr-frei > span { display: inline-flex; width: 16px; height: 16px; color: var(--text); }
.cr-frei > span svg { width: 16px; height: 16px; }
.cr-frei b { color: var(--text); }
.cr-frei .text-btn { color: var(--text); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
