/* nyapi — Live Status Section styles */

.status-section {
  position: relative;
  z-index: 1;
  padding: 16px 0 96px;
  scroll-margin-top: 84px;
}

.status-inner {
  max-width: 880px;
}

/* ---------- Overall Banner ---------- */
.status-banner {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  background: #ededed;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.4;
  animation: statusPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-banner[data-state="operational"] .pulse-dot { background: #22c55e; color: #22c55e; }
.status-banner[data-state="degraded"] .pulse-dot { background: #f59e0b; color: #f59e0b; }
.status-banner[data-state="outage"] .pulse-dot { background: #ef4444; color: #ef4444; }
.status-banner[data-state="checking"] .pulse-dot { background: #ededed; color: #ededed; }

.status-banner h2 {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.banner-meta {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 4px;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.countdown-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: #000;
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

#check-now-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Services List ---------- */
.services-wrap {
  margin-top: 0;
}

.services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.services-head h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.leg-up { background: #22c55e; }
.leg-down { background: #ef4444; }
.legend-note { color: var(--text-muted); padding-left: 6px; border-left: 1px solid var(--border); }

.services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--border-strong);
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.service-id {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.service-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-ep {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #000;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 5px;
}

.service-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-latency {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.state-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.state-pill.operational {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.28);
}

.state-pill.down {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.state-pill.checking {
  color: var(--text-secondary);
  background: var(--surface-2);
}

/* ---------- 36-Bar Uptime History ---------- */
.uptime-bars {
  display: grid;
  grid-template-columns: repeat(36, 1fr);
  gap: 4px;
  margin-top: 16px;
  height: 28px;
}

.u-bar {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.15s, opacity 0.15s;
}

.u-bar.up {
  background: #22c55e;
  opacity: 0.85;
}

.u-bar.down {
  background: #ef4444;
  opacity: 0.9;
}

.u-bar.up:hover,
.u-bar.down:hover {
  opacity: 1;
  transform: scaleY(1.12);
}

.service-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.service-foot a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.service-foot a:hover {
  color: var(--text);
}

.service-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.service-skeleton {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

@keyframes statusPing {
  0% { transform: scale(0.9); opacity: 0.55; }
  80%, 100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 640px) {
  .status-banner { padding: 20px; }
  .uptime-bars { gap: 2px; }
  .legend-note { display: none; }
}
