.cs-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  display: inline-block;
  flex: none;
  animation: cs-spin 0.6s linear infinite;
  vertical-align: -0.125em;
}

button.cs-pending,
a.cs-pending {
  cursor: progress;
}

button.cs-pending:not(:has(.cs-spinner))::before,
a.cs-pending:not(:has(.cs-spinner))::before {
  content: "";
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.45em;
  animation: cs-spin 0.6s linear infinite;
  vertical-align: -0.125em;
}

.cs-reconnect {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 70;
  display: none;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
  background: #0E5C32;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font: 500 13px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(14, 92, 50, 0.28);
}

.cs-reconnect.is-visible {
  display: inline-flex;
}

.cs-reconnect .cs-spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-right-color: #fff;
}

.cs-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  height: 3px;
  width: 0;
  pointer-events: none;
  background: #0E5C32;
}

.cs-nav-progress.is-active {
  width: 78%;
  transition: width 8s ease;
}

@keyframes cs-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cs-spinner,
  button.cs-pending:not(:has(.cs-spinner))::before,
  a.cs-pending:not(:has(.cs-spinner))::before {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.75;
  }

  .cs-nav-progress.is-active {
    transition: none;
    width: 40%;
  }
}
