@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body,
input {
  font-family: "Poppins", sans-serif;
}

main {
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background-color: #cff2ab;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.box {
  position: relative;
  width: 100%;
  max-width: 1020px;
  height: 640px;
  background-color: #fff;
  border-radius: 3.3rem;
  box-shadow: 0 60px 40px -30px rgba(0, 0, 0, 0.27);
}

.inner-box {
  position: absolute;
  width: calc(100% - 4.1rem);
  height: calc(100% - 4.1rem);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.forms-wrap {
  position: absolute;
  height: 100%;
  width: 45%;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  transition: 0.8s ease-in-out;
}

form {
  max-width: 260px;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  transition: opacity 0.02s 0.4s;
}

form.sign-up-form {
  opacity: 0;
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  /* Alinea verticalmente */
  gap: 0.5rem;
  /* Espaciado entre el logo y el texto */
}


.logo img {
  width: 30px;
  /* Ajusta el tamaño según necesites */
  height: auto;
}


.logo h4 {
  font-size: 1.2rem;
  /* Tamaño adecuado del texto */
  font-weight: 600;
  margin: 0;
  /* Evita márgenes innecesarios */
}


.heading h2 {
  font-size: 2.1rem;
  font-weight: 600;
  color: #151111;
}

.heading h6 {
  color: #bababa;
  font-weight: 400;
  font-size: 0.75rem;
  display: inline;
}

.toggle {
  color: #151111;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: 0.3s;
}

.toggle:hover {
  color: #8371fd;
}

.input-wrap {
  position: relative;
  height: 37px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #bbb; /* Línea inferior gris por defecto */
  display: flex;
  align-items: center;
}

.input-field {
  position: absolute;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: #151111;
  transition: 0.4s;
  padding: 0;
}

/* Cuando el input está enfocado */
.input-wrap:focus-within {
  border-bottom: 1px solid black; /* Línea negra cuando está activo */
}

label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #6a6a6a;
  pointer-events: none;
  transition: 0.4s;
}

.input-field.active {
  border-bottom-color: #151111;
}

.input-field.active+label {
  font-size: 0.75rem;
  top: -2px;
}

.sign-btn {
  display: inline-block;
  width: 100%;
  height: 43px;
  background-color: #151111;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 0.8rem;
  font-size: 0.8rem;
  margin-bottom: 2rem;
  transition: 0.3s;
}

.sign-btn:hover {
  background-color: #059268f8;
}

.text {
  color: #bbb;
  font-size: 0.7rem;
}

.text a {
  color: #bbb;
  transition: 0.3s;
}

.text a:hover {
  color: #8371fd;
}

main.sign-up-mode form.sign-in-form {
  opacity: 0;
  pointer-events: none;
}

main.sign-up-mode form.sign-up-form {
  opacity: 1;
  pointer-events: all;
}

main.sign-up-mode .forms-wrap {
  left: 55%;
}

main.sign-up-mode .carousel {
  left: 0%;
}

.carousel {
  position: absolute;
  height: 100%;
  width: 55%;
  left: 45%;
  top: 0;
  background-color: hsla(165.8, 57%, 39.2%, 0.52);
  border-radius: 2rem;
  display: grid;
  grid-template-rows: auto 1fr;
  padding-bottom: 2rem;
  overflow: hidden;
  transition: 0.8s ease-in-out;
}

.images-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.image {
  width: 100%;
  grid-column: 1/2;
  grid-row: 1/2;
  opacity: 0;
  transition: opacity 0.3s, transform 0.5s;
}

.img-1 {
  transform: translate(0, -50px);
}

.img-2 {
  transform: scale(0.4, 0.5);
}

.img-3 {
  transform: scale(0.3) rotate(-20deg);
}

.image.show {
  opacity: 1;
  transform: none;
}

