/* ---------- Loading state (page open / switching to a remote server) ---------- */
/* Fades in after a short moment so quick loads don't flash it; .instant = remote server with nothing to show yet. */
.load-state {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
  margin: 8px auto 22px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: load-in 0.25s ease 0.3s both;
}
.load-state.instant {
  animation: none;
}
.load-state.compact {
  max-width: none;
  margin: 0 0 18px;
  padding: 12px 16px;
  gap: 10px;
}
.load-state.failed {
  border-color: color-mix(in srgb, var(--red) 35%, transparent);
}
.load-main {
  display: flex;
  align-items: center;
  gap: 14px;
}
.load-main > svg {
  width: 26px;
  height: 26px;
  color: var(--red);
}
.load-text {
  flex: 1;
  min-width: 0;
}
.load-text h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.load-state.compact .load-text h3 {
  font-size: 0.95rem;
}
.load-msg {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.load-spinner {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.load-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.load-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
}
.load-bar.indeterminate span {
  width: 40%;
  animation: load-slide 1.3s ease-in-out infinite;
}
@keyframes load-slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}
@keyframes load-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
/* Data that may be out of date stays visible, dimmed; the heading carries the warning. */
main.stale :is(#services, #stats, #unlisted) {
  opacity: 0.55;
  filter: saturate(0.6);
}

