/* path: css/main.css */

@import url('https://fonts.googleapis.com/css?family=Poppins');
@import url('https://fonts.googleapis.com/css?family=Raleway:400,700'); /* Añadido desde index.php <head> */

/* BASIC */

html {
  /* background-color: #56baed; /* Considera si este fondo aplica a todas las páginas o solo al login */
  background-color: #f6f6f6; /* Un fondo más neutro podría ser mejor para el form principal */
}

body {
  font-family: "Poppins", sans-serif;
  height: 100vh;
  margin: 0; /* Asegura que no haya margen por defecto */
  /* background-color: #56baed; /* Mover aquí si el fondo azul es para todo el body */
}

a {
  color: #92badd;
  display: inline-block;
  text-decoration: none;
  font-weight: 400;
}

h2 {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin: 40px 8px 10px 8px;
  color: #cccccc;
}

label { /* Estilo básico para labels añadido para consistencia */
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333; /* Un color más oscuro para mejor legibilidad */
    text-align: left; /* Alinear etiquetas a la izquierda es común en formularios */
    margin-left: 35px; /* Ajustar margen para alinear con inputs */
    margin-right: 35px;
}

/* STRUCTURE */

.wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 20px;
  box-sizing: border-box; /* Añadido para incluir padding en el cálculo del tamaño */
}

#formContent {
  -webkit-border-radius: 10px 10px 10px 10px;
  border-radius: 10px 10px 10px 10px;
  background: #fff;
  padding: 30px;
  width: 90%;
  max-width: 600px; /* Aumentado un poco el ancho máximo para el formulario más largo */
  position: relative;
  /* padding: 0px; /* Comentado - El padding de 30px parece útil */
  -webkit-box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3);
  box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3);
  text-align: center; /* Centra elementos inline como el logo, pero no los block como label/input */
}

#formFooter {
  background-color: #f6f6f6;
  border-top: 1px solid #dce8f1;
  padding: 25px;
  text-align: center;
  -webkit-border-radius: 0 0 10px 10px;
  border-radius: 0 0 10px 10px;
}

/* TABS (Usado en Login, mantener por si acaso) */

h2.inactive {
  color: #cccccc;
}

h2.active {
  color: #0d0d0d;
  border-bottom: 2px solid #5fbae9;
}

/* FORM TYPOGRAPHY & ELEMENTS */

/* Inputs de texto, email, password, etc. */
input[type=text],
input[type=password],
input[type=email], /* Añadido para consistencia */
textarea /* Añadido para notas adicionales */
{
  background-color: #f6f6f6;
  border: 1px solid #ccc; /* Borde más visible por defecto */
  color: #0d0d0d;
  padding: 10px 15px; /* Ajustado padding */
  text-align: left; /* Texto alineado a la izquierda es más estándar */
  text-decoration: none;
  display: block; /* Cambiado a block para ocupar ancho completo */
  font-size: 16px;
  margin: 5px auto 15px auto; /* Centrado horizontal, margen inferior */
  width: calc(100% - 70px); /* Ajustado para padding y posible borde */
  max-width: 400px; /* Ancho máximo para inputs */
  box-sizing: border-box; /* Incluir padding y borde en el width */
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  -webkit-border-radius: 5px 5px 5px 5px;
  border-radius: 5px 5px 5px 5px;
}

textarea {
    height: 100px; /* Altura inicial para textarea */
    resize: vertical; /* Permitir redimensionar verticalmente */
}

input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
textarea:focus {
  background-color: #fff;
  border-color: #5fbae9; /* Cambiar color de borde en focus */
  box-shadow: 0 0 5px rgba(95,186,233,0.5); /* Añadir un ligero brillo en focus */
  outline: none; /* Quitar outline por defecto */
}

input::placeholder, /* Estilos para placeholder */
textarea::placeholder {
  color: #aaa; /* Color más visible para placeholder */
  opacity: 1; /* Firefox necesita esto */
}

