/* ══════════════════════════════════════════════════════════════════════════
   aRTy TAX - Loader overlay
   Full-viewport backdrop with a breathing mark + rotating transitional verb.
   Used for auth, dashboard hydrate lead-in, and module-entry bridging.
   Relies on tokens + keyframes from motion.css.
   ══════════════════════════════════════════════════════════════════════════ */

.arty-loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(245, 245, 247, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-short, 220ms) var(--ease-out, cubic-bezier(0.2,0.8,0.2,1));
  font-family: var(--font-sans, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
}
.arty-loader.is-open {
  opacity: 1;
  pointer-events: auto;
}
.arty-loader__mark {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mark-breathe 900ms var(--ease-standard, cubic-bezier(0.32,0.72,0,1)) infinite;
}
.arty-loader__mark img,
.arty-loader__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.arty-loader__verb-wrap {
  position: relative;
  min-height: 32px;
  min-width: 260px;
  text-align: center;
}
.arty-loader__verb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: #1D1D1F;
  opacity: 0;
  animation: verb-swap 900ms var(--ease-out, cubic-bezier(0.2,0.8,0.2,1)) forwards;
}
.arty-loader__check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #34C759;
  color: #FFF;
  display: none;
  align-items: center;
  justify-content: center;
  animation: scale-in 280ms var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) forwards;
}
.arty-loader__check svg {
  width: 26px;
  height: 26px;
  stroke: #FFF;
  stroke-width: 3;
  fill: none;
}
.arty-loader.is-success .arty-loader__mark { display: none; }
.arty-loader.is-success .arty-loader__check { display: flex; }
.arty-loader.is-success .arty-loader__verb { animation: fade-in var(--dur-short, 220ms) ease forwards; opacity: 1; }

.arty-loader.is-error .arty-loader__mark {
  animation: none;
  color: #CB333B;
}
.arty-loader.is-error .arty-loader__verb { color: #CB333B; opacity: 1; animation: fade-in 180ms ease forwards; }

@media (prefers-reduced-motion: reduce) {
  .arty-loader__mark { animation: none !important; }
  .arty-loader__verb { animation: fade-in 150ms ease forwards !important; }
}
