/* core/workspace-switch.css — the "Rebuilding {orgname} workspace" veil.
   Full-bleed, theme-aware, sits above everything during an org switch. */

.ws-switch-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* above modals, flyouts, toasts */
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg, #0b0d12) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0;
  transition: opacity .32s ease;
  pointer-events: all;
}
.ws-switch-overlay.is-visible { opacity: 1; }

.ws-switch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 34px 44px;
  text-align: center;
  transform: translateY(8px) scale(.98);
  opacity: 0;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s ease;
}
.ws-switch-overlay.is-visible .ws-switch-card { transform: none; opacity: 1; }

.ws-switch-title {
  font-size: 20px;
  font-weight: 650;
  color: var(--text, #e8eaed);
  letter-spacing: -.01em;
}
.ws-switch-title b { font-weight: 800; }
.ws-switch-sub {
  font-size: 13px;
  color: var(--text-muted, #9aa0aa);
}

/* Three-dot orbit — brand-neutral, uses the theme accent. */
.ws-switch-orb {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}
.ws-switch-orb span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--primary, #6aa3ff);
  animation: ws-orbit 1.1s linear infinite;
}
.ws-switch-orb span:nth-child(2) { animation-delay: -.37s; opacity: .7; }
.ws-switch-orb span:nth-child(3) { animation-delay: -.74s; opacity: .45; }

@keyframes ws-orbit {
  from { transform: rotate(0deg) translateX(17px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(17px) rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ws-switch-overlay, .ws-switch-card { transition: opacity .2s ease; }
  .ws-switch-orb span { animation-duration: 2.2s; }
}

/* Light theme fallbacks (viewer toggle stamps data-theme on :root). */
:root[data-theme="light"] .ws-switch-overlay {
  background: color-mix(in srgb, var(--bg, #f6f7f9) 72%, transparent);
}
