/* ===== Estilos de la aplicación ===== */

:root {
  --color-principal: #ff8800; /* Naranja de marca Kuyay */
  --color-principal-oscuro: #e5730a; /* Naranja más oscuro (hover) */
  --color-acento: #ffd21f; /* Amarillo de marca */
  --color-fondo: #fbf7f1; /* Crema cálido */
  --color-tarjeta: #ffffff;
  --color-texto: #2a2118; /* Marrón muy oscuro */
  --color-texto-suave: #7a6f63;
  --color-borde: #ece3d8;
  --color-exito: #15803d;
  --color-error: #b42318;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(120, 80, 20, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.5;
}

.selector-idioma {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 12px 12px 0;
}

.selector-idioma button {
  margin: 0;
  padding: 6px 10px;
  background: var(--color-tarjeta);
  color: var(--color-texto);
  border: 1px solid var(--color-borde);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.selector-idioma button:hover {
  border-color: var(--color-principal);
}

.selector-idioma button.activo {
  background: var(--color-principal);
  color: white;
  border-color: var(--color-principal);
}

.hero {
  text-align: center;
  padding: 0 20px 24px;
}

.banner {
  width: 100%;
  height: 200px;
  background-image: url("https://kuyay.co/wp-content/uploads/2025/07/Generated-Image-July-24-2025-6_27PM.jpeg");
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
}

.logo {
  display: block;
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin: -56px auto 14px;
  border: 4px solid #fff;
  background: #fff;
  box-shadow: 0 8px 22px rgba(255, 136, 0, 0.35);
}

@media (max-width: 460px) {
  .banner {
    height: 150px;
  }
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  color: var(--color-principal);
}

.hero p {
  margin: 0;
  color: var(--color-texto-suave);
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.tarjeta {
  background: var(--color-tarjeta);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.ayuda {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--color-texto-suave);
  background: #fff3e0;
  border-radius: 10px;
  padding: 10px 12px;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  margin-top: 12px;
}

input {
  padding: 12px 14px;
  border: 1px solid var(--color-borde);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: var(--color-principal);
}

details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  color: var(--color-principal);
  font-size: 0.9rem;
  font-weight: 600;
}

button {
  margin-top: 20px;
  padding: 14px;
  background: var(--color-principal);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover {
  background: var(--color-principal-oscuro);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Resultado ===== */

.resultado {
  margin-top: 24px;
}

.oculto {
  display: none;
}

.tarjeta-reserva {
  background: var(--color-tarjeta);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.tarjeta-reserva header {
  background: var(--color-principal);
  color: white;
  padding: 18px 22px;
}

.tarjeta-reserva header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.tarjeta-reserva header span {
  font-size: 0.85rem;
  opacity: 0.9;
}

.cuerpo-reserva {
  padding: 22px;
}

.fila {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-borde);
  gap: 12px;
}

.fila:last-child {
  border-bottom: none;
}

.fila .etiqueta {
  color: var(--color-texto-suave);
  font-size: 0.9rem;
}

.fila .valor {
  font-weight: 600;
  text-align: right;
}

.etiqueta-estado {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.estado-si {
  background: #dcfce7;
  color: var(--color-exito);
}

.estado-no {
  background: #fee2e2;
  color: var(--color-error);
}

/* ===== Sección de disponibilidad ===== */

.disponibilidad {
  margin-top: 24px;
}

.disponibilidad h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: var(--color-principal);
}

.botones-hostels {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.boton-hostel {
  flex: 1;
  display: block;
  padding: 16px 12px;
  background: #fff3e0;
  color: var(--color-principal);
  border: 2px solid var(--color-principal);
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
}

.boton-hostel:hover {
  background: var(--color-principal);
  color: white;
}

/* En pantallas pequeñas, los botones se apilan */
@media (max-width: 460px) {
  .botones-hostels {
    flex-direction: column;
  }
}

.boton-checkin {
  display: block;
  margin-top: 18px;
  padding: 14px;
  background: var(--color-principal);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.15s;
}

.boton-checkin:hover {
  background: var(--color-principal-oscuro);
}

.checkin-listo {
  margin-top: 18px;
  text-align: center;
  color: var(--color-exito);
  font-weight: 600;
}

.mensaje {
  background: var(--color-tarjeta);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 24px;
  text-align: center;
  color: var(--color-texto-suave);
}

.mensaje.error {
  border-color: #fca5a5;
  color: var(--color-error);
}

footer {
  text-align: center;
  padding: 24px;
  color: var(--color-texto-suave);
  font-size: 0.85rem;
}

/* ===== Sección de pagos ===== */

.pagos {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px dashed var(--color-borde);
}

.pagos h3 {
  margin: 0 0 4px;
  color: var(--color-error);
}

.botones-pago {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.boton-pago {
  margin: 0;
  padding: 16px 10px;
  background: var(--color-tarjeta);
  color: var(--color-principal);
  border: 2px solid var(--color-principal);
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.boton-pago:hover {
  background: var(--color-principal);
  color: white;
}

/* ===== Ventana modal de pago ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
}

.modal-overlay.oculto {
  display: none;
}

.modal-card {
  position: relative;
  background: var(--color-tarjeta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 22px 22px;
}

.modal-cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  margin: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--color-fondo);
  color: var(--color-texto);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.modal-contenido h2 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 1.3rem;
}

.monto-grande {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-principal);
  margin: 6px 0;
}

.datos-pago {
  background: var(--color-fondo);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
}

.datos-pago p {
  margin: 0 0 12px;
}

.datos-pago p:last-child {
  margin-bottom: 0;
}

.a-nombre {
  display: block;
  font-size: 0.85rem;
  color: var(--color-texto-suave);
}

.aviso-recargo {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.nota-tasa {
  font-size: 0.82rem;
  color: var(--color-texto-suave);
  text-align: center;
}

.reporte-titulo {
  margin-top: 18px;
  text-align: center;
  font-weight: 600;
}

.qr {
  display: block;
  width: 200px;
  max-width: 80%;
  height: auto;
  margin: 10px auto;
  border-radius: 10px;
  border: 1px solid var(--color-borde);
}

.qr-bloque {
  text-align: center;
  margin-top: 16px;
}

.qr-texto {
  margin: 8px 0 0;
  font-weight: 600;
  color: var(--color-texto);
}

.boton-whatsapp,
.boton-pago-accion,
.boton-finalizar {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.boton-whatsapp {
  background: #25d366;
  color: white;
}

.boton-pago-accion {
  background: var(--color-principal);
  color: white;
}

.boton-finalizar {
  background: var(--color-fondo);
  color: var(--color-texto);
  border: 1px solid var(--color-borde);
}

.error-trm {
  color: var(--color-error);
  text-align: center;
}

/* En pantallas pequeñas, los botones de pago se apilan. */
@media (max-width: 460px) {
  .botones-pago {
    grid-template-columns: 1fr;
  }
}

/* ===== Teclado en pantalla (isla de registro táctil) ===== */

#teclado-tactil {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e9edf5;
  padding: 10px;
  box-shadow: 0 -6px 24px rgba(20, 30, 60, 0.18);
  z-index: 1000;
  transition: transform 0.25s ease;
}

/* Cuando está oculto, se desliza hacia abajo fuera de la pantalla. */
#teclado-tactil.teclado-oculto {
  transform: translateY(110%);
}

#teclado-tactil .simple-keyboard {
  max-width: 920px;
  margin: 0 auto;
  background: transparent;
}

/* Teclas grandes y cómodas para tocar con el dedo. */
#teclado-tactil .hg-button {
  height: 56px;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Margen inferior extra para que el teclado no tape el contenido. */
body.con-teclado {
  padding-bottom: 320px;
}