/* Botones (Submit, Reset, Button) */
input[type=button], input[type=submit], input[type=reset], button {
  background-color: #56baed;
  border: none;
  color: white;
  padding: 15px 30px; /* Padding ajustado */
  text-align: center;
  text-decoration: none;
  display: inline-block; /* Para que no ocupen todo el ancho */
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600; /* Añadido para mejor visibilidad */
  -webkit-box-shadow: 0 5px 15px 0 rgba(95,186,233,0.4);
  box-shadow: 0 5px 15px 0 rgba(95,186,233,0.4);
  -webkit-border-radius: 5px 5px 5px 5px;
  border-radius: 5px 5px 5px 5px;
  margin: 10px 5px; /* Margen ajustado */
  cursor: pointer; /* Cursor de mano en botones */
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover, button:hover {
  background-color: #39ace7;
  box-shadow: 0 8px 20px 0 rgba(95,186,233,0.5); /* Sombra más pronunciada en hover */
}

input[type=button]:active, input[type=submit]:active, input[type=reset]:active, button:active {
  -moz-transform: scale(0.98);
  -webkit-transform: scale(0.98);
  -o-transform: scale(0.98);
  -ms-transform: scale(0.98);
  transform: scale(0.98); /* Efecto de presión ligero */
}

/* Select Dropdowns */
.select-css {
  display: block; /* Ocupar ancho completo */
  font-size: 16px;
  font-family: "Poppins", sans-serif; /* Usar la misma fuente */
  font-weight: 400;
  color: #0d0d0d;
  line-height: 1.3;
  padding: 10px 15px;
  width: calc(100% - 70px); /* Ancho consistente con inputs */
  max-width: 400px; /* Ancho máximo consistente */
  box-sizing: border-box;
  margin: 5px auto 15px auto; /* Centrado horizontal, margen inferior */
  border: 1px solid #ccc;
  border-radius: 5px;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: #f6f6f6;
  /* Icono de flecha usando SVG inline para mejor control */
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 15px top 50%; /* Posición de la flecha */
  background-size: .65em auto; /* Tamaño de la flecha */
  transition: border-color 0.3s ease-in-out; /* Transición suave */
}
.select-css::-ms-expand { /* Ocultar flecha por defecto en IE */
 display: none;
}
.select-css:hover {
 border-color: #888;
}
.select-css:focus {
 border-color: #5fbae9; /* Mismo color que inputs */
 box-shadow: 0 0 5px rgba(95,186,233,0.5); /* Mismo brillo que inputs */
 outline: none;
}

/* ------- ESTILOS MOVIDOS DESDE index.php <style> ------- */

/* Estilo para campos con error de validación */
.error {
    border-color: red !important; /* Borde rojo fuerte para errores */
    background-color: #ffebeb; /* Fondo rosa claro para destacar el error */
}

/* Contenedor del botón de envío para posicionamiento relativo */
#submitButtonContainer {
    position: relative;
    display: inline-block; /* Ajustar al tamaño del botón */
    margin-top: 20px; /* Espacio antes del botón */
}

/* Botón de envío principal */
#submitButton {
    /* Hereda estilos de button, input[type=submit] */
    /* Estilos específicos para estado deshabilitado */
    background-color: gray;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Botón de envío cuando está habilitado */
#submitButton.enabled {
    background-color: #56baed; /* Color original azul */
    cursor: pointer;
    opacity: 1;
}
#submitButton.enabled:hover {
    background-color: #39ace7; /* Color hover original */
}

/* Mensaje de overlay sobre el botón de envío (para validación MAC) */
#macValidationMessage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* Fondo blanco semitransparente */
    display: flex; /* Usar flex para centrar */
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
    color: #cc0000; /* Color rojo oscuro para el texto */
    font-weight: bold;
    font-size: 0.9em; /* Tamaño de fuente ligeramente menor */
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    border-radius: 5px; /* Mismo borde que el botón */
    pointer-events: none; /* Para que no interfiera con clicks al botón si estuviera visible por error */
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.3s ease-in-out; /* Transición suave */
}

