/**
 * Estilos modulares del proyecto
 * Incluye: corrección de iconos Font Awesome, utilidades de layout y estados.
 * No hardcodear estilos en vistas; usar clases aquí o Tailwind.
 */

/* --- Iconos Font Awesome: asegurar que se muestren en todo el proyecto --- */
.fa,
[class^="fa-"],
[class*=" fa-"] {
  font-family: "FontAwesome" !important;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tamaños de icono usados en el panel y vistas */
.fa.text-lg { font-size: 1.125rem; }
.fa.text-xl { font-size: 1.25rem; }
.fa.text-2xl { font-size: 1.5rem; }
.fa.text-3xl { font-size: 1.875rem; }

/* --- Panel de administración: tarjetas con hover e iconos --- */
.admin-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.admin-card:hover {
  transform: translateY(-4px);
}
/* Asegurar que los iconos FA se vean en las tarjetas del panel */
.admin-card .fa {
  font-family: "FontAwesome" !important;
  display: inline-block !important;
  font-style: normal !important;
  font-weight: normal !important;
  line-height: 1 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.admin-card .fa.text-2xl {
  font-size: 1.5rem !important;
}
.admin-card .fa.text-lg {
  font-size: 1.125rem !important;
}

/* Iconos en cabeceras de vistas del panel (Ver resultados, Gestionar admin, etc.) */
header .fa {
  font-family: "FontAwesome" !important;
  display: inline-block !important;
  font-style: normal !important;
  font-weight: normal !important;
  line-height: 1 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
header .fa.text-lg {
  font-size: 1.125rem !important;
}

/* --- Login: formulario deshabilitado cuando examen desactivado --- */
.login-form-wrapper.examen-desactivado {
  pointer-events: none;
  opacity: 0.7;
}
.login-form-wrapper.examen-desactivado .acceso-admin-link {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* --- Contenido: fondo con imagen (la URL se pone en el body desde la vista) --- */
body.bg-contenido {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* --- Página encuesta (hojadeencuesta): fondo, overlay y botón cerrar sesión --- */
body.pagina-encuesta {
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
}
body.pagina-encuesta #body-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
  pointer-events: none;
}
body.pagina-encuesta.modal-open #body-overlay {
  display: none !important;
}
body.pagina-encuesta #cerrar-sesion-encuesta {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: #006633;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
body.pagina-encuesta #cerrar-sesion-encuesta a {
  color: white;
  text-decoration: none;
}
body.pagina-encuesta #cuadrado,
body.pagina-encuesta .contenedor-global {
  position: relative;
  z-index: 1;
}
/* Botón culminar y mensaje en encuesta */
body.pagina-encuesta #boton-guardar-respuestas.btn-disabled {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: white !important;
  opacity: 0.6;
  cursor: not-allowed;
}
body.pagina-encuesta #mensaje-preguntas-pendientes {
  text-align: center;
  color: #dc3545;
  font-weight: bold;
  margin-top: 10px;
}
