/* Acceso único (flag acceso_unico, spec 2026-11-16, mockup acceso-flujo.html).
   Pantalla de /users/sign_in y de users/passwords con el estanque del Reto V2.
   Se carga solo en esas pantallas (content_for :head), ANTES que Pico y que
   dry_v2.css: por eso las reglas llevan `.acceso.v2-screen` delante, para ganarle
   a Pico (input:not(...), [type=submit]:hover, dialog) por especificidad. */

/* ---- Pantalla ---- */
.acceso.v2-screen { max-width: 440px; gap: 14px; }
/* Aire bajo el logo: 8px + el gap de 14px de la pantalla = 22px hasta el texto que siga (h1 o subtítulo). */
.acceso-logo { display: flex; justify-content: center; padding-top: 6px; margin-bottom: 8px; }
.acceso-logo img { display: block; width: 128px; height: auto; filter: drop-shadow(0 2px 8px rgba(3, 7, 11, 0.8)); }
.acceso-contenido, .acceso-frame, .acceso-paso { display: flex; flex-direction: column; flex: 1; }
.acceso-frame { gap: 12px; }
.acceso-paso { gap: 14px; }
.acceso-head { display: flex; flex-direction: column; gap: 6px; text-align: center; }

.acceso.v2-screen .acceso-title { margin: 0; color: var(--v2-ink); font-size: 26px; line-height: 1.2; font-weight: 700; text-wrap: balance; text-shadow: 0 1px 2px rgba(3, 7, 11, 0.95), 0 0 16px rgba(3, 7, 11, 0.85); }
.acceso.v2-screen .acceso-sub { margin: 0; color: var(--v2-muted); font-size: 17px; line-height: 1.4; text-wrap: pretty; text-shadow: 0 1px 2px rgba(3, 7, 11, 0.95), 0 0 16px rgba(3, 7, 11, 0.85); }
/* Un h1 que se ve como el subtítulo (paso contraseña): misma letra, peso y color que .acceso-sub. */
.acceso.v2-screen .acceso-title.acceso-title-sub { color: var(--v2-muted); font-size: 17px; font-weight: 400; line-height: 1.4; letter-spacing: normal; text-wrap: pretty; text-shadow: 0 1px 2px rgba(3, 7, 11, 0.95), 0 0 16px rgba(3, 7, 11, 0.85); }
.acceso.v2-screen .acceso-sub strong { color: var(--v2-ink); font-weight: 700; overflow-wrap: anywhere; }
/* «No hay ninguna cuenta con / correo / ¿Lo escribiste bien?», en tres renglones. */
.acceso.v2-screen .acceso-sub-correo strong { display: block; margin: 2px 0; }

/* ---- Bloque del formulario: directo sobre el agua, sin tarjeta de vidrio (como los campos
   del Reto); así el único marco es el del campo. ---- */
