/* Login / Iscriviti — card scorrevole (video 2026-09-24) */
.es-login-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: rgba(5, 6, 8, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow: auto;
}

.es-login-stage {
  position: relative;
  width: min(660px, 100%);
  margin: auto;
}

.es-login-x {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 50%;
  background: #0e1118;
  color: #e2e8f0;
  font-size: 1.15rem;
  line-height: 32px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(17, 17, 17, 0.18);
}

.es-login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 560px;
  border-radius: 24px;
  background: #0b0e14;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  font-family: Inter, Outfit, sans-serif;
  color: #f8fafc;
  color-scheme: dark;
}

.es-login-card.is-otp {
  background: #101216;
  border-color: #101216;
  color: #f4f6f8;
  color-scheme: dark;
}

.es-login-card h2,
.es-login-card p,
.es-login-card button,
.es-login-card input,
.es-login-card label {
  font-family: Inter, Outfit, sans-serif;
  text-transform: none;
}

.es-login-bg {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.28), rgba(0, 0, 0, 0.55)),
    url("immagini/login-hero.jpg") center/cover no-repeat;
  translate: 100% 0;
  transition: translate 0.65s ease-in-out;
}

.es-login-card.is-register .es-login-bg {
  translate: 0 0;
}

.es-login-hero,
.es-login-form {
  position: absolute;
  width: 50%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: 0.65s ease-in-out;
  box-sizing: border-box;
}

.es-login-hero.login,
.es-login-form.login {
  opacity: 1;
  visibility: visible;
}

.es-login-card.is-register :is(.es-login-hero, .es-login-form).login {
  opacity: 0;
  visibility: hidden;
}

.es-login-card.is-register :is(.es-login-hero, .es-login-form).register {
  opacity: 1;
  visibility: visible;
}

.es-login-hero {
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 28px;
  text-align: center;
  color: #f9f9f9;
}

.es-login-hero.login { left: 50%; }
.es-login-card.is-register .es-login-hero.login { translate: 100% 0; }
.es-login-hero.register { translate: -100% 0; }
.es-login-card.is-register .es-login-hero.register { translate: 0; }

.es-login-hero h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #fff;
}

.es-login-hero p {
  margin: 0 0 6px;
  max-width: 240px;
  opacity: 0.85;
  line-height: 1.45;
  font-size: 0.92rem;
  color: #f3f4f6;
}

.es-login-switch {
  padding: 12px 46px;
  border-radius: 12px;
  border: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
  background: rgb(255 255 255 / 10%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: 0.3s;
}

.es-login-switch:hover {
  color: #041018;
  background: #38bdf8;
}

.es-login-form {
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 32px 22px;
  overflow: auto;
  background: transparent;
}

.es-login-form.login { left: 0; }
.es-login-card.is-register .es-login-form.login { translate: 100% 0; }
.es-login-form.register { left: 50%; translate: -100% 0; }
.es-login-card.is-register .es-login-form.register { translate: 0; }

.es-login-form h2 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #f8fafc;
}

.es-login-form label.es-login-lbl {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.es-login-form input[type="email"],
.es-login-form input[type="text"],
.es-login-form input[type="password"],
.es-login-form input[type="tel"],
.es-login-form input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: #050608;
  color: #f8fafc;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
}

.es-login-form input::placeholder { color: #9aa1ab; }
.es-login-form input:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }

.es-login-pw { position: relative; }
.es-login-pw input { padding-right: 42px; }

.es-login-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #9aa1ab;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 12px;
  font-size: 0.78rem;
}

.es-login-check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-weight: 600;
  cursor: pointer;
}

