/* ════════════════════════════════════════════════════════════════
   routing — application styles on top of the Hackers theme.
   All custom classes prefixed `rt-` to leave the theme `hk-*` alone.
   ════════════════════════════════════════════════════════════════ */

/* ── Title block ─────────────────────────────────────────────── */
.rt-title-block {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--hk-border-bright);
  margin-bottom: 22px;
}

/* ── Status bar ──────────────────────────────────────────────── */
.rt-status-bar {
  margin-bottom: 22px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 22px;
}
.rt-status-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  min-width: 0;
}
.rt-status-section-right { justify-content: flex-end; }
.rt-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rt-status-clock {
  color: var(--hk-cyan);
  font-family: var(--hk-font-mono);
  font-size: 11px;
  letter-spacing: 2px;
}

/* Data-source pill in the status bar */
.rt-source-pill {
  font-family: var(--hk-font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 1px 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.rt-source-live     { color: var(--hk-green);  }
.rt-source-stale    { color: var(--hk-orange); }
.rt-source-fallback { color: var(--hk-purple); }
.rt-source-boot     { color: var(--hk-text-dim); }
.rt-source-offline  { color: var(--hk-danger); }

/* Nav chrome: DOWN PERISCOPE + fullscreen toggle.
   Inline in the status bar — never `position: fixed`.
   The pair is wrapped in `.rt-nav-group` so flex-wrap keeps them
   together as one unit when the bar gets crowded. */
.rt-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rt-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--hk-font-display);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--hk-cyan);
  background: transparent;
  border: 1px solid var(--hk-border-bright);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 120ms, background 120ms, box-shadow 120ms, border-color 120ms;
}
.rt-nav-btn:hover,
.rt-nav-btn:focus-visible {
  color: var(--hk-cyan-bright);
  background: var(--hk-panel-tint);
  border-color: var(--hk-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
  outline: none;
}
.rt-nav-btn:active {
  background: rgba(0, 212, 255, 0.12);
}
.rt-nav-fs {
  font-size: 14px;
  letter-spacing: 0;
  padding: 2px 8px;
  line-height: 1;
}
.rt-nav-fs-on {
  background: var(--hk-panel-tint);
  border-color: var(--hk-cyan);
  color: var(--hk-cyan-bright);
}

/* ── Main grid ───────────────────────────────────────────────── */
.rt-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-bottom: 22px;
}
@media (max-width: 1100px) {
  .rt-main-grid { grid-template-columns: 1fr; }
}

.rt-panel-title { font-size: 10px; letter-spacing: 2px; }

/* ── Map panel ───────────────────────────────────────────────── */
.rt-map-panel { display: flex; flex-direction: column; }
.rt-map-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; position: relative; }
#rt-map {
  width: 100%;
  height: auto;
  display: block;
  background:
    radial-gradient(ellipse at center, rgba(0, 24, 48, 0.55) 0%, rgba(0, 8, 16, 0.85) 100%),
    var(--hk-bg);
  border: 1px solid var(--hk-border);
}

.rt-map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: var(--hk-font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--hk-text-dim);
  padding: 0 4px;
}
.rt-map-meta .rt-map-hint {
  margin-left: auto;
  color: var(--hk-cyan);
}

/* Graticule (lat/lon grid) */
.rt-graticule line {
  stroke: var(--hk-cyan);
  stroke-opacity: 0.08;
  stroke-width: 0.6;
}
.rt-graticule line.rt-equator,
.rt-graticule line.rt-prime-meridian {
  stroke-opacity: 0.22;
  stroke-dasharray: 2 4;
}

/* Land dots — the NORAD radar mosaic */
.rt-land circle {
  fill: var(--hk-cyan);
  fill-opacity: 0.42;
}

/* Blips */
.rt-blip { cursor: pointer; }
.rt-blip-pulse {
  fill: none;
  stroke: var(--hk-danger);
  stroke-width: 1.4;
  transform-box: fill-box;
  transform-origin: center;
  animation: rt-blip-pulse 2s ease-out infinite;
}
.rt-blip-core {
  fill: var(--hk-danger);
  filter: drop-shadow(0 0 4px var(--hk-danger));
}
.rt-blip.rt-sev-warn .rt-blip-pulse { stroke: var(--hk-orange); }
.rt-blip.rt-sev-warn .rt-blip-core  { fill: var(--hk-orange); filter: drop-shadow(0 0 4px var(--hk-orange)); }
.rt-blip.rt-sev-low  .rt-blip-pulse { stroke: var(--hk-cyan); }
.rt-blip.rt-sev-low  .rt-blip-core  { fill: var(--hk-cyan); filter: drop-shadow(0 0 4px var(--hk-cyan)); }

.rt-blip.rt-selected .rt-blip-core {
  stroke: #fff;
  stroke-width: 0.8;
}
.rt-blip.rt-selected .rt-blip-halo {
  stroke: var(--hk-cyan-bright);
  stroke-width: 1.2;
  fill: none;
  opacity: 0.85;
}

@keyframes rt-blip-pulse {
  0%   { transform: scale(0.6); opacity: 0.95; }
  100% { transform: scale(4);   opacity: 0;    }
}

