/* Oaxaca Renta · cuenta (todas las pantallas)
   Diálogo «Inicia sesión o regístrate» medido en airbnb.mx (28-oct-2026): 568 px de ancho, radio 12,
   cabeza de 64 px con el título al centro, campos agrupados en una caja de radio 8 con filas de
   56 px y etiqueta chica arriba. En teléfono ocupa toda la pantalla. */

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

/* Círculo de cuenta con la inicial */
.circulo--avatar { background: var(--texto); color: var(--blanco); font-size: 15px; font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .circulo--avatar:hover { background: #000; } }

/* Menú con sesión */
.menu__hola { margin: 0; padding: 8px 16px 4px; font-size: 12px; color: var(--texto-2); }
.menu .menu__fuerte { font-weight: 600; }
.menu button[role="menuitem"] { display: block; width: 100%; padding: 12px 16px; text-align: left; font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .menu button[role="menuitem"]:hover { background: var(--gris-1); } }

/* Botón redondo sin relleno (cerrar, volver) */
.circulo-plano {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out);
}
.circulo-plano svg { width: 14px; height: 14px; }
.circulo-plano:active { transform: scale(.92); }
@media (hover: hover) and (pointer: fine) { .circulo-plano:hover { background: var(--gris-1); } }

.enlace-sub {
  padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.enlace-sub:disabled { color: var(--texto-3); font-weight: 500; text-decoration: none; cursor: default; }

/* Botón principal con degradado del acento (Reservar, Continuar, Solicitar apartado) */
.boton-reservar {
  position: relative; display: block;
  width: 100%; height: 48px; margin-top: 16px;
  border-radius: var(--r-pildora);
  background: linear-gradient(to right, var(--acento-claro) 0%, var(--acento) 50%, var(--acento-oscuro) 100%);
  color: var(--blanco); font-size: 16px; font-weight: 600;
  transition: transform var(--dur-press) var(--ease-out), filter var(--dur-fast) ease;
}
.boton-reservar:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .boton-reservar:hover { filter: brightness(.96); } }

/* Con espera: el texto se aparta y gira un anillo */
.boton-reservar[data-cargando] { color: transparent; pointer-events: none; }
.boton-reservar[data-cargando]::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / .35); border-top-color: var(--blanco);
  animation: girar 700ms linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Diálogo ---------- */

.acceso-dialogo {
  width: min(568px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 64px);
  padding: 0; border: 0; border-radius: var(--r-12);
  background: var(--blanco); color: var(--texto);
  box-shadow: 0 8px 28px rgb(0 0 0 / .28);
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur-exit) var(--ease-in), transform var(--dur-exit) var(--ease-in);
}
.acceso-dialogo[open] { display: flex; flex-direction: column; }
.acceso-dialogo[data-visible] {
  opacity: 1; transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform 320ms var(--ease-drawer);
}
.acceso-dialogo::backdrop { background: rgb(0 0 0 / .5); opacity: 0; transition: opacity var(--dur-exit) var(--ease-in); }
.acceso-dialogo[data-visible]::backdrop { opacity: 1; transition: opacity var(--dur-slow) var(--ease-out); }
body:has(.acceso-dialogo[open]) { overflow: hidden; }

.acceso-dialogo__cabeza {
  position: relative; flex: none;
  display: flex; align-items: center; justify-content: center;
  height: 64px; padding: 0 24px; border-bottom: 1px solid var(--borde-2);
}
.acceso-dialogo__cabeza .circulo-plano { position: absolute; left: 20px; top: 16px; }
.acceso-dialogo__cabeza h1 { font-size: 16px; font-weight: 800; }
.acceso-dialogo__cuerpo { overflow-y: auto; overscroll-behavior: contain; padding: 24px; }

/* ---------- Formulario por pasos ---------- */

