/* Guided spotlight tour — shared by the portal and the visual editor. */
.pi-tour {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}

.pi-tour-hole {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(4, 10, 16, 0.74);
  outline: 2px solid rgba(88, 182, 232, 0.95);
  outline-offset: 3px;
  pointer-events: none;
  opacity: 0;
  transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1), left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1), height 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.pi-tour-card {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2147483001;
  width: min(340px, calc(100vw - 28px));
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: rgba(15, 26, 36, 0.98);
  border: 1px solid rgba(155, 190, 210, 0.24);
  color: #f4f7f8;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: top 0.24s cubic-bezier(0.22, 1, 0.36, 1), left 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.pi-tour-card.is-centered {
  width: min(400px, calc(100vw - 28px));
  transform: translate(-50%, -50%);
  text-align: left;
}

.pi-tour-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #8ea1ae;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.pi-tour-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f4f7f8;
}

.pi-tour-eyebrow {
  margin: 0 0 8px;
  padding-right: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #58b6e8;
}
.pi-tour-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
  color: #f4f7f8;
}
.pi-tour-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #c3d0da;
}

.pi-tour-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 0 0;
  font-size: 13px;
  color: #34d3a3;
}
.pi-tour-pulse {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d3a3;
  box-shadow: 0 0 0 0 rgba(52, 211, 163, 0.6);
  animation: pi-tour-pulse 1.5s infinite;
}
@keyframes pi-tour-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 163, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 163, 0); }
}

.pi-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.pi-tour-nav {
  display: flex;
  gap: 8px;
}
.pi-tour-actions button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}
.pi-tour-skip {
  border: 0;
  background: none;
  padding: 8px 2px;
  color: #8ea1ae;
  font-size: 13px;
}
.pi-tour-skip:hover {
  color: #f4f7f8;
}
.pi-tour-back {
  border: 1px solid rgba(155, 190, 210, 0.3);
  background: transparent;
  padding: 8px 14px;
  color: #f4f7f8;
  font-size: 14px;
}
.pi-tour-back:hover {
  background: rgba(255, 255, 255, 0.06);
}
.pi-tour-next {
  border: 0;
  background: #2f8fd0;
  padding: 8px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.pi-tour-next:hover {
  background: #3a9de0;
}
.pi-tour-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pi-tour-optout {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(155, 190, 210, 0.16);
  color: #9fb1bd;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.pi-tour-optout input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2f8fd0;
  cursor: pointer;
}
.pi-tour-optout:hover {
  color: #dfe7ec;
}

.pi-tour-target {
  position: relative;
}

@media (max-width: 560px) {
  .pi-tour-card {
    width: calc(100vw - 20px) !important;
    left: 10px !important;
  }
  .pi-tour-card.is-centered {
    transform: translate(0, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pi-tour-hole,
  .pi-tour-card {
    transition: opacity 0.2s ease;
  }
  .pi-tour-pulse {
    animation: none;
  }
}
