/* Formulario_Registro.css */
/* Estilos específicos para Formulario_Registro.php, extendiendo el CSS general. */
/* Mejoras adicionales en animaciones: fade-in con scale para modal, rotación suave en iconos, transiciones en inputs y botones para un efecto más dinámico y atractivo. */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&family=Montserrat:wght@500;700&display=swap');

/* ===================== MODAL DE CONTRASEÑA ===================== */
#passwordModal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px); /* Efecto borroso más intenso en el fondo */
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.8s ease-out;
}

.modal-content {
  background: linear-gradient(to bottom, #ffffff, #f8f8f8);
  max-width: 600px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(184, 145, 31, 0.2);
  transform: scale(0.95);
  transition: transform 0.5s ease-in-out;
}

.modal-content.scale-in {
  transform: scale(1);
}

.modal-header {
  background: linear-gradient(135deg, #600d18, #b8911f);
  color: white;
  padding: 25px 30px;
  text-align: center;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.modal-header i {
  font-size: 48px;
  margin-bottom: 12px;
  animation: pulse 1.5s infinite, rotate-icon 2s infinite linear;
}

.modal-header h2 {
  margin: 0;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: slide-down 0.6s ease-out;
}

.modal-body {
  padding: 30px;
  line-height: 1.7;
  color: #333;
  flex-grow: 1;
  overflow-y: auto;
  max-height: 50vh;
  background: #fdfdfd;
}

.modal-body p {
  margin: 15px 0;
  font-size: 1.05rem;
  opacity: 0;
  animation: fade-in-text 0.8s forwards;
  animation-delay: 0.5s;
}

.modal-footer {
  padding: 25px 30px;
  background: linear-gradient(to top, #f8f9fa, #ffffff);
  text-align: center;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, #600d18, #4a0a13);
  color: white;
  border: none;
  padding: 14px 36px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  margin: 0 10px;
  transition: all 0.4s;
  box-shadow: 0 4px 10px rgba(96, 13, 24, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4a0a13, #600d18);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 15px rgba(96, 13, 24, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #600d18;
  border: 2px solid #600d18;
  box-shadow: 0 4px 10px rgba(96, 13, 24, 0.1);
}

.btn-secondary:hover {
  background: rgba(96, 13, 24, 0.05);
  transform: translateY(-3px) scale(1.02);
}

/* Para mobile: ajusta paddings y tamaños */
@media (max-width: 600px) {
  .modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 20px 25px;
  }

  .modal-header i {
    font-size: 36px;
  }

  .modal-header h2 {
    font-size: 22px;
  }

  .modal-body {
    padding: 25px;
    max-height: 40vh;
  }

  .modal-footer {
    padding: 20px 25px;
  }

  .btn-primary {
    padding: 12px 28px;
    font-size: 15px;
    width: 100%;
    margin: 10px 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes rotate-icon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-text {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Bloquear scroll del body mientras el modal está activo */
body.modal-open {
  overflow: hidden;
}

/* Estilos para el formulario dentro del modal */
#password-form {
    margin: 25px 0;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #600d18;
    margin-bottom: 10px;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.form-group label:hover {
    color: #b8911f;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.3s;
    background: #fff;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.form-group input:focus {
    border-color: #b8911f;
    box-shadow: 0 0 12px rgba(184, 145, 31, 0.5);
    outline: none;
    transform: scale(1.01);
}

.error-message {
    color: #ff0000;
    font-size: 0.95rem;
    margin-top: 12px;
    text-align: center;
    background: rgba(255, 0, 0, 0.1);
    padding: 8px;
    border-radius: 8px;
    animation: shake 0.5s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

#loading-message {
    color: #600d18;
    font-weight: 600;
    animation: fadeIn 0.3s;
}

/* Efecto borroso en el contenido principal cuando modal activo */
body.modal-open > *:not(#passwordModal) {
    filter: blur(10px);
    transition: filter 0.5s ease-in-out;
}