/* ==========================================================================
   PvP Arena — status page (public + admin panel)
   Loaded alongside /css/site.css, which provides the shared shell/tokens.
   ========================================================================== */

.status-content {
  flex: 1 1 auto;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  width: 100%;
}

/* No banner/nav above this on the standalone status page, so give it its
   own top spacing and center it vertically in the viewport instead. */
.status-content-standalone {
  padding-top: 32px;
}

.status-header {
  text-align: center;
  margin-bottom: 24px;
}

.status-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}

.status-header .subline {
  font-size: 16px;
  color: var(--text-muted);
}

.status-circle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

/* Pure opacity animation, nothing else — no transform/scale, so the circle
   never changes size and the browser only has to cross-fade an
   already-rasterized layer (glow included) instead of re-blurring it every
   frame. That re-blur-on-resize was the actual cause of the stutter. */
.status-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: none;
  transition: background 0.5s, box-shadow 0.5s;
}

.status-circle.is-online {
  background: #3ecf6e;
  box-shadow: 0 0 32px rgba(62, 207, 110, 0.55);
  animation: status-pulse 2.4s ease-in-out infinite;
}

.status-circle.is-degraded {
  background: #f7a545;
  box-shadow: 0 0 32px rgba(247, 165, 69, 0.55);
  animation: status-pulse 2.4s ease-in-out infinite;
}

.status-circle.is-down {
  background: #f5533d;
  box-shadow: 0 0 32px rgba(245, 83, 61, 0.55);
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .status-circle { animation: none !important; }
}

.status-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* Card matches the FAQ/leaderboard visual language elsewhere on the site —
   a bordered surface panel with rows, instead of bare floating text. */
.status-card {
  margin: 28px 0 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
}

/* The [hidden] attribute alone doesn't win here — .status-row's own
   `display: flex` is an author rule and overrides the browser's built-in
   [hidden] { display: none }, so a "hidden" row was staying visually open. */
.status-row[hidden] {
  display: none !important;
}

.status-row + .status-row {
  border-top: 1px solid var(--border);
}

.status-row-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.status-row-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.status-row-reason {
  font-weight: 400;
  color: var(--text-body);
}

#status-value.is-online { color: #3ecf6e; }
#status-value.is-degraded { color: #f7a545; }
#status-value.is-down { color: #f5533d; }

.status-updated {
  margin-top: 14px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ==========================================================================
   Admin panel — deliberately plain, no styling investment beyond usable.
   Never linked from anywhere public.
   ========================================================================== */

.admin-content {
  flex: 1 1 auto;
  max-width: 420px;
  margin: 0 auto;
  padding: 60px 24px 48px;
  width: 100%;
}

.admin-content h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  text-align: center;
}

.admin-field {
  margin-bottom: 16px;
}

.admin-field label {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.admin-toggle-field {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.admin-toggle-header {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600;
  color: var(--text-primary) !important;
  cursor: pointer;
}

.admin-toggle-header input[type="checkbox"] {
  width: 18px !important;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex: 0 0 auto;
}

/* The field only appears once its toggle is on — this is what "Show on
   status page" actually controls, in the admin UI as well as the public
   page, so it's obvious at a glance which fields are live. */
.admin-toggle-field input[type="text"] {
  margin-top: 10px;
  display: none;
}

.admin-toggle-field.is-on input[type="text"] {
  display: block;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
}

.admin-field textarea {
  resize: vertical;
  min-height: 70px;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1a1108;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.admin-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.admin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.admin-msg {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 1.4em;
}

.admin-msg.is-error { color: #f5533d; }
.admin-msg.is-ok { color: #3ecf6e; }

.admin-logout {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
}
