/* Login (templates/login/index.html.twig), 2026-10-23: el diseño de la portada. Va encima de drozap-home.css
   (colores --navy/--blue/--amber…, .dzh-nav, .dzh-btn). Botones sólidos y redondos, nunca outline; ámbar solo para
   la acción principal, siempre con texto navy. Vídeo de fondo como el login de antes. */

body.dzl-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--night); color: var(--white); }

/* Los bloques y botones con display propio no se esconden solo con el atributo hidden. */
body.dzl-body [hidden] { display: none !important; }

/* Logo configurado en la barra: alto fijo, ancho el que salga. */
.dzl-logo img { height: 34px !important; width: auto !important; margin: 0 !important; }
@media (min-width: 560px) { .dzl-logo img { height: 42px !important; } }

.dzl-stage {
  position: relative;
  flex: 1;
  display: grid;
  align-content: center;
  /* clip y no hidden: con hidden, al enfocar un campo el navegador desplazaba la zona y la tarjeta se salía. */
  overflow: hidden; /* respaldo: Safari < 16 no conoce clip */
  overflow: clip;
  padding: 28px 0 48px;
}

/* Vídeo (o imagen) a pantalla completa, oscurecido con el azul noche de la portada. */
.dzl-media { position: absolute; inset: 0; z-index: 0; background: var(--night); }
.dzl-media video,
.dzl-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.dzl-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 80% 0, rgba(72, 171, 247, 0.28), transparent 70%),
    linear-gradient(90deg, rgba(7, 11, 22, 0.88) 0%, rgba(13, 18, 34, 0.45) 55%, rgba(13, 18, 34, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 11, 22, 0) 55%, rgba(7, 11, 22, 0.9) 100%);
}
@media (prefers-reduced-motion: reduce) { .dzl-media video { display: none; } }

.dzl-grid { position: relative; z-index: 2; display: grid; gap: 24px; align-items: center; }

/* En móvil, el formulario primero: el texto de la izquierda sobra para entrar. */
.dzl-copy { display: none; }
.dzl-kicker { color: var(--sky); font: 800 0.85rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px !important; }
.dzl-copy h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); max-width: 12ch; text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45); }

.dzl-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(13, 18, 34, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}
.dzl-copy h1,
.dzl-card h2 { color: var(--white); }
.dzl-card h2 { font-size: 1.7rem; text-transform: none; }

.dzl-sub { margin-top: 8px !important; color: var(--on-dark); font-size: 0.95rem; }
.dzl-center { margin-top: 18px !important; text-align: center; }
.dzl-link { color: var(--sky); font-weight: 800; text-decoration: none; }
.dzl-link:hover { color: #8cc9fa; text-decoration: underline; }

.dzl-form { display: grid; gap: 10px; margin-top: 20px; }
.dzl-form label { font-weight: 800; font-size: 0.9rem; color: var(--white); }
.dzl-form input[type="text"],
.dzl-form input[type="email"],
.dzl-form input[type="tel"],
.dzl-form input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  /* 16 px: sin zoom automático del iPhone al tocar el campo. */
  font: 400 16px/1.2 var(--body);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.dzl-form input::placeholder { color: rgba(255, 255, 255, 0.55); }
.dzl-form input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(72, 171, 247, 0.28); }

.dzl-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.dzl-label-row a { font-size: 0.88rem; }

.dzl-password { position: relative; }
.dzl-password input { padding-right: 52px !important; }
.dzl-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
  transform: translateY(-50%);
}
.dzl-eye:hover,
.dzl-eye[aria-pressed="true"] { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.dzl-eye svg { width: 20px; height: 20px; fill: currentColor; }

.dzl-card .dzh-btn { width: 100%; }
.dzl-form .dzh-btn { margin-top: 8px; }
.dzl-card .dzh-btn:disabled { opacity: 0.7; cursor: progress; transform: none; }

.dzl-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--on-dark); font-size: 0.82rem; }
.dzl-divider::before,
.dzl-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.16); }