/* ── Right rail ──────────────────────────────────────────────── */
.rt-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* NETCON dial */
.rt-netcon-body { padding: 16px; }
.rt-netcon-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}
.rt-netcon-svg text {
  font-family: var(--hk-font-display);
  font-weight: 800;
  font-size: 16px;
}
.rt-netcon-state {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--hk-border);
  font-family: var(--hk-font-mono);
}
.rt-netcon-state-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--hk-text-dim);
}
.rt-netcon-state-name {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--hk-orange);
}

/* Detail card */
.rt-detail-body { padding: 14px; min-height: 200px; }
.rt-detail-empty {
  font-size: 11px;
  letter-spacing: 1.5px;
  line-height: 1.6;
  margin: 0;
}
.rt-detail-title {
  color: var(--hk-text);
  font-family: var(--hk-font-display);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hk-border-bright);
  text-transform: uppercase;
}
.rt-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--hk-font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 212, 255, 0.10);
}
.rt-detail-row:last-of-type { border-bottom: none; }
.rt-detail-row .rt-key { color: var(--hk-text-dim); }
.rt-detail-row .rt-val {
  color: var(--hk-cyan);
  text-align: right;
  word-break: break-all;
}
.rt-detail-row .rt-val.rt-danger { color: var(--hk-danger); }
.rt-detail-row .rt-val.rt-warn   { color: var(--hk-orange); }
.rt-detail-summary {
  color: var(--hk-text-dim);
  font-size: 11px;
  line-height: 1.55;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--hk-border);
}

/* ── Threat ticker ───────────────────────────────────────────── */
.rt-ticker-shell {
  display: flex;
  align-items: stretch;
  background: var(--hk-bg-2);
  border: 1px solid var(--hk-border);
  border-left: 3px solid var(--hk-orange);
  margin-bottom: 28px;
  height: 38px;
  overflow: hidden;
}
.rt-ticker-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-right: 1px solid var(--hk-border);
  background: rgba(255, 123, 0, 0.06);
  color: var(--hk-orange);
  font-family: var(--hk-font-display);
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  white-space: nowrap;
}
.rt-ticker-mask {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.rt-ticker-track {
  display: flex;
  white-space: nowrap;
  font-family: var(--hk-font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  animation: rt-ticker-scroll 110s linear infinite;
  color: var(--hk-cyan);
  will-change: transform;
}
.rt-ticker-track > span {
  padding: 0 28px;
  display: inline-block;
  flex: 0 0 auto;
}
.rt-tick-warn   { color: var(--hk-orange); }
.rt-tick-danger { color: var(--hk-danger); }
.rt-tick-dim    { color: var(--hk-text-dim); }

@keyframes rt-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Submarine cables overlay ────────────────────────────────── */
.rt-cables path {
  fill: none;
  stroke: rgba(0, 212, 255, 0.22);
  stroke-width: 1.0;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: crosshair;
  transition: stroke 120ms, stroke-width 120ms, filter 120ms;
}
.rt-cables path:hover {
  stroke: var(--hk-cyan);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.55));
}
.rt-cables path.rt-cable-cut {
  stroke: var(--hk-danger);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.65));
  animation: rt-cable-cut-pulse 1.4s ease-in-out infinite;
}
.rt-cables path.rt-cable-cut:hover {
  stroke-width: 2.4;
}
@keyframes rt-cable-cut-pulse {
  0%, 100% { stroke-opacity: 1; }
  50%      { stroke-opacity: 0.45; }
}

.rt-cable-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 8, 16, 0.92);
  border: 1px solid var(--hk-border);
  border-left: 2px solid var(--hk-cyan);
  padding: 6px 10px;
  font-family: var(--hk-font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--hk-cyan);
  white-space: nowrap;
  z-index: 5;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rt-cable-tooltip[hidden] { display: none; }
.rt-cable-tooltip-name {
  font-weight: 700;
  letter-spacing: 2px;
  display: block;
}
.rt-cable-tooltip-cut {
  color: var(--hk-danger);
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 1px;
}

/* ── Incidents table ─────────────────────────────────────────── */
.rt-table-header {
  margin: 6px 0 12px;
  align-items: baseline;
}
.rt-table-meta {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 2px;
}
.rt-table-wrap {
  overflow-x: auto;
}
#rt-table tbody tr { cursor: pointer; }
#rt-table .rt-status-cell {
  font-family: var(--hk-font-display);
  font-weight: 700;
  letter-spacing: 1px;
}
#rt-table .rt-status-hot { color: var(--hk-danger); }
#rt-table .rt-status-act { color: var(--hk-orange); }
#rt-table .rt-status-watch { color: var(--hk-cyan); }
#rt-table tr.rt-row-selected td {
  background: rgba(0, 212, 255, 0.06);
  box-shadow: inset 3px 0 0 var(--hk-cyan-bright);
}

/* ── Footer ──────────────────────────────────────────────────── */
.rt-footer {
  text-align: center;
  font-size: 10px;
  letter-spacing: 3px;
  padding: 4px 0 24px;
}
