/* Kundenkonto (20.10.2026): Anmelde-Popup und gemeinsame Formular-Bausteine (Popup und /konto/).
   Wird auf allen Seiten geladen, deshalb nur Klassen mit kp- und k-. Handy: Blatt von unten, Desktop: Fenster in der Mitte. */

/* ------------------------------------------------------------ Gemeinsame Bausteine */
.kf-lab { display: block; font-size: .8rem; font-weight: 600; color: var(--fg-soft); margin-bottom: 6px; letter-spacing: .02em; }
.k-pw { position: relative; display: block; }
.k-pw input { padding-right: 54px; }
.k-eye { position: absolute; top: 50%; right: 1px; transform: translateY(-50%); width: 48px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.k-eye svg { width: 22px; height: 22px; fill: currentColor; }
.k-eye .i-hide, .k-eye[aria-pressed="true"] .i-show { display: none; }
.k-eye[aria-pressed="true"] .i-hide { display: block; }
.k-eye:hover, .k-eye[aria-pressed="true"] { color: var(--gold-soft); }
.k-eye:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.k-form .f-err-box { margin-bottom: 0; line-height: 1.5; scroll-margin-top: calc(var(--bar-h, 58px) + env(safe-area-inset-top, 0px) + 20px); scroll-margin-bottom: 110px; }
.k-form .f-field input[readonly] { opacity: .72; cursor: default; }
.k-form .f-bad .kf-lab { color: var(--err); }
.k-check { min-height: 44px; padding: 4px 0; }
.cta.k-btn { width: 100%; justify-self: stretch; min-height: 50px; color: var(--btn-ink, #15120e); }
.cta.k-btn svg { width: 18px; height: 18px; fill: currentColor; }
.cta.k-btn:disabled { cursor: progress; }
/* Rahmen-Knopf auf dunklem Grund: helles Gold (base.css „Knöpfe einheitlich“), beim Darüberfahren goldene Fläche mit dunkler Schrift */
.cta.k-btn.k-ghost { background: rgba(255, 255, 255, .05); color: var(--btn-line-fg, #f6e7bd); border-color: var(--btn-line-bd, rgba(232, 201, 122, .85)); }
@media (hover: hover) { .cta.k-btn.k-ghost:hover { background: var(--gold); border-color: var(--gold); color: var(--btn-ink, #15120e); } }
.cta.k-btn.is-loading, .cta.k-btn:disabled { opacity: 1; }
.k-ok { background: var(--gold-bg); border: 1px solid rgba(205, 169, 81, .45); color: var(--btn-line-fg, #f6e7bd); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; font-size: .92rem; line-height: 1.55; }

/* Umschalter (Anmelden, Registrieren, Passwort vergessen) */
.k-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin: 0 0 16px; border-radius: 14px; background: rgba(20, 17, 15, .28); border: 1px solid rgba(255, 255, 255, .08); }
.k-seg > a, .k-seg > button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--fg-soft); font: 600 .84rem/1.2 var(--font); text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.k-seg > a.on, .k-seg > button[aria-selected="true"] { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: var(--btn-ink, #15120e); box-shadow: 0 4px 14px rgba(205, 169, 81, .25); }
.k-seg > a:not(.on):hover, .k-seg > button:not([aria-selected="true"]):hover { color: #fff; background: rgba(255, 255, 255, .07); }
.k-seg > :focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 1px; }

/* ------------------------------------------------------------ Popup */
html.kp-lock, html.kp-lock body { overflow: hidden; }
.kp-bg { position: fixed; inset: 0; z-index: 90; background: rgba(24, 20, 18, .5); -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%); opacity: 0; transition: opacity .32s ease; }
.kp-bg.on { opacity: 1; }
.kp {
  position: fixed; z-index: 91; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  max-height: calc(100dvh - 14px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column;
  color: var(--fg); text-align: left; background: rgba(63, 56, 51, .95);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .14); border-bottom: 0; border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .1);
  transform: translateY(105%); transition: transform .44s cubic-bezier(.2, .85, .25, 1); outline: none; overscroll-behavior: contain;
}
.kp.on { transform: none; }
.kp.drag { transition: none; }
.kp-head { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 14px 8px 20px; touch-action: none; }
.kp-grab { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.kp-title { margin: 0; font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; color: var(--btn-line-fg, #f6e7bd); font-weight: 700; }
.kp-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s ease, transform .15s ease; }
.kp-x:hover { background: rgba(255, 255, 255, .14); }
.kp-x:active { transform: scale(.94); }
.kp-x svg { width: 22px; height: 22px; fill: currentColor; }
.kp-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 2px 20px calc(22px + env(safe-area-inset-bottom, 0px)); }
.kp-lead { margin: 0 0 14px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.kp-sub { margin: 0 0 12px; color: var(--fg-soft); font-size: .88rem; line-height: 1.55; }
.kp .k-seg { margin-bottom: 14px; }
.kp .cform { max-width: none; }
.kp-panel.kp-in { animation: kpIn .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes kpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kp-load { display: grid; place-items: center; gap: 14px; min-height: 260px; padding: 20px; text-align: center; color: var(--fg-soft); }
.kp-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--gold-soft); animation: spin .8s linear infinite; }
.kp-load a { color: var(--btn-line-fg, #f6e7bd); font-weight: 600; }
.kp-done { padding: 6px 0 4px; text-align: center; outline: none; }
.kp-done .okcheck { display: block; margin: 4px auto 12px; }
.kp-done h3 { margin: 0 0 8px; font-size: 1.15rem; color: #fff; line-height: 1.35; }
.kp-done p { margin: 0 0 10px; color: var(--fg-soft); line-height: 1.6; }
.kp-done .kp-small { font-size: .85rem; color: var(--muted); }
.kp-acts { display: grid; gap: 10px; margin-top: 16px; }
.kp-acts .cta.k-btn { text-decoration: none; }
.kp-resend { margin-top: 10px; }
.kp-msg { margin-top: 10px; font-size: .88rem; color: var(--btn-line-fg, #f6e7bd); }

@media (min-width: 700px) {
  .kp {
    top: 50%; bottom: auto; left: 50%; right: auto; width: min(460px, calc(100vw - 48px)); max-height: min(88vh, 780px);
    border-bottom: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; opacity: 0;
    transform: translate(-50%, calc(-50% + 22px)) scale(.96);
    transition: transform .42s cubic-bezier(.2, .85, .25, 1), opacity .3s ease;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
  }
  .kp.on { opacity: 1; transform: translate(-50%, -50%); }
  .kp-grab { display: none; }
  .kp-head { padding: 16px 14px 8px 24px; }
  .kp-scroll { padding: 2px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .kp, .kp-bg { transition: opacity .16s ease; }
  .kp { transform: none; opacity: 0; }
  .kp.on { opacity: 1; }
  .kp-panel.kp-in { animation: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 700px) {
  .kp, .kp.on { transform: translate(-50%, -50%); }
}

/* Erfolgshäkchen in Gold statt Grün (Designvorgabe) */
.kp-done .okcheck circle, .kp-done .okcheck path, .konto .k-sent .okcheck circle, .konto .k-sent .okcheck path { stroke: var(--gold-soft); }

/* Links in Konto-Formularen (Datenschutz) auf dunklem Grund */
.k-form .f-priv a, .kp .f-priv a { color: var(--btn-line-fg, #f6e7bd); }

/* Sofort sichtbar, falls der Einblend-Übergang hängt (popup.js setzt kp-now) */
.kp-bg.kp-now { transition: none; opacity: 1; }
.kp.kp-now { transition: none; opacity: 1; transform: none; }
@media (min-width: 700px) { .kp.kp-now { transform: translate(-50%, -50%); } }
