/* Pass the World — guide-triggered contextual walkthrough */

.ptw-wt {
  position: fixed;
  inset: 0;
  z-index: 520;
  pointer-events: none;
}

.ptw-wt[hidden] {
  display: none !important;
}

.ptw-wt.is-visible {
  pointer-events: none;
}

.ptw-wt__spotlight {
  position: fixed;
  z-index: 1;
  box-sizing: border-box;
  border: 2px solid rgba(78, 197, 232, 0.85);
  border-radius: 18px;
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(78, 197, 232, 0.25),
    0 0 22px rgba(78, 197, 232, 0.22);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.26s ease, top 0.26s ease, left 0.26s ease, width 0.26s ease, height 0.26s ease, border-radius 0.26s ease;
}

.ptw-wt.is-visible .ptw-wt__spotlight {
  opacity: 1;
}

.ptw-wt__spotlight--pill {
  border-radius: 999px;
}

.ptw-wt__spotlight--stats {
  border-radius: 20px;
}

.ptw-wt__spotlight--map {
  border-radius: 22px;
}

.ptw-wt__callout {
  position: fixed;
  z-index: 3;
  width: min(260px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(78, 197, 232, 0.32);
  background: rgba(16, 18, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.26s ease, transform 0.26s ease;
  pointer-events: none;
}

.ptw-wt.is-visible .ptw-wt__callout {
  opacity: 1;
  transform: translateY(0);
}

.ptw-wt__callout-title {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text-primary);
}

.ptw-wt__callout-copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-muted, #8a8e9a);
}

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

.ptw-wt__footer {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height, 84px) + 10px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.26s ease;
}

.ptw-wt.is-visible .ptw-wt__footer {
  opacity: 1;
}

.ptw-wt__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ptw-wt__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ptw-wt__dot.is-active {
  background: var(--accent-aurora, #4ec5e8);
  transform: scale(1.1);
}

.ptw-wt__next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 14px 20px;
  border: 1px solid rgba(78, 197, 232, 0.45);
  border-radius: var(--radius-md, 14px);
  background: rgba(78, 197, 232, 0.08);
  color: var(--accent-aurora, #4ec5e8);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.ptw-wt__next:focus-visible {
  outline: 2px solid var(--accent-aurora, #4ec5e8);
  outline-offset: 2px;
}

body.ptw-wt-active .ptw,
body.ptw-wt-active #passport-story-view .passport-stats,
body.ptw-wt-active .passport-card--ptw {
  pointer-events: none;
}

body.ptw-wt-active .bottom-nav {
  pointer-events: none;
  opacity: 0.42;
}

@media (max-height: 640px) {
  .ptw-wt__footer {
    gap: 10px;
    bottom: calc(var(--nav-height, 84px) + 6px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ptw-wt__spotlight,
  .ptw-wt__callout,
  .ptw-wt__footer,
  .ptw-wt__dot {
    transition: none;
  }

  .ptw-wt__callout {
    transform: none;
  }
}
