/* =============================================================================
   xilox.de – UI-Relaunch 2026 · css/v2/pages/login.css (Phase 2)
   -----------------------------------------------------------------------------
   Auth-Seiten: login.php + login_failed.php (Public-Shell, hero=false).
   Zentrierte Auth-Karte unter der fixen Public-Navigation plus
   Cookie-Consent-Overlay (login.php).

   Lade-Reihenfolge: nach components.css (siehe incl/layout/head.php).
   Alle Werte greifen auf die Design-Tokens in css/v2/tokens.css zu.
   ============================================================================= */

/* --- 1. Auth-Stage (zentriert unter der fixen Public-Navigation) ------------- */
.auth-stage {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* fixe Navbar (min. 76px) ausgleichen + Sektions-Abstand */
  padding: calc(76px + var(--space-8)) var(--space-5) var(--space-8);
}

.auth-card {
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-card);
}

/* Breitere Variante für längere Formulare (reg.php) */
.auth-card--wide {
  max-width: 640px;
}

/* Lange Formulare: oben statt mittig ausrichten (vermeidet Abschnitts-Clip bei Overflow) */
.auth-stage--top {
  align-items: flex-start;
}

/* Kopfzeile der Auth-Karte (Icon-Tile, Titel, Subline – zentriert) */
.auth-head {
  text-align: center;
  margin-bottom: var(--space-6);
}
.auth-icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-tint);
  color: var(--accent-text);
  margin-bottom: var(--space-4);
}
/* Fehler-Variante (login_failed.php) */
.auth-icon-tile--danger {
  background-color: rgba(239, 110, 110, .12);
  color: var(--danger);
}
.auth-head h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}
.auth-subline {
  color: var(--text-secondary);
  font-size: .9375rem;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 42ch;
}

/* Formular */
.auth-form .v2-field-label {
  text-align: left;
}
.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-3);
}

/* „Zurück zum normalen Login“-Link (login_failed.php) */
.auth-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--text-secondary);
  font-size: .875rem;
}
.auth-back-link:hover {
  color: var(--accent-text);
}

/* Statusmeldung (#loginStatus nutzt .alert-danger/.alert-success) */
#loginStatus {
  margin-top: var(--space-4);
  justify-content: center;
  text-align: center;
}
.auth-status-hidden {
  display: none;
}

/* Submit-Spinner (ersetzt das Bootstrap-Icon aus der Altversion) */
@keyframes auth-spin {
  to { transform: rotate(360deg); }
}
.auth-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  display: inline-block;
  flex-shrink: 0;
  animation: auth-spin .8s linear infinite;
}

/* Icon umdrehen (es existiert nur arrow-right → für „Zurück“/Redirect nutzen) */
.icon-flip {
  transform: rotate(180deg);
}

/* --- 2. Cookie-Consent (Overlay + Modal, login.php) --------------------------- */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  background-color: rgba(7, 11, 18, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.cookie-modal {
  width: 100%;
  max-width: 460px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  padding: var(--space-6);
}

.cookie-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.cookie-head h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cookie-text {
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

/* Cookie-Auflistung (Icon + Text) – lucide_icon() rendert ein Inline-SVG ohne
   Class, daher gezielt svg selektieren statt .lucide */
.cookie-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cookie-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.cookie-list li svg {
  color: var(--accent-text);
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.cookie-actions .btn {
  flex: 1;
  justify-content: center;
}

@media (max-width: 575.98px) {
  .cookie-modal {
    padding: var(--space-5);
  }
  .cookie-actions {
    flex-direction: column;
  }
}

/* --- 3. Registrierungs-Bestätigung (regfinished.php) -------------------------- */
.summary-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: .9375rem;
}
.summary-row:last-child {
  border-bottom: none;
}
.summary-label {
  color: var(--text-secondary);
}
.summary-value {
  color: var(--text-primary);
  word-break: break-word;
}

@media (max-width: 575.98px) {
  .summary-row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
}
