/* register_styles.css */

/* Importar la fuente Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden; /* Para que no aparezca scroll al animar fondo */
}

/* Fondo con degradado movible */
body {
  background: linear-gradient(135deg,
    #ff9a9e 0%,
    #fad0c4 25%,
    #fbc2eb 50%,
    #a18cd1 75%,
    #8ec5fc 100%);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Animación de movimiento en el gradient */
@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Contenedor blanco redondeado con ancho base */
.form-container {
  background-color: #ffffff;
  border-radius: 20px;
  width: 500px; /* Ancho base */
  max-width: 95%;
  padding: 40px 30px 50px 30px; /* Padding base */
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: width 0.3s ease, padding 0.3s ease; /* Para animaciones */
}

/* Expansión para el Paso 2: ancho ligeramente mayor pero padding reducido */
.form-container.expanded-step-2 {
  width: 530px;
  padding: 30px 30px 40px 30px; /* Reduce un poco la altura */
}

/* Expansión para el Paso 3: ancho mayor */
.form-container.expanded-step-3 {
  width: 550px;
  padding: 40px 30px 50px 30px; /* Padding original para paso 3 */
}

/* Logo en la esquina superior derecha */
.form-container .logo {
  position: absolute;
  top: 18px;    /* Top ajustado a 18px */
  right: 20px;
  width: 40px;  /* Solo ancho, sin especificar altura */
  object-fit: contain;
}

/* Botón “volver atrás” en la esquina superior izquierda */
.form-container .back-button {
  position: absolute;
  top: 18px;  /* Top ajustado a 18px */
  left: 20px;
  display: flex;
  align-items: center;
  color: #333333;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}
.form-container .back-button i {
  font-style: normal;
  margin-right: 5px;
  font-size: 18px;
}
/* Animación suave al pasar el mouse sobre “volver atrás” */
.form-container .back-button:hover {
  color: #555555;
  transform: translateX(-4px);
}

/* Barra de progreso (3 “barritas” redondeadas) */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  margin-top: 50px;
}
.progress-bar .step {
  width: 30%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
.progress-bar .step.active {
  background-color: #333333;
}

/* Títulos y subtítulos */
.form-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333333;
}
.form-subtitle {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 25px;
  color: #666666;
  line-height: 1.4;
}

/* Secciones (steps) del formulario */
.form-step {
  display: none;
  animation: fadeIn 0.5s ease;
}
.form-step.active {
  display: block;
}

/* Animación fade */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Inputs generales */
.form-step input[type="date"],
.form-step input[type="text"],
.form-step input[type="email"],
.form-step input[type="password"],
.form-step select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid #cccccc;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #333333;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-step input:focus,
.form-step select:focus {
  border-color: #333333;
}

/* Para el paso 3: filas con dos inputs lado a lado */
.input-row {
  display: flex;
  justify-content: space-between;
  gap: 4%;
  margin-bottom: 10px; /* Reducido para acercar a contraseña */
}
.input-row input {
  width: 48%;
}

/* Botones principales agrupados y centrados */
.button {
  display: inline-block;
  width: 45%; /* Ajuste para tener dos botones lado a lado */
  padding: 10px 0;
  background-color: #333333;
  color: #ffffff;
  text-align: center;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin: 5px;
}
.button:hover {
  background-color: #555555;
  transform: translateY(-2px);
}

/* Si en algún paso solo hay un botón, centrado completo */
.single-button {
  width: 100%;
  margin: 10px 0 0 0;
}

/* Contenedor para agrupar los dos botones en un flex centrado */
.button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
}

/* Texto de pie de página (derechos reservados), centrado */
.footer-text {
  margin-top: 20px;
  font-size: 0.75rem;
  color: #999999;
  text-align: center;
}

/* Estilos para sección “No se puede crear la cuenta” */
.minor-section {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease;
}
.minor-section.active {
  display: block;
}
.minor-section .minor-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333333;
}
.minor-section .minor-text {
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 25px;
  color: #666666;
  line-height: 1.4;
}
.minor-section .minor-button {
  padding: 10px 20px;
  background-color: #333333;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.minor-section .minor-button:hover {
  background-color: #555555;
  transform: translateY(-2px);
}

/* Checkbox list */
.checkbox-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.checkbox-group label {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #333333;
  display: flex;
  align-items: center;
}
.checkbox-group input[type="checkbox"] {
  margin-right: 8px;
}

/* Enlaces subrayados y en negritas (ahora anchors) */
.underline-bold {
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
  color: #333333;
  transition: color 0.2s ease;
}
.underline-bold:hover {
  color: #555555;
}

/* Mensaje de error (servidor o validación) */
.error-message {
  margin-bottom: 20px;
  color: #d9534f;
  font-size: 0.85rem;
  text-align: center;
}

/* Modal de error: overlay y caja interna */
#error-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
#error-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
#error-modal {
  background-color: #ffffff;
  border-radius: 12px;
  width: 300px;
  max-width: 80%;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  text-align: center;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#error-modal-overlay.active #error-modal {
  transform: translateY(0);
  opacity: 1;
}
#error-modal .modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 10px;
}
#error-modal .modal-message {
  font-size: 0.95rem;
  color: #555555;
  margin-bottom: 20px;
  line-height: 1.4;
}
#error-modal .modal-button {
  padding: 8px 16px;
  background-color: #333333;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
#error-modal .modal-button:hover {
  background-color: #555555;
  transform: translateY(-2px);
}

/* Responsive: ajustar contenedor en pantallas muy pequeñas */
@media (max-width: 550px) {
  .form-container {
    padding: 20px 15px 30px 15px;
    width: 100%;
    border-radius: 0;
  }
  .progress-bar {
    margin-top: 30px;
  }
  .button {
    width: 100%;
    margin: 8px 0;
  }
  .input-row {
    flex-direction: column;
  }
  .input-row input {
    width: 100%;
    margin-bottom: 12px;
  }
}
