/* Consola de Soberanía — sin atributos style inline (Paranoia CSP). */

:root {
  --emerald: #00e676;
  --emerald2: #00c853;
  --text: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.72);
  --glass: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(31, 31, 31, 1);
}

#sovereigntyShieldBtn {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 2147483000;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(20, 20, 20, 0.85);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 40px;
  padding: 0;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(0, 230, 118, 0.12);
}

#sovereigntyBackdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  z-index: 2147483001;
}

#sovereigntyPanel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, 92vw);
  max-height: 82vh;
  overflow: auto;
  background: rgba(20, 20, 20, 0.92);
  color: var(--text);
  border: 1px solid rgba(31, 31, 31, 1);
  border-radius: 12px;
  padding: 16px 18px;
  z-index: 2147483002;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sovereignty-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sovereignty-panel-head strong {
  font-size: 15px;
}

#sovereigntyClose {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
}

.sovereignty-seal-row {
  display: flex;
  justify-content: center;
  margin: 8px 0 14px;
}

.sovereignty-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sovereignty-seal-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
  position: relative;
}

.sovereignty-seal-ring::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.sovereignty-seal-label {
  font-weight: 850;
  text-align: center;
  color: rgba(148, 163, 184, 0.95);
  font-size: 12px;
  line-height: 1.2;
  max-width: 260px;
}

.seal--ok .sovereignty-seal-ring {
  border-color: rgba(0, 230, 118, 0.95);
  box-shadow:
    0 0 0 4px rgba(0, 230, 118, 0.16),
    0 0 38px rgba(0, 230, 118, 0.23),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  animation: sovereigntySealPulse 2.2s ease-in-out infinite;
}

.seal--ok .sovereignty-seal-ring::after {
  border-color: rgba(0, 230, 118, 0.35);
}

.seal--ok .sovereignty-seal-label {
  color: rgba(0, 230, 118, 0.98);
}

@keyframes sovereigntySealPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(0, 230, 118, 0.16),
      0 0 34px rgba(0, 230, 118, 0.2),
      inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(0, 230, 118, 0.18),
      0 0 44px rgba(0, 230, 118, 0.28),
      inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    transform: scale(1.03);
  }
}

#sovereigntyBunkerRow {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(20, 20, 20, 0.9);
}

#sovereigntyBunkerRow.bunker-active {
  border-color: rgba(0, 230, 118, 0.55);
  background: rgba(0, 230, 118, 0.12);
}

.sovereignty-row {
  margin-bottom: 10px;
}

.sovereignty-row .muted {
  opacity: 0.85;
}

.sovereignty-scan-section {
  margin: 14px 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(31, 31, 31, 1);
}

.sovereignty-scan-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

.scan-status-ok {
  color: var(--emerald);
  font-weight: 600;
}

.scan-status-warn {
  color: #fcd34d;
  font-weight: 600;
}

.scan-status-fail {
  color: #fca5a5;
  font-weight: 600;
}

#sovereigntyRedBox {
  display: none;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #450a0a;
  border: 1px solid #991b1b;
}

#sovereigntyEmergency {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  border-radius: 8px;
  border: 0;
  background: #b91c1c;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.sri-detail {
  font-size: 11px;
  opacity: 0.85;
  word-break: break-all;
  margin-top: 4px;
}

.sovereignty-muted-break {
  word-break: break-all;
  opacity: 0.9;
}

#sovereigntyPanel.semaphore-amber {
  animation: sovereigntyAmberPulse 1.35s ease-in-out infinite;
  border-color: rgba(245, 158, 11, 0.4);
}

@keyframes sovereigntyAmberPulse {
  0%,
  100% {
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.58);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(245, 158, 11, 0.25),
      0 22px 64px rgba(0, 0, 0, 0.58),
      0 0 30px rgba(245, 158, 11, 0.2);
  }
}

#sovereigntyScanBtn {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(20, 20, 20, 0.88);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

/* Ghost-style para el bloque "Avanzado" de logs SRI */
#sriAdvanced > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(20, 20, 20, 0.4);
  color: var(--muted);
  font-weight: 750;
}

#sriAdvanced > summary::-webkit-details-marker {
  display: none;
}
