:root {
  --purchase-tour-surface: rgba(252, 248, 242, 0.98);
  --purchase-tour-surface-strong: rgba(255, 255, 255, 0.98);
  --purchase-tour-text: #1f1914;
  --purchase-tour-muted: #6f675f;
  --purchase-tour-border: rgba(34, 28, 22, 0.12);
  --purchase-tour-shadow: 0 22px 60px rgba(21, 16, 12, 0.16);
  --purchase-tour-accent: #111111;
  --purchase-tour-accent-soft: rgba(186, 158, 123, 0.28);
}

.purchase-tour-root {
  position: fixed;
  inset: 0;
  z-index: 200500;
  pointer-events: none;
}

.purchase-tour-root[hidden] {
  display: none;
}

.purchase-tour-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 22px;
  box-shadow: 0 0 0 9999px rgba(16, 13, 10, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  pointer-events: none;
  transition:
    transform 220ms ease,
    width 220ms ease,
    height 220ms ease,
    opacity 220ms ease,
    top 220ms ease,
    left 220ms ease;
}

.purchase-tour-panel {
  position: fixed;
  width: min(360px, calc(100vw - 24px));
  padding: 16px 16px 14px;
  border-radius: 22px;
  color: var(--purchase-tour-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, var(--purchase-tour-surface-strong), var(--purchase-tour-surface));
  border: 1px solid var(--purchase-tour-border);
  box-shadow: var(--purchase-tour-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
  transition:
    transform 220ms ease,
    opacity 220ms ease,
    top 220ms ease,
    left 220ms ease;
}

.purchase-tour-panel[data-placement="top"] {
  transform-origin: bottom center;
}

.purchase-tour-panel[data-placement="bottom"] {
  transform-origin: top center;
}

.purchase-tour-panel[data-placement="left"] {
  transform-origin: center right;
}

.purchase-tour-panel[data-placement="right"] {
  transform-origin: center left;
}

.purchase-tour-panel::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: inherit;
  border-left: 1px solid var(--purchase-tour-border);
  border-top: 1px solid var(--purchase-tour-border);
  transform: rotate(45deg);
}

.purchase-tour-panel[data-placement="top"]::before {
  left: calc(var(--purchase-tour-arrow-left, 50%) - 7px);
  bottom: -7px;
}

.purchase-tour-panel[data-placement="bottom"]::before {
  left: calc(var(--purchase-tour-arrow-left, 50%) - 7px);
  top: -7px;
}

.purchase-tour-panel[data-placement="left"]::before {
  top: calc(var(--purchase-tour-arrow-top, 50%) - 7px);
  right: -7px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid var(--purchase-tour-border);
  border-bottom: 1px solid var(--purchase-tour-border);
}

.purchase-tour-panel[data-placement="right"]::before {
  top: calc(var(--purchase-tour-arrow-top, 50%) - 7px);
  left: -7px;
}

.purchase-tour-panel-inner {
  position: relative;
}

.purchase-tour-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purchase-tour-muted);
}

.purchase-tour-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.55), rgba(17, 17, 17, 0));
}

.purchase-tour-title {
  margin: 0 34px 8px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--purchase-tour-text);
}

.purchase-tour-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--purchase-tour-muted);
}

.purchase-tour-dismiss {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.05);
  color: rgba(17, 17, 17, 0.72);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.purchase-tour-dismiss:hover,
.purchase-tour-dismiss:focus {
  background: rgba(17, 17, 17, 0.09);
  color: var(--purchase-tour-accent);
  outline: none;
}

.purchase-tour-pulse {
  position: fixed;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
  pointer-events: none;
  animation: purchase-tour-pulse 2.2s ease-out infinite;
}

@keyframes purchase-tour-pulse {
  0% {
    transform: scale(0.82);
    opacity: 0;
  }
  18% {
    opacity: 0.52;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .purchase-tour-spotlight {
    border-radius: 20px;
    box-shadow: 0 0 0 9999px rgba(16, 13, 10, 0.12);
  }

  .purchase-tour-panel {
    width: min(340px, calc(100vw - 20px));
    padding: 15px 15px 13px;
    border-radius: 20px;
  }

  .purchase-tour-title {
    font-size: 16px;
    margin-right: 30px;
  }

  .purchase-tour-body {
    font-size: 13px;
    line-height: 1.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .purchase-tour-spotlight,
  .purchase-tour-panel,
  .purchase-tour-pulse {
    animation: none !important;
    transition: none !important;
  }
}
