/* Dialoge (30.09.2026) — Login/Registrierung/Passwort und Storno-Rueckfrage in der
   hims/hers-Designsprache wie /preise und der Kursplan: Glasplatte, leichte zweifarbige
   Titel, runder Schliessen-Knopf, weisser Hauptknopf. Seitenweit geladen (layouts.main).
   Markup: includes/loginForm, registration, forgotPassword, cancelConfirmModal.
   app.css traegt alte #modalLogin-Regeln — hier bewusst mit zwei IDs (#modalLogin #loginModal). */

:root {
  --dlg-t: #f4f1ea;
  --dlg-t2: rgba(244, 241, 234, .74);
  --dlg-t3: rgba(244, 241, 234, .5);
  --dlg-cream: #e9dcc3;
  --dlg-ink: #1b211c;
  --dlg-font: 'Jost', 'Avenir Next', 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ---------- Login-Fenster (Container #loginModal, Inhalt per .load()) ---------- */
#modalLogin #loginModal {
  z-index: 13100;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(8, 11, 9, .5);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}
#modalLogin #loginModal .lm {
  position: relative;
  width: calc(100% - 24px);
  max-width: 420px;
  margin: max(24px, 6vh) auto 24px;
  padding: 26px 22px 24px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05) 40%, rgba(20, 24, 21, .55));
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  backdrop-filter: blur(34px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 40px 90px -30px rgba(0, 0, 0, .75);
  color: var(--dlg-t);
  font-family: var(--dlg-font);
  font-weight: 300;
  text-align: left;
  animation: dlg-auf .35s cubic-bezier(.22, 1, .36, 1);
}
@keyframes dlg-auf { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
#modalLogin #loginModal .lm * { box-sizing: border-box; }

#modalLogin #loginModal .lm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#modalLogin #loginModal .lm-titel { margin: 0; font-family: var(--dlg-font) !important; font-size: 32px; font-weight: 300; line-height: 1.06; letter-spacing: -.025em; color: var(--dlg-t); text-transform: none; }
#modalLogin #loginModal .lm-titel span { color: rgba(244, 241, 234, .52); }
#modalLogin #loginModal .lm-close {
  position: static;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .06);
  color: var(--dlg-t);
  cursor: pointer;
}
#modalLogin #loginModal .lm-close svg { width: 17px; height: 17px; }
#modalLogin #loginModal .lm-sub { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--dlg-t3); }
/* Hinweis (z. B. „Melde dich kurz an …"): ruhig, NICHT rot — das ist keine Fehlermeldung. */
#modalLogin #loginModal .lm-hint { margin: 14px 0 0; padding: 11px 14px; border-radius: 16px; background: rgba(233, 220, 195, .12); border: 1px solid rgba(233, 220, 195, .35); color: var(--dlg-cream); font-size: 13.5px; line-height: 1.45; }
#modalLogin #loginModal .lm-body { display: grid; gap: 12px; margin-top: 20px; padding: 0; background: transparent; }

#modalLogin #loginModal .lm-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
#modalLogin #loginModal .lm-google svg { width: 18px; height: 18px; }
#modalLogin #loginModal .lm-oder { display: flex; align-items: center; gap: 12px; margin: 2px 0; color: var(--dlg-t3); font-size: 12.5px; }
#modalLogin #loginModal .lm-oder::before, #modalLogin #loginModal .lm-oder::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .14); }

#modalLogin #loginModal .lm-feld { display: grid; gap: 6px; margin: 0; }
#modalLogin #loginModal .lm-feld > span { padding-left: 16px; font-size: 12px; color: var(--dlg-t3); }
#modalLogin #loginModal .lm-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#modalLogin #loginModal input[type=text], #modalLogin #loginModal input[type=email], #modalLogin #loginModal input[type=password], #modalLogin #loginModal input[type=tel] {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .22);
  color: var(--dlg-t);
  font-family: var(--dlg-font);
  font-size: 16px; /* 16px: kein iOS-Zoom beim Antippen */
  font-weight: 400;
  box-shadow: none;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#modalLogin #loginModal input::placeholder { color: rgba(244, 241, 234, .38); }
