/* Protexa – globales Login-Popup (site-weit via hooks.py geladen).
   Split-Card mit gleitender Overlay-Animation (wie /anmelden). Self-contained
   (keine --ptxshop-Variablen, da auch auf Theme-Seiten geladen). */

.pxlogin-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.pxlogin-modal[hidden] { display: none; }

.pxlogin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.62);
  backdrop-filter: blur(3px);
  animation: pxlogin-fade 0.18s ease;
}
@keyframes pxlogin-fade { from { opacity: 0; } to { opacity: 1; } }

/* Die Karte selbst (mit Slide-Overlay). */
.pxlogin-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 820px;
  min-height: 520px;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
  animation: pxlogin-pop 0.22s ease;
}
@keyframes pxlogin-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.pxlogin-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 200;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pxlogin-modal__close:hover { background: #e2e8f0; }

/* ---- Panels (Formular-Seiten) ---- */
.pxlogin-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}
.pxlogin-panel--signin { z-index: 2; }
.pxlogin-panel--signup { z-index: 1; opacity: 0; }

.pxlogin-modal__dialog.is-signup .pxlogin-panel--signin {
  transform: translateX(100%);
  opacity: 0;
  z-index: 1;
}
.pxlogin-modal__dialog.is-signup .pxlogin-panel--signup {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
}

.pxlogin-form,
.pxlogin-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: clamp(1.75rem, 3.5vw, 2.6rem);
}
.pxlogin-cta { align-items: flex-start; }

.pxlogin-eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #d97706;
}
.pxlogin-title {
  margin: 0;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.9rem;
  line-height: 1.05;
  color: #0f1e30;
}
.pxlogin-sub {
  margin: 8px 0 20px;
  color: #64748b;
  font-size: 0.875rem;
}

.pxlogin-label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f1e30;
}
.pxlogin-inputwrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pxlogin-inputwrap:focus-within {
  border-color: #f59e0b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}
.pxlogin-inputwrap input {
  flex: 1;
  min-width: 0;
  padding: 0.72rem 0;
  border: 0;
  background: none;
  font: inherit;
  color: #1f2937;
}
.pxlogin-inputwrap input:focus { outline: none; }
.pxlogin-pwtoggle {
  flex-shrink: 0;
  border: 0;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.pxlogin-pwtoggle:hover { color: #1a2e49; }

.pxlogin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.pxlogin-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 500;
  cursor: pointer;
}
.pxlogin-link {
  border: 0;
  background: none;
  padding: 0;
  color: #d97706;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.pxlogin-link:hover { text-decoration: underline; }

.pxlogin-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0a1628;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
}
.pxlogin-submit:hover { filter: brightness(1.05); }
.pxlogin-submit:active { transform: translateY(1px); }
.pxlogin-submit[disabled] { opacity: 0.6; cursor: default; }

.pxlogin-back {
  margin-top: 14px;
  border: 0;
  background: none;
  color: #d97706;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.pxlogin-back:hover { text-decoration: underline; }

.pxlogin-msg {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #b91c1c;
}
.pxlogin-msg.is-ok { color: #15803d; }

/* Konto-erstellen-Link im Formular: nur mobil (Desktop -> Overlay-CTA). */
.pxlogin-foot {
  display: none;
  margin: 16px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}
.pxlogin-foot a { color: #d97706; font-weight: 700; text-decoration: none; }
.pxlogin-foot a:hover { text-decoration: underline; }

/* ---- Overlay (farbiges, gleitendes Panel) ---- */
.pxlogin-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 100;
  transition: transform 0.6s ease-in-out;
}
.pxlogin-modal__dialog.is-signup .pxlogin-overlay { transform: translateX(-100%); }

.pxlogin-overlay-inner {
  position: relative;
  left: -100%;
  width: 200%;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
  color: #fff;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(245, 158, 11, 0.28), transparent 55%),
    linear-gradient(135deg, #1a2e49 0%, #0f1e30 55%, #0a1628 100%);
}
.pxlogin-modal__dialog.is-signup .pxlogin-overlay-inner { transform: translateX(50%); }

.pxlogin-overlay-panel {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(1.75rem, 3.5vw, 2.6rem);
  text-align: center;
  transition: transform 0.6s ease-in-out;
}
.pxlogin-overlay--left { left: 0; transform: translateX(-20%); }
.pxlogin-modal__dialog.is-signup .pxlogin-overlay--left { transform: translateX(0); }
.pxlogin-overlay--right { right: 0; transform: translateX(0); }
.pxlogin-modal__dialog.is-signup .pxlogin-overlay--right { transform: translateX(20%); }

.pxlogin-overlay-title {
  margin: 0;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.7rem;
  color: #fff;
}
.pxlogin-overlay-text {
  margin: 0;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.875rem;
  line-height: 1.55;
}
.pxlogin-overlay-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.pxlogin-overlay-icon svg { width: 32px; height: 32px; color: #fff; }

.pxlogin-ghost {
  margin-top: 6px;
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: 8px;
  background: #f59e0b;
  color: #0a1628;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
  transition: background 0.15s, filter 0.15s;
}
.pxlogin-ghost:hover { background: #d97706; filter: brightness(1.03); }

body.pxlogin-open { overflow: hidden; }

/* ---- Mobile: kein Slide, nur Anmelde-Formular als Bottom-Sheet ---- */
@media (max-width: 640px) {
  .pxlogin-modal { padding: 0; align-items: flex-end; }
  .pxlogin-modal__dialog {
    max-width: none;
    min-height: 0;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    animation: pxlogin-sheet 0.22s ease;
  }
  @keyframes pxlogin-sheet {
    from { transform: translateY(100%); }
    to { transform: none; }
  }
  .pxlogin-panel {
    position: static;
    width: 100%;
    opacity: 1 !important;
    transform: none !important;
  }
  .pxlogin-panel--signup,
  .pxlogin-overlay { display: none; }
  .pxlogin-form { padding: 26px 20px 22px; }
  .pxlogin-foot { display: block; }
  .pxlogin-title { font-size: 1.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pxlogin-panel,
  .pxlogin-overlay,
  .pxlogin-overlay-inner,
  .pxlogin-overlay-panel { transition: none; }
}
