/* =========================================
   ESTILOS EXCLUSIVOS DEL AUDITOR WCAG
   ========================================= */

/* Contenedor Principal */
.auditor-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 15px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  width: 100%;
}

.auditor-title {
    font-size: 2rem; color: #191970; text-align: center; margin-bottom: 0.5rem;
}
.auditor-subtitle {
    text-align: center; color: #666; margin-bottom: 2rem;
}

.auditor-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 2rem;
  border: 1px solid #e0e0e0;
}

/* Botones de Nivel */
.auditor-selector-nivel {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-nivel {
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 25px;
  background: #f0f2f5;
  cursor: pointer;
  font-weight: 600;
  color: #555;
  transition: all 0.3s ease;
}

.btn-nivel:hover { transform: translateY(-2px); }
.btn-nivel.activo { color: white; border-color: transparent; }

.btn-nivel.facil.activo { background: #27ae60; box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3); }
.btn-nivel.medio.activo { background: #f39c12; color: #fff; box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3); }
.btn-nivel.dificil.activo { background: #c0392b; box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3); }

/* Estadísticas */
.auditor-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 2rem;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.stat-num { font-size: 1.5rem; font-weight: 800; color: #191970; }
.stat-label { font-size: 0.8rem; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }

/* Barra de Progreso */
.auditor-progress-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.auditor-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.5s ease;
}

/* Info del Sitio */
.auditor-sitio-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #f0f0f0;
}
.sitio-actual { font-size: 1.2rem; font-weight: 700; color: #2c3e50; }

/* Área de Demo (El sitio falso) */
.auditor-demo {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  margin-bottom: 1.5rem;
  position: relative;
}

.auditor-demo::before {
  content: 'VISTA PREVIA DEL SITIO';
  position: absolute; top: -10px; left: 15px;
  background: #fff; padding: 0 10px;
  font-size: 0.7rem; color: #999; font-weight: bold;
}

/* Reset estilos dentro de la demo */
.demo-content { font-family: serif; line-height: 1.4; color: #000; }
.demo-content img { max-width: 100px; display: block; margin: 10px 0; background: #eee; }
.demo-content button { padding: 5px 10px; margin: 5px 0; cursor: pointer; }
.demo-content input { padding: 5px; margin: 5px 0; border: 1px solid #999; }

/* Checkboxes */
.problema-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border: 1px solid #eee; margin-bottom: 8px;
  border-radius: 6px; transition: background 0.2s; cursor: pointer;
}
.problema-item:hover { background: #f9f9f9; }
.problema-item input[type="checkbox"] { margin-top: 4px; transform: scale(1.2); cursor: pointer; }
.problema-titulo { font-weight: 600; color: #333; cursor: pointer; }
.problema-criterio { font-size: 0.8rem; color: #667eea; background: #eef0ff; padding: 2px 6px; border-radius: 4px; }

.problema-item.correcta { background-color: #d4edda; border-color: #c3e6cb; }
.problema-item.incorrecta { background-color: #f8d7da; border-color: #f5c6cb; }

/* Botones Acción */
.auditor-acciones { display: flex; gap: 15px; margin-top: 2rem; justify-content: center; }
.btn { padding: 12px 25px; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-verificar { background: #191970; color: white; width: 100%; }
.btn-repetir { background: #f0f0f0; color: #333; }
.btn-siguiente { background: #27ae60; color: white; }

/* Resultados */
.auditor-resultado { text-align: center; display: none; }
.resultado-num { font-size: 3rem; font-weight: 800; color: #191970; margin-bottom: 0.5rem; }
.resultado-msg { font-size: 1.5rem; color: #666; margin-bottom: 2rem; }
.resultado-detalles { text-align: left; background: #fafafa; padding: 1.5rem; border-radius: 8px; max-height: 300px; overflow-y: auto; }
.nivel-cambio { background: #e6fffa; color: #047481; padding: 15px; border-radius: 8px; margin-top: 20px; font-weight: bold; border: 1px solid #b2f5ea; }

.oculto { display: none !important; }
.visible { display: block !important; }

/* Responsive Auditor */
@media (max-width: 600px) {
  .auditor-stats { grid-template-columns: 1fr 1fr; }
  .auditor-selector-nivel, .auditor-acciones { flex-direction: column; }
  .auditor-content { padding: 1rem; }
}

@media (prefers-color-scheme: dark) {
  .auditor-content { background: #1e1e1e; border-color: #444; color: #e0e0e0; }
  .auditor-stats, .problema-item { background: #2c2c2c; border-color: #444; }
  .stat-num, .sitio-actual, .problema-titulo { color: #fff; }
  .auditor-demo { background: #ccc; color: #000; } /* Demo se mantiene claro para contraste */
  .btn-nivel { background: #333; color: #ccc; }
  .resultado-detalles { background: #2c2c2c; }
}