#modalLogin #loginModal input:focus { border-color: rgba(244, 241, 234, .7); box-shadow: 0 0 0 3px rgba(244, 241, 234, .12); }
#modalLogin #loginModal .lm-check { display: flex; align-items: center; gap: 10px; margin: 2px 0 0 6px; font-size: 14px; color: var(--dlg-t2); cursor: pointer; }
#modalLogin #loginModal .lm-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--dlg-cream); }
/* Honeypot-Felder: muessen leer bleiben — fuer Menschen unsichtbar, nicht fokussierbar. */
#modalLogin #loginModal .lm-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

#modalLogin #loginModal .lm-link { justify-self: end; margin: -2px 8px 0 0; font-size: 13px; color: var(--dlg-t2); text-decoration: none; }
#modalLogin #loginModal .lm-link:hover { color: var(--dlg-t); text-decoration: underline; }
#modalLogin #loginModal .lm-error { margin: 0; padding: 11px 14px; border-radius: 16px; background: rgba(224, 96, 80, .14); border: 1px solid rgba(224, 96, 80, .45); color: #ffb3a8; font-size: 13.5px; line-height: 1.45; text-align: left; }

#modalLogin #loginModal .lm button.lm-primary, #modalLogin #loginModal .lm button.lm-secondary, #modalLogin #loginModal .lm button.lm-ghost {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 20px;
  border-radius: 999px;
  font-family: var(--dlg-font);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
#modalLogin #loginModal .lm button.lm-primary { border: 0; background: var(--dlg-t); color: var(--dlg-ink); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
#modalLogin #loginModal .lm button.lm-primary:hover { background: #fff; }
#modalLogin #loginModal .lm button.lm-primary:disabled { opacity: .6; cursor: wait; }
#modalLogin #loginModal .lm button.lm-secondary { border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: var(--dlg-t); font-weight: 400; }
#modalLogin #loginModal .lm button.lm-ghost { border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: var(--dlg-t2); font-weight: 400; }
#modalLogin #loginModal .lm button:active { transform: scale(.985); }
#modalLogin #loginModal :focus-visible { outline: 2px solid var(--dlg-cream); outline-offset: 3px; }

/* Handy: als Blatt von unten, daumennah. */
@media (max-width: 575px) {
  #modalLogin #loginModal .lm { width: 100%; max-width: none; margin: 56px 0 0; min-height: calc(100% - 56px); border-radius: 32px 32px 0 0; border-bottom: 0; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Storno-Rueckfrage (showCancelConfirm, main-layout.js) ---------- */
.cancel-confirm-overlay.cc { background: rgba(8, 11, 9, .5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); padding: 16px; }
.cancel-confirm-overlay.cc .cancel-confirm-box {
  width: 100%;
  max-width: 380px;
  padding: 26px 22px 22px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(20, 24, 21, .72));
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  backdrop-filter: blur(34px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 40px 90px -30px rgba(0, 0, 0, .75);
  font-family: var(--dlg-font);
  text-align: left;
  animation: dlg-auf .3s cubic-bezier(.22, 1, .36, 1);
}
.cancel-confirm-overlay.cc .cc-titel { margin: 0; font-family: var(--dlg-font) !important; font-size: 30px; font-weight: 300; line-height: 1.06; letter-spacing: -.025em; color: var(--dlg-t); text-transform: none; }
.cancel-confirm-overlay.cc .cc-titel span { color: rgba(244, 241, 234, .52); }
.cancel-confirm-overlay.cc .cancel-confirm-text { margin: 12px 0 20px; font-size: 14px; line-height: 1.55; color: var(--dlg-t2); }
.cancel-confirm-overlay.cc button { display: block; width: 100%; min-height: 52px; margin: 0; padding: 0 20px; border-radius: 999px; font-family: var(--dlg-font); font-size: 15.5px; font-weight: 500; letter-spacing: 0; text-transform: none; cursor: pointer; }
#cancelConfirmModal.cc #btn_no_cancel { border: 0; background: var(--dlg-t); color: var(--dlg-ink); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
#cancelConfirmModal.cc #btn_yes_cancel { margin-top: 10px; border: 1px solid rgba(224, 96, 80, .55); background: transparent; color: #ffb3a8; font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  #modalLogin #loginModal .lm, .cancel-confirm-overlay.cc .cancel-confirm-box { animation: none; }
}