.es-login-check input { accent-color: #38bdf8; width: 15px; height: 15px; }

.es-login-link {
  border: 0;
  background: none;
  padding: 0;
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.es-login-submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: #38bdf8;
  color: #041018;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.es-login-submit:disabled { opacity: 0.7; cursor: default; }

.es-login-or {
  margin: 12px 0 8px;
  text-align: center;
  color: #9aa1ab;
  font-size: 0.75rem;
}

.es-login-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.es-social {
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.es-social:hover { background: rgba(56, 189, 248, 0.14); }

.es-gis-hit {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow: hidden;
}

.es-login-err {
  color: #dc2626;
  font-size: 0.75rem;
  margin: 4px 0 0;
}

.es-login-alert {
  display: none;
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-size: 0.78rem;
  font-weight: 600;
}

.es-login-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #94a3b8;
  cursor: pointer;
}

.es-login-consent a { color: #38bdf8; }

.es-login-consent input { margin-top: 2px; accent-color: #38bdf8; }

.es-login-mobile-switch {
  display: none;
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
}

.es-login-mobile-switch button {
  border: 0;
  background: none;
  color: #38bdf8;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

#accesso-spid-block { margin-bottom: 8px; }
#accesso-spid-block p { color: #94a3b8; font-size: 0.78rem; }

#password-requirements,
#password-strength-bar-wrap { display: none !important; }

/* OTP — 4 cifre che si chiudono in orbita */
.es-login-modal:has(.es-login-card.is-otp) {
  background: rgba(8, 9, 12, 0.9);
}

.es-otp {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: 16px;
  background: #101216;
  color: #f4f6f8;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 14px;
  box-sizing: border-box;
}

.es-login-card.is-otp .es-otp { display: flex; }

.es-otp-phone {
  width: min(360px, 100%);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.es-otp-notch {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: #2a2e34;
  margin-bottom: 18px;
}

.es-otp h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-transform: none;
  letter-spacing: -0.02em;
}

.es-otp-sub {
  margin: 0;
  max-width: 280px;
  color: #9aa3ad;
  font-size: 0.86rem;
  line-height: 1.45;
}

.es-otp-sub strong { color: #e8edf2; font-weight: 600; }

.es-otp-stage {
  position: relative;
  width: 280px;
  height: 200px;
  margin: 8px 0 4px;
}

.es-otp-ring,
.es-otp-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  pointer-events: none;
}

.es-otp-ring {
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
}

.es-otp-ring circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 2 8;
}

.es-otp-hub {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #dceaff;
}

.es-otp.is-orbit .es-otp-ring,
.es-otp.is-orbit .es-otp-hub { opacity: 1; }

.es-otp-slots { position: absolute; inset: 0; }

.es-otp-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 64px;
  margin: -32px 0 0 -29px;
  border-radius: 16px;
  background: #23262c;
  border: 1.5px solid #3a4048;
  box-sizing: border-box;
}

.es-otp-slot input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: Inter, Outfit, sans-serif;
  outline: none;
  border-radius: 16px;
  padding: 0;
}

.es-otp-slot.is-on {
  border-color: #dceaff;
  box-shadow: 0 0 0 1px #dceaff;
}

.es-otp-slot.is-spin::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1.5px dashed rgba(220, 234, 255, 0.9);
  animation: esOtpSpin 0.9s linear infinite;
  pointer-events: none;
}

@keyframes esOtpSpin { to { transform: rotate(360deg); } }

.es-otp.is-ok .es-otp-slot {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.es-otp.is-ok .es-otp-slot input { color: #38bdf8; }

.es-otp.is-bad .es-otp-slot {
  border-color: #ff4d6a;
  box-shadow: none;
}

.es-otp.is-bad .es-otp-slot input { color: #ff4d6a; }

.es-otp-resend {
  margin: 6px 0 0;
  color: #9aa3ad;
  font-size: 0.82rem;
}

.es-otp-resend button {
  border: 0;
  background: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.es-otp-resend button:disabled { color: #9aa3ad; cursor: default; }

.es-otp-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 330px);
  margin-top: 14px;
  padding: 8px 8px 8px 10px;
  border-radius: 18px;
  background: #1a1d22;
  border: 1px solid #2a2f36;
  text-align: left;
  box-sizing: border-box;
}

.es-otp-bubble {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #2a313c;
  color: #dceaff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.es-otp-toast-txt { flex: 1; min-width: 0; }
.es-otp-toast-txt small {
  display: block;
  color: #8b939e;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.es-otp-toast-txt strong {
  display: block;
  color: #eef2f6;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.es-otp-fill {
  border: 0;
  background: #38bdf8;
  color: #041018;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex: 0 0 auto;
}

.es-otp-hint {
  margin: 12px 0 0;
  color: #8b939e;
  font-size: 0.75rem;
}

.es-otp-back {
  margin-top: 8px;
  border: 0;
  background: none;
  color: #dceaff;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.es-otp.is-orbit .es-otp-toast,
.es-otp.is-orbit .es-otp-hint { display: none; }

.es-otp-done { display: none; }
.es-otp.is-done .es-otp-head,
.es-otp.is-done .es-otp-stage,
.es-otp.is-done .es-otp-resend,
.es-otp.is-done .es-otp-toast,
.es-otp.is-done .es-otp-hint,
.es-otp.is-done .es-otp-back { display: none !important; }
.es-otp.is-done .es-otp-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.es-otp-done h2 {
  color: #38bdf8;
  font-size: 1.35rem;
  margin: 8px 0 6px;
}
.es-otp-seal {
  position: relative;
  width: 188px;
  height: 188px;
  margin: 16px 0 6px;
  display: grid;
  place-items: center;
}
.es-otp-seal-ring {
  position: absolute;
  inset: 28px;
  border: 1.5px dashed rgba(56, 189, 248, 0.55);
  border-radius: 28px;
}
.es-otp-seal-ring--2 {
  inset: 4px;
  border-radius: 40px;
  opacity: 0.65;
}
.es-otp-check {
  width: 68px;
  height: 74px;
  border-radius: 18px;
  border: 2px solid #38bdf8;
  background: #101216;
  color: #38bdf8;
  display: grid;
  place-items: center;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.35);
  z-index: 1;
}
.es-otp-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  opacity: 0.75;
}
.es-otp-dot:nth-child(3) { top: 10px; left: 36px; }
.es-otp-dot:nth-child(4) { top: 28px; right: 14px; }
.es-otp-dot:nth-child(5) { bottom: 24px; right: 22px; }
.es-otp-dot:nth-child(6) { bottom: 12px; left: 48px; }
.es-otp-dot:nth-child(7) { top: 46px; left: 8px; }
.es-otp-dot:nth-child(8) { bottom: 40px; left: 16px; width: 3px; height: 3px; }
.es-otp-secure {
  margin: 4px 0 0;
  color: #9aa3ad;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.es-otp-continue {
  margin-top: 16px;
  border: 0;
  background: #38bdf8;
  color: #041018;
  font-weight: 800;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 999px;
  padding: 12px 42px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.28);
}
.es-otp-continue:hover { filter: brightness(1.06); }

.es-otp.is-filled .es-otp-slot {
  border-color: #dceaff;
  box-shadow: 0 0 0 1px #dceaff, 0 0 18px rgba(220, 234, 255, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.es-otp.is-filled .es-otp-slot input {
  color: #fff;
  font-size: 1.55rem;
}


@media (max-width: 720px) {
  .es-login-card { height: auto; min-height: 0; }
  .es-login-bg,
  .es-login-hero { display: none; }
  .es-login-form {
    position: relative;
    left: 0 !important;
    width: 100%;
    height: auto;
    translate: none !important;
    opacity: 1;
    visibility: visible;
  }
  .es-login-card:not(.is-register) .es-login-form.register { display: none; }
  .es-login-card.is-register .es-login-form.login { display: none; }
  .es-login-mobile-switch { display: block; }
}