.text-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.text-wrap {
  max-height: 2.2rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.text-group {
  display: flex;
  flex-direction: column;
  text-align: center;
  transform: translateY(0);
  transition: 0.5s;
}

.text-group h2 {
  line-height: 2.2rem;
  font-weight: 600;
  font-size: 1.6rem;
}

.bullets {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bullets span {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  background-color: #aaa;
  margin: 0 0.25rem;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.bullets span.active {
  width: 1.1rem;
  background-color: #151111;
  border-radius: 1rem;
}

@media (max-width: 850px) {
  .box {
    height: auto;
    max-width: 550px;
    overflow: hidden;
  }

  .inner-box {
    position: static;
    transform: none;
    width: revert;
    height: revert;
    padding: 2rem;
  }

  .forms-wrap {
    position: revert;
    width: 100%;
    height: auto;
  }

  form {
    max-width: revert;
    padding: 1.5rem 2.5rem 2rem;
    transition: transform 0.8s ease-in-out, opacity 0.45s linear;
  }

  .heading {
    margin: 2rem 0;
  }

  form.sign-up-form {
    transform: translateX(100%);
  }

  main.sign-up-mode form.sign-in-form {
    transform: translateX(-100%);
  }

  main.sign-up-mode form.sign-up-form {
    transform: translateX(0%);
  }

  .carousel {
    position: revert;
    height: auto;
    width: 100%;
    padding: 3rem 2rem;
    display: flex;
  }

  .images-wrapper {
    display: none;
  }

  .text-slider {
    width: 100%;
  }
}

@media (max-width: 530px) {
  main {
    padding: 1rem;
  }

  .box {
    border-radius: 2rem;
  }

  .inner-box {
    padding: 1rem;
  }

  .carousel {
    padding: 1.5rem 1rem;
    border-radius: 1.6rem;
  }

  .text-wrap {
    margin-bottom: 1rem;
  }

  .text-group h2 {
    font-size: 1.2rem;
  }

  form {
    padding: 1rem 2rem 1.5rem;
  }
}

/* ===== Contenedor de carga de imagen ===== */
.upload-container {
  text-align: center;
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
  margin-top: -10px;
}

/* ===== Caja de carga de imagen ===== */
.upload-box {
  cursor: pointer;
  user-select: none;
  border: 2px dashed #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: 8px;
  transition: border 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
  padding: 10px;
  width: 100%;
  min-height: 50px; /* 🔹 Mantener un tamaño mínimo */
  flex-direction: column;
  text-align: center;
}

/* ===== Cuando un archivo es seleccionado, ajustar la altura ===== */
.upload-box.filled {
  height: auto; /* 🔹 Se ajusta dinámicamente al contenido */
}

/* ===== Efecto Hover ===== */
.upload-box:hover {
  border-color: #007bff;
}

/* ===== Contenido dentro de la caja de carga ===== */
.upload-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Icono de carga ===== */
.upload-box img#upload-icon {
  width: 30px;
  height: auto;
}

/* ===== Texto de instrucción ===== */
.upload-instruction {
  font-size: 12px;
  margin: 0;
  color: #666;
}

/* ===== Ocultar el input real ===== */
input[type="file"] {
  display: none;
}

/* ===== Mostrar el nombre del archivo seleccionado ===== */
.file-name {
  font-size: 14px;
  color: #333;
  margin-top: 5px;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* 🔹 Si el nombre es largo, mostrará "..." */
  display: block;
  font-weight: 500;
}

/* ========================== */
/* 🔹 ALERTA DE ÉXITO (Registro enviado) */
/* ========================== */
.success-alert {
  border-radius: 16px !important;
  /* Bordes redondeados */
  padding: 20px !important;
  background: #ffffff !important;
  /* Fondo blanco */
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2) !important;
  /* Sombra elegante */
  border: none !important;
  width: 90% !important;
  /* Responsivo en móviles */
  max-width: 400px !important;
  /* Máximo tamaño */
}

.success-alert-title {
  font-size: 22px !important;
  font-weight: bold !important;
  color: #2D9C6A !important;
  /* Verde éxito */
}

.success-alert-button {
  background-color: #28a745 !important;
  /* Verde éxito */
  color: #fff !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  padding: 10px 20px !important;
  transition: all 0.3s ease-in-out !important;
}

.success-alert-button:hover {
  background-color: #218838 !important;
}

/* ========================== */
/* 🔹 ALERTA DE ERROR (Fallo en el envío) */
/* ========================== */
.error-alert {
  border-radius: 16px !important;
  padding: 20px !important;
  background: #fff !important;
  box-shadow: 0px 8px 20px rgba(255, 0, 0, 0.2) !important;
  /* Sombra roja */
  border: 2px solid #e63946 !important;
  /* Borde rojo */
  width: 90% !important;
  max-width: 400px !important;
}

.error-alert-title {
  font-size: 22px !important;
  font-weight: bold !important;
  color: #e63946 !important;
  /* Rojo de error */
}

.error-alert-button {
  background-color: #e63946 !important;
  /* Rojo */
  color: #fff !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  padding: 10px 20px !important;
  transition: all 0.3s ease-in-out !important;
}

.error-alert-button:hover {
  background-color: #c71f32 !important;
}

/* ========================== */
/* 🔹 ALERTA DE CARGA (Esperando envío) */
/* ========================== */
.loading-alert {
  border-radius: 16px !important;
  padding: 20px !important;
  background: #fff !important;
  box-shadow: 0px 8px 20px rgba(0, 0, 255, 0.2) !important;
  /* Sombra azul */
  border: 2px solid #007bff !important;
  /* Azul de carga */
  width: 90% !important;
  max-width: 400px !important;
}

.loading-alert-title {
  font-size: 22px !important;
  font-weight: bold !important;
  color: #007bff !important;
  /* Azul de carga */
}

.loading-alert-button {
  background-color: #007bff !important;
  /* Azul */
  color: #fff !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  padding: 10px 20px !important;
  transition: all 0.3s ease-in-out !important;
}

.loading-alert-button:hover {
  background-color: #0056b3 !important;
}

/* ========================== */
/* 🔹 ANIMACIONES (Abrir y Cerrar Alertas) */
/* ========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 0.5s ease-in-out;
}

.animate__fadeOutDown {
  animation: fadeOutDown 0.5s ease-in-out;
}


/* ========================== */
/* 🔹 ALERTA DE VERIFICACIÓN DE AGENTE */
/* ========================== */
.agent-alert {
  border-radius: 16px !important;
  /* Bordes redondeados */
  padding: 20px !important;
  background: #ffffff !important;
  /* Fondo blanco */
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2) !important;
  /* Sombra elegante */
  border: none !important;
  width: 90% !important;
  /* Responsivo en móviles */
  max-width: 400px !important;
  /* Máximo tamaño */
  text-align: left !important;
  /* Alinear el texto a la izquierda */
}

