/* ============================================================================
   SUPERVIVENCIA FINAL — SISTEMA DE DISEÑO: DEFENSA CIVIL NÓRDICA / RADAR OTAN
   components.css · Botones de acción, tarjetas tácticas, telemetría y widget
   ============================================================================ */

/* ----- 1. Botones Tácticos y de Conversión ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  user-select: none;
  white-space: nowrap;
}

/* Botón Principal: Amarillo Rescate (#facc15) */
.btn-primary {
  background-color: var(--action-yellow);
  color: #0a1118;
  border-color: #fde047;
  box-shadow: 0 0 15px var(--action-yellow-glow), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
  background-color: var(--action-yellow-hover);
  border-color: #fef08a;
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.45), 0 4px 8px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px var(--action-yellow-glow);
}

/* Botón Secundario: Mando Técnico (#101d29) */
.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-metallic);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(125, 211, 252, 0.15);
}

/* Tamaños de Botón */
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
}

.btn-full {
  width: 100%;
}

/* ----- 2. Puntos de Estado y Telemetría Militar ----- */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
  position: relative;
}

.status-dot-green {
  background-color: var(--status-green);
  box-shadow: 0 0 8px var(--status-green-glow);
}

.status-dot-green::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--status-green);
  opacity: 0.6;
  animation: pulse-dot 2s infinite ease-out;
}

.status-dot-yellow {
  background-color: var(--action-yellow);
  box-shadow: 0 0 8px var(--action-yellow-glow);
}

.status-dot-red {
  background-color: var(--status-red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.badge-tactical {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background-color: rgba(16, 29, 41, 0.7);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-metallic);
  letter-spacing: 0.05em;
}

/* ----- 3. Tarjetas Tácticas con Esquinas Militares (Bunker Cards) ----- */
.tactical-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  position: relative;
  transition: all var(--transition-smooth);
}

.tactical-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(125, 211, 252, 0.06);
}

/* Esquinas técnicas militares */
.tactical-card::before,
.tactical-card::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}

.tactical-card::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--text-metallic);
  border-left: 2px solid var(--text-metallic);
  border-top-left-radius: var(--radius-xs);
}

.tactical-card::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--text-metallic);
  border-right: 2px solid var(--text-metallic);
  border-bottom-right-radius: var(--radius-xs);
}

/* Variante de tarjeta destacada (Sistema Completo $47) */
.tactical-card-featured {
  border-color: rgba(250, 204, 21, 0.4);
  background: linear-gradient(180deg, rgba(21, 38, 54, 0.9) 0%, rgba(16, 29, 41, 0.95) 100%);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.1);
}

.tactical-card-featured::before {
  border-color: var(--action-yellow);
}

.tactical-card-featured::after {
  border-color: var(--action-yellow);
}

/* ----- 4. Widget de Diagnóstico Rápido de Vulnerabilidad (Hero) ----- */
.diagnostic-widget {
  background-color: rgba(16, 29, 41, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-tactical), 0 0 40px rgba(10, 17, 24, 0.8);
  backdrop-filter: blur(8px);
  position: relative;
}

.diagnostic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
}

.diagnostic-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-metallic);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.diagnostic-step {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

/* Barra Reactiva de Riesgo / Telemetría en Vivo */
.threat-meter {
  margin-bottom: var(--space-lg);
  background-color: #0b131c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
}

.threat-meter-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.threat-meter-score {
  font-weight: 700;
  color: var(--action-yellow);
}

.threat-bar-track {
  width: 100%;
  height: 8px;
  background-color: rgba(28, 48, 68, 0.5);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.threat-bar-fill {
  height: 100%;
  width: 35%; /* Valor reactivo dinámico */
  background: linear-gradient(90deg, var(--status-green) 0%, var(--action-yellow) 60%, var(--status-red) 100%);
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

/* Pregunta y Opciones Tácticas */
.question-container {
  min-height: 160px;
}

.question-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.option-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.option-btn:hover {
  background-color: #1a2f43;
  border-color: var(--border-strong);
  color: #ffffff;
  transform: translateX(3px);
}

.option-btn.selected {
  background-color: rgba(125, 211, 252, 0.1);
  border-color: var(--text-metallic);
  color: #ffffff;
}

.option-btn .option-indicator {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  flex-shrink: 0;
}

.option-btn.selected .option-indicator {
  background-color: var(--text-metallic);
  color: #0a1118;
  border-color: var(--text-metallic);
}

/* ----- 5. Barra de Fuentes Oficiales (Trust Strip) ----- */
.sources-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(10, 17, 24, 0.7);
}

.source-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.source-item strong {
  color: var(--text-metallic);
}
