/**
 * Custom-event portal redirect handoff overlay.
 * Mint / ink Dionis language — no purple glow, no generic spinner-only UI.
 */

html.cpr-lock,
html.cpr-lock body {
  overflow: hidden;
}

.cpr-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, #1bd3cb 28%, transparent), transparent 55%),
    linear-gradient(165deg, #0a0a0a 0%, #121212 45%, #070707 100%);
  color: #f4f4f4;
  animation: cpr-fade-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cpr-panel {
  width: min(26rem, 100%);
  text-align: center;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.cpr-mark {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.35rem;
}

.cpr-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, #1bd3cb 35%, transparent);
  border-top-color: #1bd3cb;
  animation: cpr-spin 0.9s linear infinite;
}

.cpr-core {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1bd3cb, #ffffff);
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 12%, transparent);
}

.cpr-title {
  margin: 0;
  font: 600 clamp(1.15rem, 3.5vw, 1.45rem) / 1.25 "Manrope", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #ffffff;
}

.cpr-sub {
  margin: 0;
  max-width: 34ch;
  font: 500 0.95rem / 1.55 "Manrope", "Segoe UI", Arial, sans-serif;
  color: #c8c8c8;
  text-transform: none;
}

.cpr-track {
  width: min(14rem, 70vw);
  height: 3px;
  margin-top: 0.55rem;
  border-radius: 0;
  background: color-mix(in srgb, #fff 12%, transparent);
  overflow: hidden;
}

.cpr-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #1bd3cb, #ffffff);
  animation: cpr-fill 2s linear forwards;
}

.cpr-bar--static {
  animation: none;
  transform: scaleX(1);
}

@keyframes cpr-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes cpr-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpr-overlay {
    animation: none;
  }
  .cpr-ring {
    animation: none;
    border-color: #1bd3cb;
  }
  .cpr-bar {
    animation: none;
    transform: scaleX(1);
  }
}
