/* Waiting-room styles v3: black Voodootix logo without a background panel. */
:root {
  color-scheme: light;
  --ink: #17213b;
  --muted: #66708a;
  --surface: rgba(255, 255, 255, 0.94);
  --line: #e7eaf2;
  --primary: #6259e8;
  --primary-dark: #4c43c8;
  --accent: #19bca2;
  --danger: #c54b62;
  --shadow: 0 24px 70px rgba(39, 47, 91, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #f4f4fb;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(98, 89, 232, 0.16), transparent 32rem),
    radial-gradient(circle at 92% 82%, rgba(25, 188, 162, 0.13), transparent 30rem),
    linear-gradient(145deg, #f9f9fd 0%, #f0f1f9 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(98, 89, 232, 0.13) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  content: "";
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 76%);
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-content: center;
  gap: 22px;
  padding: 32px 18px 22px;
}

.waiting-card {
  width: min(100%, 560px);
  padding: 30px clamp(24px, 7vw, 52px) 34px;
  overflow: hidden;
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  height: 48px;
  align-items: center;
}

.brand img {
  display: block;
  width: 112px;
  height: 50px;
  object-fit: contain;
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.language-picker select {
  min-width: 92px;
  height: 38px;
  padding: 0 9px;
  color: var(--ink);
  font: inherit;
  background: #f7f7fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.language-picker select:focus-visible {
  outline: 3px solid rgba(98, 89, 232, 0.28);
  outline-offset: 2px;
}

.status-visual {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  margin: 0 auto 24px;
  place-items: center;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(98, 89, 232, 0.18);
  border-radius: 50%;
}

.orbit-one {
  inset: 0;
  border-top-color: var(--primary);
  animation: spin 3.8s linear infinite;
}

.orbit-two {
  inset: 11px;
  border-right-color: var(--accent);
  animation: spin-reverse 2.9s linear infinite;
}

.status-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  background: linear-gradient(145deg, #f0efff, #e5fbf7);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(98, 89, 232, 0.08);
}

.status-icon-dot {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border: 5px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(98, 89, 232, 0.14);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 420px;
  min-height: 48px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.position-panel {
  display: grid;
  gap: 3px;
  margin: 26px 0 2px;
  padding: 19px;
  background: #f7f7fc;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.position-panel[hidden] {
  display: none;
}

.position-label,
.position-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.position-value {
  color: var(--ink);
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.activity {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.activity span {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.25s ease-in-out infinite;
}

.activity span:nth-child(2) {
  animation-delay: 0.14s;
}

.activity span:nth-child(3) {
  animation-delay: 0.28s;
}

.next-check {
  min-height: 20px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 17px;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 720;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.button[hidden] {
  display: none;
}

.button-primary {
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(98, 89, 232, 0.24);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  color: var(--ink);
  background: #eceef6;
}

.button:focus-visible {
  outline: 3px solid rgba(98, 89, 232, 0.28);
  outline-offset: 3px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 26px;
  padding-top: 20px;
  color: var(--muted);
  text-align: left;
  border-top: 1px solid var(--line);
}

.notice svg {
  flex: 0 0 auto;
  fill: var(--accent);
}

.notice p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.noscript-message {
  padding: 12px;
  color: var(--danger);
  font-size: 0.85rem;
  background: #fff2f4;
  border-radius: 10px;
}

footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: #7b8298;
  font-size: 0.72rem;
}

body[data-state="admitted"] .orbit,
body[data-state="terminal"] .orbit,
body[data-state="error"] .orbit {
  animation: none;
}

body[data-state="admitted"] .status-icon-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(25, 188, 162, 0.16);
}

body[data-state="terminal"] .status-icon-dot,
body[data-state="error"] .status-icon-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(197, 75, 98, 0.13);
}

body[data-state="terminal"] .activity,
body[data-state="admitted"] .activity {
  visibility: hidden;
}

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

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

@keyframes pulse {
  0%, 65%, 100% { opacity: 0.25; transform: translateY(0); }
  32% { opacity: 1; transform: translateY(-4px); }
}

@media (max-width: 520px) {
  .page-shell {
    align-content: stretch;
    padding: 0;
  }

  .waiting-card {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-radius: 0 0 26px 26px;
    box-shadow: none;
  }

  .topbar {
    margin-top: 4px;
  }

  .language-picker label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  footer {
    padding-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
