/* web/hud/pointer.css
   A cutscene pointing at the screen (web/hud/pointer.js): a gold ring with its caption
   beside it and the rest of the screen dimmed, a nudge inside the input line, and a part
   of the room lit while the rest of the game window dims. Clicks pass through all of it.
   The ring sits under the Panels menu and the Report window, so either opens over it, and
   dims nothing while Settings shows on the Stage, so Settings stays bright beside it. */

:root { --pt-gold: #f5d061; --pt-ink: #15171c; }

.pt-ring, .pt-caption, .pt-nudge {
  position: fixed; left: 0; top: 0; pointer-events: none; display: none;
}
.pt-ring.pt-on, .pt-caption.pt-on { display: block; }
.pt-nudge.pt-on { display: inline-flex; }

.pt-ring {
  z-index: 25; box-sizing: border-box;
  border: 2px solid var(--pt-gold); border-radius: 7px;
}
.pt-ring.pt-dim { box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .55); }
:root:has(#centre[data-stage="settings"]) .pt-ring.pt-dim { box-shadow: none; }
.pt-ring::after, .pt-nudge::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit;
  box-shadow: 0 0 14px 2px rgba(245, 208, 97, .5);
  animation: pt-breathe 1.8s ease-in-out infinite;
}

.pt-caption, .pt-nudge {
  z-index: 26; max-width: 360px; box-sizing: border-box;
  font: 600 12.5px/1.35 ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  color: var(--pt-ink); background: var(--pt-gold);
}
.pt-caption { border-radius: 10px; padding: 2px 10px; }
.pt-nudge {
  align-items: center; gap: 6px; border-radius: 12px; padding: 2px 10px 2px 8px;
}
.pt-arrow { font-weight: 700; }

/* A part of the room, lit: the rest of the game window dims and a gold mark stands
   beside each lit line. */
#screen.pt-light .col > * { transition: opacity .35s ease; }
#screen.pt-light .col > :not(.pt-lit) { opacity: .32; }
#screen .col > .pt-lit { position: relative; }
#screen .col > .pt-lit::before {
  content: ""; position: absolute; left: -9px; top: 1px; bottom: 1px;
  width: 2px; border-radius: 2px; background: var(--pt-gold);
}

/* For a screen reader: the caption, said once as the step begins. */
.pt-said {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@keyframes pt-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

@media (prefers-reduced-motion: reduce) {
  .pt-ring::after, .pt-nudge::after { animation: none; }
  #screen.pt-light .col > * { transition: none; }
}
:root[data-motion="off"] .pt-ring::after, :root[data-motion="off"] .pt-nudge::after { animation: none; }