/* Mostrar el mensaje cuando sea necesario (se controla con JS añadiendo una clase o display) */
#macValidationMessage.visible {
    opacity: 1;
}


/* ------- FIN ESTILOS MOVIDOS DESDE index.php <style> ------- */


/* ANIMATIONS (Sin cambios desde login.css original) */

/* Simple CSS3 Fade-in-down Animation */
.fadeInDown {
  -webkit-animation-name: fadeInDown;
  animation-name: fadeInDown;
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@-webkit-keyframes fadeInDown {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
  100% {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
  100% {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
}

/* Simple CSS3 Fade-in Animation */
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.fadeIn {
  opacity:0;
  -webkit-animation:fadeIn ease-in 1;
  -moz-animation:fadeIn ease-in 1;
  animation:fadeIn ease-in 1;

  -webkit-animation-fill-mode:forwards;
  -moz-animation-fill-mode:forwards;
  animation-fill-mode:forwards;

  -webkit-animation-duration:1s;
  -moz-animation-duration:1s;
  animation-duration:1s;
}

/* Clases de delay para la animación fadeIn */
.fadeIn.first { -webkit-animation-delay: 0.3s; -moz-animation-delay: 0.3s; animation-delay: 0.3s; }
.fadeIn.second { -webkit-animation-delay: 0.4s; -moz-animation-delay: 0.4s; animation-delay: 0.4s; }
.fadeIn.third { -webkit-animation-delay: 0.5s; -moz-animation-delay: 0.5s; animation-delay: 0.6s; } /* Ajustado para espaciar más */
.fadeIn.fourth { -webkit-animation-delay: 0.6s; -moz-animation-delay: 0.6s; animation-delay: 0.7s; } /* Ajustado */
.fadeIn.fifth { -webkit-animation-delay: 0.7s; -moz-animation-delay: 0.7s; animation-delay: 0.8s; }  /* Ajustado */
.fadeIn.sixth { -webkit-animation-delay: 0.8s; -moz-animation-delay: 0.8s; animation-delay: 0.9s; }  /* Ajustado */
.fadeIn.seventh { -webkit-animation-delay: 1s; -moz-animation-delay: 1s; animation-delay: 1s; }

/* Estilo para enlaces con subrayado al pasar el mouse */
.underlineHover:after {
  display: block;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 2px;
  background-color: #56baed;
  content: "";
  transition: width 0.2s;
}

.underlineHover:hover {
  color: #0d0d0d;
}

.underlineHover:hover:after{
  width: 100%;
}

/* OTHERS */

*:focus {
    /* outline: none; /* Considera dejar el outline por defecto por accesibilidad o estilizarlo */
}

#icon {
  width: 60%;
  max-width: 150px; /* Añadido para controlar tamaño máximo del logo */
  margin-bottom: 20px; /* Espacio debajo del logo */
}

* {
  box-sizing: border-box; /* Asegura que padding y borde se incluyan en el ancho/alto total */
}

/* Contenedor para mensajes de validación específicos (ej. MAC) */
.validation-message {
    display: block;
    text-align: center;
    margin: -10px auto 10px auto; /* Espacio ajustado */
    font-size: 0.9em;
    width: calc(100% - 70px);
    max-width: 400px;
}
.validation-message.success { color: green; }
.validation-message.error { color: red; }
.validation-message.info { color: blue; }
.validation-message.warning { color: orange; }

/* Estilos específicos para la sección de confirmar MAC */
#confirmarMacDiv {
    border: 1px solid #eee;
    padding: 15px;
    margin: 10px auto 15px auto;
    border-radius: 5px;
    background-color: #f9f9f9;
    width: calc(100% - 70px);
    max-width: 400px;
    box-sizing: border-box;
}
#confirmarMacDiv button {
    margin: 5px;
}

/* Asegurar que el recaptcha se vea bien */
.g-recaptcha {
    display: inline-block; /* Para permitir centrado si el contenedor está centrado */
    margin-top: 15px;
    margin-bottom: 15px;
}