/* Service status: the in-app banner and the public status page.
 *
 * The banner deliberately does not look like the beta banner sitting above it.
 * That one is ambient and permanent; this one means something is broken right
 * now, and the two must not be mistaken for each other at a glance — hence the
 * hazard striping rather than another tinted bar. */

.status-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  flex: 0 0 auto;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.status-banner[hidden] { display: none; }

/* Hazard stripes down the leading edge. Static: this is a warning, not a
   thing that should be moving in the corner of your eye while you work. */
.status-banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: repeating-linear-gradient(
    45deg,
    var(--danger) 0 6px,
    rgba(0, 0, 0, 0.35) 6px 12px
  );
}

.status-banner-major {
  background:
    linear-gradient(90deg, rgba(248, 113, 113, 0.14), rgba(248, 113, 113, 0.03) 55%, transparent),
    var(--bg-panel);
}
.status-banner-partial {
  background:
    linear-gradient(90deg, rgba(248, 113, 113, 0.08), transparent 55%),
    var(--bg-panel);
}
/* Degraded is real but not alarming, so the stripe drops to amber. */
.status-banner-minor::before {
  background: repeating-linear-gradient(
    45deg,
    var(--warn) 0 6px,
    rgba(0, 0, 0, 0.35) 6px 12px
  );
}
.status-banner-minor {
  background:
    linear-gradient(90deg, rgba(251, 191, 36, 0.08), transparent 55%),
    var(--bg-panel);
}

.status-banner-tag {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 3px;
  padding: 3px 8px;
  flex: 0 0 auto;
}
.status-banner-minor .status-banner-tag {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.5);
}

.status-banner-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
  flex: 1;
  min-width: 0;
}
.status-banner-text strong { color: var(--text); font-weight: 600; }

.status-banner-link { color: var(--accent); text-decoration: underline; }

.status-banner-close {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 3px;
}
.status-banner-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

@media (max-width: 720px) {
  .status-banner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------------------------------------------------------------- page --- */

.status-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 20px 0 28px;
  background: var(--bg-panel);
}
.status-summary-ok { border-color: rgba(110, 231, 183, 0.35); }
.status-summary-partial { border-color: rgba(251, 191, 36, 0.4); }
.status-summary-major { border-color: rgba(248, 113, 113, 0.5); }
.status-summary-text { margin: 0; font-size: 14px; color: var(--text); }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-block;
}
.status-dot-up { background: var(--ok, #6ee7b7); }
.status-dot-degraded, .status-dot-unstable { background: var(--warn); }
.status-dot-down { background: var(--danger); }
.status-dot-unknown { background: var(--text-dim); }

.status-group { margin-bottom: 28px; }
.status-group-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.status-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.status-table th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.status-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.status-row-problem { background: rgba(248, 113, 113, 0.05); }

.status-cell-state { white-space: nowrap; }
.status-state { margin-left: 7px; font-size: 12px; }
.status-state-up { color: var(--text-dim); }
.status-state-degraded, .status-state-unstable { color: var(--warn); }
.status-state-down { color: var(--danger); }

.status-cell-name a { color: var(--text); text-decoration: none; }
.status-cell-name a:hover { text-decoration: underline; }
.status-cell-detail { color: var(--text-dim); }
.status-cell-latency { text-align: right; color: var(--text-dim); font-family: var(--mono); }

.status-tag {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

.status-foot { font-size: 12px; color: var(--text-dim); margin: 4px 0 0; }
.status-foot-quiet { margin-top: 10px; opacity: 0.75; }
.status-foot-sep { opacity: 0.5; }
.status-loading { color: var(--text-dim); }

@media (max-width: 640px) {
  .status-cell-latency, .status-table th:nth-child(4) { display: none; }
}
