/* Minor overrides beyond Tailwind utility classes */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------------------------------------------------------
   Loading UI: top progress bar, ring spinner, button loading state
   --------------------------------------------------------------- */

#page-progress {
  transition: width 0.25s ease, opacity 0.2s ease;
}

.loader-ring {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(124, 58, 237, 0.15);
  border-top-color: #7C3AED;
  border-radius: 9999px;
  animation: loader-spin 0.7s linear infinite;
}

.loader-ring.sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.loader-ring.on-dark {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

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

/* Buttons in a loading state: dim label, show spinner, block clicks */
button.is-loading,
a.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 9999px;
  animation: loader-spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}

.filter-pill {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

@media (min-width: 640px) {
  .filter-pill {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
  }
}

/* Inline skeleton shimmer, available for future use in table/card placeholders */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
