/* Universal Encbyt Loader — SVG-based Chrome-style arc */
.cv-loader {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  flex-shrink: 0;
}
.cv-loader svg {
  display: block;
  width: 100%;
  height: 100%;
  animation: cv-loader-spin 0.9s linear infinite;
}
.cv-loader svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 60 200;
  transform-origin: center;
}
.cv-loader--sm { width: 16px; height: 16px; }
.cv-loader--sm svg circle { stroke-width: 2.5; }
.cv-loader--md { width: 24px; height: 24px; }
.cv-loader--md svg circle { stroke-width: 3; }
.cv-loader--lg { width: 48px; height: 48px; }
.cv-loader--lg svg circle { stroke-width: 3; }
.cv-loader--xl { width: 72px; height: 72px; }
.cv-loader--xl svg circle { stroke-width: 3.5; }

.cv-loader--white { color: #ffffff; }
.cv-loader--primary { color: #3b82f6; }
.cv-loader--muted { color: #94a3b8; }
.cv-loader--dark { color: #0f172a; }

@keyframes cv-loader-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cv-loader svg { animation-duration: 1.5s; }
}

/* Spinner with center text */
.cv-loader-with-text {
  position: relative;
  display: inline-block;
}
.cv-loader-with-text .cv-loader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cv-loader-with-text .cv-loader-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 600;
  color: currentColor;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.1;
  pointer-events: none;
  white-space: nowrap;
}

/* Full-page overlay loader — no blur, just dim */
.cv-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv-loader-overlay[hidden] { display: none; }
