/* ── Loading & error states ────────────────────────────────────────────── */

.pending-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pending-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--focus-ring);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.pending-text {
  line-height: 1;
}

.error-box {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.error-box-text {
  margin: 0 0 8px 0;
}

.error-box-actions {
  display: flex;
  gap: 8px;
}

/* ── Accessibility utilities ───────────────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--header-bg);
  color: var(--header-text);
  padding: 8px 12px;
  z-index: 10000;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* Ensure every focusable control has a visible focus ring when reached via
   keyboard. Components are free to override with a more specific style. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