.acceso.v2-screen .acceso-card { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.acceso.v2-screen .acceso-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
/* Etiqueta = la del campo del Reto (.v2-field label.v2-muted): normal, 16px, a 6px del campo. */
.acceso.v2-screen .acceso-label { display: block; margin: 0 0 -6px; color: var(--v2-muted); font-size: 16px; font-weight: 400; letter-spacing: normal; text-transform: none; text-shadow: 0 1px 2px rgba(3, 7, 11, 0.95), 0 0 16px rgba(3, 7, 11, 0.85), 0 0 30px rgba(3, 7, 11, 0.6); }

/* ---- Campos: los valores de .v2-input del Reto (crear grupo), con la especificidad
   necesaria para que Pico no les meta su margen ni su anillo. ---- */
.acceso.v2-screen input.acceso-input { width: 100%; height: auto; min-height: 56px; margin: 0; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--v2-line); background: rgba(0, 0, 0, 0.25); color: var(--v2-ink); font: inherit; font-size: 24px; box-shadow: none; }
.acceso.v2-screen input.acceso-input::placeholder { color: rgba(238, 235, 227, 0.45); opacity: 1; }
/* Un solo marco al enfocar: el borde dorado. Sin outline ni el anillo azul de Pico (box-shadow). */
.acceso.v2-screen input.acceso-input:focus { border-color: var(--v2-gold); outline: none; box-shadow: none; }
.acceso.v2-screen input.acceso-input:-webkit-autofill { -webkit-text-fill-color: var(--v2-ink); -webkit-box-shadow: inset 0 0 0 60px #0d1823; caret-color: var(--v2-ink); }

.acceso.v2-screen .acceso-otp { display: flex; justify-content: center; gap: 6px; }
.acceso.v2-screen input.acceso-digito { flex: 1 1 0; min-width: 0; max-width: 52px; height: 58px; margin: 0; padding: 0; border-radius: 14px; border: 1.5px solid var(--v2-line); background: rgba(0, 0, 0, 0.25); color: var(--v2-ink); font: 600 24px var(--v2-mono, ui-monospace, Menlo, monospace); text-align: center; box-shadow: none; }
.acceso.v2-screen input.acceso-digito:focus { border-color: var(--v2-gold); outline: none; box-shadow: none; }

/* ---- Botones ---- */
.acceso.v2-screen .acceso-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; margin: 0; padding: 0 18px; border: 0; border-radius: 16px; font: inherit; font-size: 18px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
/* Idéntico al botón principal del Reto (.v2-btn.v2-primary del rediseño Alberca, dry_v2.css):
   degradado suave de dos tonos, sombra dorada, 56px, radio 18px y 20px de letra. También en
   :hover/:focus/:active, donde Pico cambia sus variables de fondo, borde y sombra. */
.acceso.v2-screen .acceso-btn-oro, .acceso.v2-screen .acceso-btn-oro:is(:hover, :focus, :active) { min-height: 56px; padding: 0 20px; border: 0; border-radius: 18px; background: linear-gradient(180deg, var(--v2-gold-hi), var(--v2-gold)); color: var(--v2-gold-ink); font-size: 20px; font-weight: 700; box-shadow: 0 6px 18px rgba(205, 175, 95, 0.28); text-shadow: none; }
.acceso.v2-screen .acceso-btn-oro:hover { filter: brightness(1.05); }
.acceso.v2-screen .acceso-btn-vidrio { background: rgba(0, 0, 0, 0.2); color: var(--v2-ink); border: 1.5px solid var(--v2-line); box-shadow: none; }
.acceso.v2-screen .acceso-btn:disabled { opacity: 0.7; cursor: progress; }
.acceso.v2-screen form.button_to:has(> .acceso-btn) { margin: 0; }

/* ---- Enlaces (contraseña, cambiar correo, olvidé) ---- */
.acceso.v2-screen .acceso-link { display: inline-flex; align-items: center; justify-content: center; align-self: center; width: auto; min-height: 48px; margin: 0; padding: 0 12px; border: 0; background: none; box-shadow: none; color: var(--v2-blue-ink); font: inherit; font-size: 17px; font-weight: 500; text-decoration: none; cursor: pointer; text-shadow: 0 1px 2px rgba(3, 7, 11, 0.95); }
.acceso.v2-screen .acceso-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.acceso.v2-screen .acceso-link-chico { font-size: 16px; }
.acceso-pie { display: flex; justify-content: center; margin-top: auto; padding-top: 4px; }

.acceso.v2-screen :is(.acceso-btn, .acceso-link, .acceso-reenviar):focus-visible { outline: 2px solid var(--v2-gold-hi); outline-offset: 3px; }

/* ---- Notas y reenviar ---- */
/* Sin tarjeta detrás: la sombra de texto del Reto (.v2-muted) lo mantiene legible sobre el agua. */
.acceso.v2-screen .acceso-nota { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; margin: 0; color: var(--v2-muted); font-size: 15px; line-height: 1.4; text-align: center; text-shadow: 0 1px 2px rgba(3, 7, 11, 0.95), 0 0 16px rgba(3, 7, 11, 0.85), 0 0 30px rgba(3, 7, 11, 0.6); }
.acceso.v2-screen .acceso-nota-izq { justify-content: flex-start; margin-top: -4px; text-align: left; }
.acceso.v2-screen form.acceso-form-inline { display: inline; margin: 0; }
/* En teléfonos angostos «Vence en 5 minutos» y «Reenviar en 0:42» van en dos renglones, sin punto. */
@media (max-width: 374px) {
  .acceso.v2-screen .acceso-nota:has(.acceso-reenviar) { flex-direction: column; }
  .acceso-nota-sep { display: none; }
}
.acceso.v2-screen .acceso-reenviar { display: inline-flex; align-items: center; width: auto; min-height: 48px; margin: 0; padding: 0 4px; border: 0; background: none; box-shadow: none; color: var(--v2-blue-ink); font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.acceso.v2-screen .acceso-reenviar:disabled { opacity: 1; color: var(--v2-muted); text-decoration: none; cursor: default; }

/* ---- Avisos y errores (dentro del frame; el layout no pinta los suyos) ---- */
.acceso.v2-screen :is(.acceso-aviso, .acceso-error) { margin: 0; padding: 12px 14px; border-radius: 14px; color: var(--v2-ink); font-size: 16px; line-height: 1.4; text-align: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.acceso.v2-screen .acceso-aviso { background: rgba(10, 40, 28, 0.78); border: 1px solid rgba(79, 207, 138, 0.45); }
.acceso.v2-screen .acceso-error { background: rgba(48, 12, 14, 0.8); border: 1px solid rgba(255, 123, 123, 0.55); }

/* ---- Apple y Google: los parciales traen estilos inline (HIG, blanco); aquí solo
   se acomodan al ancho de la tarjeta, con el alto y el radio del resto. ---- */
.acceso-oauth { display: flex; flex-direction: column; gap: 10px; }
.acceso-oauth:empty { display: none; }
.acceso.v2-screen .acceso-oauth :is(.apple-oauth, .google-oauth) { margin: 0 !important; max-width: none !important; }
.acceso.v2-screen .acceso-oauth :is(.apple-oauth, .google-oauth) > div:first-child { margin-bottom: 12px !important; color: var(--v2-muted) !important; font-size: 15px !important; }
.acceso.v2-screen .acceso-oauth form { margin: 0 !important; }
.acceso.v2-screen .acceso-oauth button { min-height: 50px; margin: 0; border-radius: 16px !important; font-size: 17px !important; }

/* ---- Skeleton (mockup, pantalla 5) ---- */
.acceso-skeleton { display: none; flex-direction: column; gap: 12px; flex: 1; }
.acceso[data-acceso-cargando] .acceso-contenido { display: none; }
.acceso[data-acceso-cargando] .acceso-skeleton { display: flex; }
.acceso-sk { display: block; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.07) 25%, rgba(255, 255, 255, 0.17) 37%, rgba(255, 255, 255, 0.07) 63%); background-size: 400% 100%; animation: acceso-sk 1.4s ease infinite; }
.acceso-sk-title { align-self: center; width: 70%; height: 28px; }
.acceso-sk-sub { align-self: center; width: 85%; height: 16px; margin-bottom: 4px; }
.acceso-sk-label { width: 30%; height: 14px; }
.acceso-sk-input { height: 52px; border-radius: 14px; }
.acceso-sk-btn { height: 54px; border-radius: 16px; }
.acceso-sk-oauth { height: 50px; border-radius: 16px; }
.acceso-sk-oauth-1 { margin-top: 22px; }
.acceso-sk-link { align-self: center; width: 50%; height: 16px; margin-top: auto; margin-bottom: 16px; }
@keyframes acceso-sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .acceso-sk { animation: none; } }