.dzl-alt { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

.dzl-reset-fields { display: grid; gap: 10px; }
.dzl-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }

.dzl-alert { margin-top: 16px !important; padding: 12px 14px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; }
.dzl-alert.is-error { background: rgba(255, 93, 93, 0.16); color: #ffd0d0; }
.dzl-alert.is-info { background: rgba(255, 173, 70, 0.16); color: #ffe0b8; }
.dzl-alert.is-ok { background: rgba(47, 191, 113, 0.16); color: #c4f2d8; }

.dzl-env { margin-top: 16px !important; padding: 6px; border-radius: 10px; background: #7f1d1d; color: #fff; font-size: 0.8rem; font-weight: 800; text-align: center; }

/* ---- Alta de cuenta y pantallas que la siguen (user_register/*), 2026-11-02 ---- */
.dzl-card--wide { max-width: 560px; }

.dzl-field { display: grid; gap: 6px; min-width: 0; }
.dzl-row { display: grid; gap: 10px; }
.dzl-hint { color: var(--on-dark); font-size: 0.85rem; }
.dzl-field__error { color: #ffb4b4; font-size: 0.84rem; font-weight: 700; }
.dzl-form input.is-invalid { border-color: var(--crit); box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.22); }

/* Idioma: pastillas de cristal; la elegida, en azul. */
.dzl-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dzl-lang input { position: absolute; opacity: 0; pointer-events: none; }
.dzl-lang span {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  color: var(--on-dark); font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.dzl-lang span:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.dzl-lang input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.dzl-lang input:focus-visible + span { outline: 3px solid rgba(72, 171, 247, 0.5); outline-offset: 2px; }
.dzl-lang img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }

/* Teléfono: país (select2 con buscador) + número en la misma fila. */
.dzl-phone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.dzl-phone__country { min-width: 0; }
.dzl-phone__country select { width: 100%; min-height: 50px; border-radius: 12px; }

/* select2 sin el CSS de Atlantis: lo justo para que funcione, con el cristal de la tarjeta. */
.dzl-body .select2-hidden-accessible { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; white-space: nowrap !important; }
.dzl-body .select2-container { position: relative; display: inline-block; box-sizing: border-box; vertical-align: middle; }
.dzl-body .select2-container .select2-selection--single {
  display: flex; align-items: center; min-height: 50px; padding: 0 34px 0 14px; cursor: pointer; user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; background: rgba(255, 255, 255, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.dzl-body .select2-container--open .select2-selection--single,
.dzl-body .select2-container--focus .select2-selection--single { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(72, 171, 247, 0.28); outline: none; }
.dzl-body .select2-selection--single.is-invalid { border-color: var(--crit); }
.dzl-body .select2-selection__rendered { display: block; overflow: hidden; color: var(--white); font: 400 16px/1.2 var(--body); white-space: nowrap; text-overflow: ellipsis; }
.dzl-body .select2-selection__placeholder { color: rgba(255, 255, 255, 0.55); }
.dzl-body .select2-selection__arrow { position: absolute; top: 50%; right: 14px; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--on-dark); border-bottom: 2px solid var(--on-dark); transform: rotate(45deg); }
.dzl-body .select2-selection__arrow b { display: none; }
.dzl-body .select2-container--open .select2-dropdown { left: 0; }
.dzl-body .select2-dropdown {
  position: absolute; left: -100000px; z-index: 1051; display: block; box-sizing: border-box; width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; overflow: hidden;
  background: #141b31; box-shadow: var(--shadow-md);
}
.dzl-body .select2-dropdown--below { margin-top: 4px; }
.dzl-body .select2-dropdown--above { margin-top: -4px; }
.dzl-body .select2-search--dropdown { display: block; padding: 8px; }
.dzl-body .select2-search--dropdown.select2-search--hide { display: none; }
.dzl-body .select2-search__field {
  box-sizing: border-box; width: 100%; min-height: 42px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; background: rgba(255, 255, 255, 0.08);
  color: var(--white); font: 400 16px/1.2 var(--body); outline: none;
}
.dzl-body .select2-search__field:focus { border-color: var(--sky); }
.dzl-body .select2-results > .select2-results__options { max-height: 260px; margin: 0; padding: 0 0 6px; overflow-y: auto; list-style: none; }
.dzl-body .select2-results__option { padding: 9px 14px; color: var(--on-dark); font-size: 0.95rem; user-select: none; }
.dzl-body .select2-results__option[aria-disabled="true"] { color: rgba(255, 255, 255, 0.35); }
.dzl-body .select2-results__option--highlighted[aria-selected] { background: var(--blue); color: var(--white); }
.dzl-body .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted) { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.dzl-body .select2-close-mask { position: fixed; inset: 0; z-index: 99; display: block; min-width: 100%; min-height: 100%; opacity: 0; background: #fff; }

/* Reglas de la contraseña (security/_password_requirements): ✓ / ✕ en vez de los iconos de Font Awesome. */
.dzl-body .password-requirements ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 0.86rem; font-weight: 600; }
.dzl-body .password-requirements li i { display: none; }
.dzl-body .password-requirements li::before { display: inline-block; width: 1.3em; font-weight: 800; }
.dzl-body .password-requirements li.text-danger { color: #ffb4b4; }
.dzl-body .password-requirements li.text-danger::before { content: "✕"; }
.dzl-body .password-requirements li.text-success { color: #c4f2d8; }
.dzl-body .password-requirements li.text-success::before { content: "✓"; }

.dzl-form .cf-turnstile { display: flex; justify-content: center; }
.dzl-trap { position: absolute; left: -9999px; opacity: 0; }
.dzl-alert__action { display: flex; width: 100%; margin-top: 10px; }
.dzl-card .dzh-btn:disabled:not([data-loading]) { cursor: not-allowed; }

/* Código de una sola casilla (entrar con el teléfono, recuperar por SMS). */
.dzl-form input.dzl-code { text-align: center; letter-spacing: 0.4em; font-size: 1.4rem; font-weight: 800; }
/* Errores de los formularios de Symfony (form_errors) bajo el campo. */
.dzl-field__errors:empty { display: none; }
.dzl-field__errors ul { margin: 0; padding: 0; list-style: none; color: #ffb4b4; font-size: 0.84rem; font-weight: 700; }
/* Saludo encima del título (añadir teléfono con la sesión abierta). */
.dzl-card .dzl-kicker { margin-bottom: 8px !important; }

/* Código del SMS: seis casillas grandes. */
.dzl-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.dzl-form .dzl-otp input {
  min-height: 60px; padding: 0; text-align: center; font: 800 1.7rem/1 var(--body);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: var(--white);
}
.dzl-form .dzl-otp input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(72, 171, 247, 0.28); }
.dzl-text-btn { padding: 0; border: 0; background: none; color: var(--sky); font: 800 0.95rem/1.3 var(--body); cursor: pointer; }
.dzl-text-btn:disabled { color: var(--on-dark); font-weight: 600; cursor: default; }
.dzl-text-btn:not(:disabled):hover { text-decoration: underline; }
.dzl-links { display: grid; gap: 8px; margin-top: 18px; text-align: center; }
.dzl-done { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: rgba(47, 191, 113, 0.18); color: #c4f2d8; }
.dzl-done svg { width: 32px; height: 32px; fill: currentColor; }
.dzl-card--center { text-align: center; }
.dzl-email { margin-top: 14px !important; color: var(--white); font-weight: 800; word-break: break-all; }

@media (min-width: 560px) {
  .dzl-row { grid-template-columns: 1fr 1fr; }
  .dzl-card { padding: 30px; }
  .dzl-actions { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .dzl-stage { padding: 56px 0 72px; }
  .dzl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; }
  .dzl-grid--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
  .dzl-copy { display: block; }
  .dzl-card { margin: 0; }
}
