/* ============================================================
   VirtualBytes — Universal Footer & Status Pill
   Theme-aware: consumes the shared palette from styles.css
   (:root = dark default, :root[data-theme="light"] = light).
   Loaded via: <link rel="stylesheet" href="/footer.css">
   ============================================================ */

.vb-footer {
  /* footer-scoped accent (no accent var exists in the global palette) */
  --vb-link:        #58a6ff;
  --vb-link-hover:  #79c0ff;

  margin-top: 64px;
  padding: 20px 24px;
  border-top: 1px solid rgba(110,118,129,.28);
  background: var(--bg-1);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-4);
}
:root[data-theme="light"] .vb-footer {
  --vb-link:        #0969da;
  --vb-link-hover:  #0860c9;
}

.vb-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.vb-footer-copy {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-4);
}
.vb-footer-copy a {
  color: var(--vb-link);
  text-decoration: none;
  transition: color .15s;
}
.vb-footer-copy a:hover {
  color: var(--vb-link-hover);
}
.vb-footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.vb-footer-link {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-4);
  text-decoration: none;
  transition: color .15s;
}
.vb-footer-link:hover {
  color: var(--vb-link);
}

/* ── Live status pill ────────────────────────────────────────── */
.vb-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-2);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  background: var(--bg-2);
  transition: border-color .15s, color .15s;
}
.vb-status-pill:hover {
  border-color: var(--border);
  color: var(--text);
}
.vb-status-pill .vb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-4);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(110, 118, 129, 0.12);
}

/* Semantic status colors — intentionally fixed across themes */
.vb-status-pill.s-operational .vb-dot {
  background: #3fb950;
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18);
}
.vb-status-pill.s-degraded .vb-dot {
  background: #f0883e;
  box-shadow: 0 0 0 3px rgba(240, 136, 62, 0.18);
  animation: vb-pulse 2s ease-in-out infinite;
}
.vb-status-pill.s-down .vb-dot {
  background: #f85149;
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.18);
  animation: vb-pulse 2s ease-in-out infinite;
}
.vb-status-pill.s-operational {
  color: #2da44e;
  border-color: rgba(63, 185, 80, 0.35);
}
.vb-status-pill.s-degraded {
  color: #bc4c00;
  border-color: rgba(240, 136, 62, 0.35);
}
.vb-status-pill.s-down {
  color: #cf222e;
  border-color: rgba(248, 81, 73, 0.35);
}
/* Slightly brighter status text in dark mode for contrast */
:root:not([data-theme="light"]) .vb-status-pill.s-operational { color: #3fb950; }
:root:not([data-theme="light"]) .vb-status-pill.s-degraded    { color: #f0883e; }
:root:not([data-theme="light"]) .vb-status-pill.s-down        { color: #f85149; }

@keyframes vb-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .vb-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ── Sticky footer: keep .vb-footer pinned to viewport bottom on short pages.
   Bodies already declare min-height:100vh; adding flex column + auto margin
   pushes the footer down without affecting content stacking. ── */
body { display: flex; flex-direction: column; min-height: 100vh; }
.vb-footer { margin-top: auto; }

/* ── Sticky footer: pin .vb-footer to viewport bottom on short pages.
   Bodies already declare min-height:100vh; flex column + auto margin
   pushes the footer down without changing content stacking. ── */