.acceso { display: flex; flex-direction: column; }
.acceso > .boton-reservar { margin-top: 20px; border-radius: var(--r-12); }
.acceso__bienvenida { margin: 8px 0 24px; font-size: 22px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.acceso__texto { margin: 0 0 20px; font-size: 16px; line-height: 22px; }
.acceso__nota { margin: 10px 0 0; font-size: 12px; line-height: 16px; color: var(--texto); }
.acceso__ayuda { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--texto-2); }
.acceso__legal { margin: 24px 0 0; font-size: 12px; line-height: 16px; }
.acceso__legal a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.acceso__pista, .acceso__error {
  display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0;
  font-size: 12px; line-height: 16px;
}
.acceso__pista { color: var(--texto-2); }
.acceso__error { color: #C13515; font-weight: 500; }
.acceso__pista span, .acceso__error span { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.acceso__reenviar { margin: 16px 0 0; font-size: 14px; color: var(--texto-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.acceso__reenviar .enlace-sub { color: var(--texto); }
.acceso__reenviar .enlace-sub:disabled { color: var(--texto-3); }
.acceso fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.acceso fieldset + fieldset { margin-top: 20px; }
.acceso legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }

/* Entrar con celular o correo */
.acceso__via { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: 16px; }
.acceso__via button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; font-size: 14px; }
.acceso__via svg { width: 16px; height: 16px; }

/* Por dónde llega el código */
.canal { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.canal legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.canal__opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.canal__opcion {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px; border: 1px solid var(--borde); border-radius: 8px;
  font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.canal__opcion input { position: absolute; opacity: 0; pointer-events: none; }
.canal__opcion span { width: 18px; height: 18px; flex: none; }
.canal__opcion:has(input:checked) { border-color: var(--texto); box-shadow: inset 0 0 0 1px var(--texto); background: var(--gris-1); }
.canal__opcion:has(input:focus-visible) { outline: 2px solid var(--texto); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .canal__opcion:hover { border-color: var(--texto); } }

/* Caja de campos agrupados */
.campos {
  border: 1px solid #B0B0B0; border-radius: 8px;
  transition: border-color var(--dur-fast) ease;
}
.campos__fila {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 6px 12px;
  border-radius: 8px;
  transition: box-shadow var(--dur-fast) ease;
}
.campos__fila + .campos__fila { border-top: 1px solid #B0B0B0; border-radius: 0 0 8px 8px; }
.campos__fila:first-child:not(:last-child) { border-radius: 8px 8px 0 0; }
.campos__fila:focus-within { box-shadow: 0 0 0 2px var(--texto); z-index: 1; }
.campos__etiqueta { font-size: 12px; line-height: 16px; color: var(--texto-2); }
.campos input, .campos select {
  width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 16px; line-height: 22px; color: var(--texto);
  appearance: none; -webkit-appearance: none;
}
.campos input::placeholder { color: var(--texto-3); }
.campos input[type="date"] { min-height: 22px; }
.campos__fila--lista { padding-right: 40px; }
.campos__flecha { position: absolute; right: 16px; top: 50%; width: 14px; height: 14px; margin-top: -7px; pointer-events: none; }
.campos__tel { display: flex; align-items: baseline; gap: 6px; font-size: 16px; }
.campos__tel > span { color: var(--texto-2); }
.campos--error { border-color: #C13515; background: #FFF8F6; }
.campos--error .campos__fila + .campos__fila { border-top-color: #E8B8AB; }
.campos__fila--error .campos__etiqueta { color: #C13515; }

/* Código de 6 dígitos */
.codigo { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 384px; }
.codigo__caja {
  width: 100%; height: 56px; padding: 0; text-align: center;
  border: 1px solid #B0B0B0; border-radius: 8px; outline: none;
  font: 600 22px/1 var(--fuente); font-variant-numeric: tabular-nums; color: var(--texto);
  caret-color: var(--acento);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.codigo__caja:focus { border-color: var(--texto); box-shadow: inset 0 0 0 1px var(--texto); }
.codigo--error .codigo__caja { border-color: #C13515; background: #FFF8F6; }

@media (max-width: 743px) {
  .acceso-dialogo {
    width: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0;
    inset: 0;
  }
  .acceso-dialogo__cabeza { height: 56px; }
  .acceso-dialogo__cabeza .circulo-plano { left: 12px; top: 12px; }
  .acceso-dialogo__cuerpo { padding: 20px 24px calc(24px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .acceso-dialogo, .acceso-dialogo::backdrop { transition-property: opacity !important; transform: none !important; }
  .boton-reservar[data-cargando]::after { animation-duration: 1400ms; }
}
