/* ============================================================
   MODALES LOGIN / REGISTER — Estilo ALAS
   Tarjeta azul con blur + full responsive
============================================================ */

/* === OVERLAY DEL MODAL === */
.login-modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 20px;
  background: rgba(0, 0, 0, 0.55);

  /* Scroll global del modal */
  overflow-y: auto;

  z-index: 9999;
}

.login-modal.hidden {
  display: none !important;
}

/* ============================================================
   TARJETA PRINCIPAL DE LOS MODALES
============================================================ */
.login-modal-content {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;

  background: rgba(0, 12, 49, 0.90);
  border: 1px solid rgba(255,255,255,0.18);

  padding: 32px 28px 22px;
  position: relative;

  display: flex;
  flex-direction: column;

  animation: fadeInUp 0.45s ease-out;
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
}

/* ============================================================
   X DE CIERRE (LOGIN Y REGISTRO)
============================================================ */
.login-close,
.register-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  color: #fff;

  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.40);

  cursor: pointer;
  z-index: 99999;
  opacity: 0.85;

  -webkit-tap-highlight-color: transparent;
}

.login-close:hover,
.register-close:hover {
  opacity: 1;
}

/* ============================================================
   LOGO + TÍTULO
============================================================ */
.login-logo {
  width: 130px;
  margin: 0 auto 10px;
  filter: brightness(0) invert(1);
}

.login-modal-content h2 {
  color: #fff;
  font-weight: 600;
  font-size: 26px;
  margin-bottom: 20px;
  text-align: center;
}

/* ============================================================
   INPUTS Y SELECTS
============================================================ */
.login-modal-content input,
.login-modal-content select {
  width: 100%;
  padding: 12px 14px;

  margin: 10px 0;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  color: #fff;

  outline: none;
  font-size: 15px;

  transition: border .25s, box-shadow .25s;
}

.login-modal-content input::placeholder {
  color: rgba(255,255,255,0.65);
}

.login-modal-content input:focus,
.login-modal-content select:focus {
  border-color: #4da3ff;
  box-shadow: 0 0 8px rgba(77,163,255,0.45);
}

/* ============================================================
   TOGGLE PASSWORD (OJO)
============================================================ */
.input-password-wrapper {
  position: relative;
  width: 100%;
}

.input-password-wrapper input {
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 5;
}

.toggle-password i {
  font-size: 18px;
  color: #fff;
  opacity: 0.8;
}

.toggle-password:hover i {
  opacity: 1;
}

/* ============================================================
   BOTÓN PRINCIPAL
============================================================ */
.btn-primary.full {
  width: 100%;
  padding: 13px;
  margin-top: 12px;

  background: linear-gradient(90deg, #007BFF, #0044CC);
  border: none;
  border-radius: 12px;

  color: #fff;
  font-size: 16px;
  font-weight: 600;

  cursor: pointer;
  transition: .25s ease;
}

.btn-primary.full:hover {
  background: linear-gradient(90deg, #0056d8, #003b9c);
  box-shadow: 0 0 18px rgba(0,123,255,0.55);
}

/* ============================================================
   TEXTO BAJO LOS FORMULARIOS
============================================================ */
.login-register-text {
  text-align: center;
  margin-top: 14px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.login-register-text a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.login-subview.is-hidden {
  display: none;
}

.forgot-link {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.forgot-description {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  margin-bottom: 12px;
}

.btn-ghost.full {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.45);
  background: transparent;
  color: #fff;
  font-size: 15px;
  margin-top: 10px;
  cursor: pointer;
}

.btn-ghost.full:hover {
  background: rgba(255,255,255,0.12);
}

/* ============================================================
   REGISTRO — SCROLL INTERNO DESACTIVADO
============================================================ */
/* eliminar scroll interno */
.register-modal-scroll {
  overflow: visible !important;
  max-height: none !important;
  flex: none !important;
}

/* baja el modal en móviles */
#registerModal.login-modal {
  align-items: flex-start;
}

#registerModal .login-modal-content.register-modal-content {
  margin-top: 40px;
}

@media (max-width: 480px) {
  #registerModal .login-modal-content.register-modal-content {
    margin-top: 55px;
  }
}

/* ============================================================
   SWEETALERT ESTÉTICO
============================================================ */
.swal2-container {
  z-index: 20000 !important;
}

.swal2-popup {
  border-radius: 14px;
  font-family: 'Poppins', sans-serif;
}

.swal2-confirm {
  min-width: 120px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
}

/* ============================================================
   ANIMACIONES
============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 480px) {
  .login-modal-content {
    padding: 28px 24px 18px;
  }

  .login-logo {
    width: 110px;
  }
}

/* ============================================================
   ESTILO ESPECIAL PARA EL CHECKBOX DE POLÍTICAS EN REGISTRO
============================================================ */

#registerModal .terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;

  font-size: 13px;
  line-height: 1.4;
  color: #ffffff;
}

#registerModal .terms-text {
  color: #ffffff;
}

#registerModal .terms-text a {
  color: #ffffff;
  text-decoration: underline;
}

/* Checkbox custom */
#registerModal .terms input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;

  width: 18px;
  height: 18px;
  margin-top: 2px;

  border-radius: 4px;
  border: 2px solid #ffffff;
  background: transparent;

  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

/* Focus accesible */
#registerModal .terms input[type="checkbox"]:focus {
  outline: 2px solid #E0A800;
  outline-offset: 2px;
}

/* Estado marcado */
#registerModal .terms input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #007BFF, #0044CC);
  border-color: #E0A800;
}

/* Palomita */
#registerModal .terms input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px 4px 4px 5px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(40deg);
}

/* Responsive en móviles */
@media (max-width: 480px) {
  #registerModal .terms {
    font-size: 12px;
    gap: 6px;
  }

  #registerModal .terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}