.agent-alert-title {
  font-size: 22px !important;
  font-weight: bold !important;
  color: #2D9C6A !important;
  /* Verde éxito */
  text-align: center !important;
  /* Alinear el título al centro */
}

.agent-alert-content {
  text-align: left !important;
  /* Alineación del contenido */
  padding: 5px 10px !important;
}

.agent-alert-content p {
  margin: 5px 0 !important;
  /* Espaciado entre los párrafos */
  font-size: 16px !important;
  color: #333 !important;
  /* Color del texto */
}

/* ========================== */
/* 🔹 ESTILO PARA EL CÓDIGO DE REFERIDO */
/* ========================== */
.codigo-referido-container {
  text-align: center !important;
  margin-top: 10px !important;
}

.codigo-referido-label {
  font-size: 18px !important;
  font-weight: bold !important;
  color: #333 !important;
  display: block;
  margin-bottom: 5px !important;
  text-align: center !important;
}

.codigo-referido {
  display: block;
  background: #000ff029 !important;
  padding: 10px 15px !important;
  border-radius: 8px !important;
  font-size: 20px !important;
  font-weight: bold !important;
  color: #007bff !important;
  text-align: center !important;
  width: 100% !important;
}

/* ========================== */
/* 🔹 ESTILOS DEL BOTÓN */
/* ========================== */
.agent-alert-button {
  background-color: #28a745 !important;
  /* Verde éxito */
  color: #fff !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  padding: 10px 20px !important;
  transition: all 0.3s ease-in-out !important;
}

.agent-alert-button:hover {
  background-color: #218838 !important;
}

/* ========================== */
/* 🔹 ANIMACIONES */
/* ========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 0.5s ease-in-out;
}

.animate__fadeOutDown {
  animation: fadeOutDown 0.5s ease-in-out;
}

/* ========================== */
/* 🔹 ALERTA DE VERIFICACIÓN DE AGENTE (Correo no encontrado) */
/* ========================== */
.agent-not-found-alert {
  border-radius: 16px !important;
  /* Bordes redondeados */
  padding: 20px !important;
  background: #ffffff !important;
  /* Fondo blanco */
  box-shadow: 0px 8px 20px rgba(255, 0, 0, 0.2) !important;
  /* Sombra roja */
  border: 2px solid #e63946 !important;
  /* Borde rojo */
  width: 90% !important;
  max-width: 450px !important;
  /* Ajustado para mejor visibilidad */
  text-align: center !important;
  /* Centrar texto */
}

.agent-not-found-title {
  font-size: 22px !important;
  font-weight: bold !important;
  color: #e63946 !important;
  /* Rojo de error */
}

.agent-not-found-content {
  font-size: 16px !important;
  color: #333 !important;
  margin-bottom: 15px !important;
}

.agent-not-found-subtext {
  font-size: 14px !important;
  color: #666 !important;
  margin-bottom: 20px !important;
}

/* ========================== */
/* 🔹 BOTÓN DE WHATSAPP */
/* ========================== */
.whatsapp-button {
  display: inline-block !important;
  background-color: #25D366 !important;
  /* Color verde de WhatsApp */
  color: #fff !important;
  padding: 10px 15px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.3s ease-in-out !important;
  border: none !important;
}

.whatsapp-button:hover {
  background-color: #1ebe5d !important;
}

/* ========================== */
/* 🔹 ANIMACIONES */
/* ========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 0.5s ease-in-out;
}

.animate__fadeOutDown {
  animation: fadeOutDown 0.5s ease-in-out;
}