.acceso-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- «Olvidé mi contraseña»: hoja desde abajo en el teléfono, centrada en escritorio.
   Pico hace del <dialog> una capa de pantalla completa (min-width/min-height 100%). ---- */
.acceso.v2-screen dialog.acceso-hoja { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 480px; min-width: 0; height: auto; min-height: 0; max-height: 90dvh; margin: 0 auto; padding: 0; overflow: auto; border: 1px solid var(--v2-line); border-bottom: 0; border-radius: 24px 24px 0 0; background: #0c1722; color: var(--v2-ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.acceso.v2-screen dialog.acceso-hoja[open] { display: block; }
.acceso.v2-screen dialog.acceso-hoja::backdrop { background: rgba(0, 0, 0, 0.6); }
.acceso-hoja-cuerpo { display: flex; flex-direction: column; gap: 12px; padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.acceso-hoja-cuerpo::before { content: ""; align-self: center; width: 40px; height: 4px; margin-bottom: 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.acceso.v2-screen .acceso-hoja-titulo { font-size: 22px; }
.acceso-hoja-cuerpo .acceso-form { text-align: left; }

/* Escritorio y tabletas: el bloque se centra en vertical, sin estirar el pie. */
@media (min-width: 700px) {
  .acceso.v2-screen { justify-content: center; }
  .acceso-contenido, .acceso-frame, .acceso-paso, .acceso-skeleton { flex: 0 0 auto; }
  .acceso-pie { margin-top: 4px; }
  .acceso-sk-link { margin-top: 8px; }
  .acceso.v2-screen dialog.acceso-hoja { inset: 0; height: fit-content; margin: auto; border-bottom: 1px solid var(--v2-line); border-radius: 20px; }
  .acceso.v2-screen dialog.acceso-hoja .acceso-hoja-cuerpo::before { display: none; }
  .acceso.v2-screen dialog.acceso-hoja .acceso-hoja-cuerpo { padding-top: 22px; }
}
