/* ==========================================================
   TixHub — First-load spotlight tour
   tour.css
   ========================================================== */

.tx-tour-root {
  position: fixed;
  inset: 0;
  z-index: 99000;
  pointer-events: none;
  font-family: 'DM Sans', system-ui, sans-serif;
  /* Hidden by default; .visible flips it on */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease;
}
.tx-tour-root.visible {
  opacity: 1;
  visibility: visible;
}

/* Full-screen scrim with a punched-out hole over the target */
.tx-tour-scrim {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  /* Cut a hole using box-shadow on a positioned element (see __hole) */
  background: transparent;
}

/* The "hole" is a transparent box with a massive outer shadow that
   makes the rest of the screen go dark. Border-radius gives the
   highlighted edge a soft corner. */
.tx-tour-hole {
  position: absolute;
  pointer-events: none;
  border-radius: 12px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.65),
    0 0 0 2px rgba(232, 85, 64, 0.55),
    0 0 24px 4px rgba(232, 85, 64, 0.18);
  transition:
    top 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Popover */
.tx-tour-popover {
  position: absolute;
  background: var(--tx-card-bg);
  color: var(--tx-text);
  border: 1px solid var(--tx-border-mid);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 16px 18px 14px;
  pointer-events: auto;
  transition:
    top 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.tx-tour-popover__step {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tx-coral);
  font-weight: 600;
  margin-bottom: 6px;
}

.tx-tour-popover__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--tx-text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.tx-tour-popover__body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--tx-muted);
  margin: 0 0 14px;
}

/* Arrow pointing at the spotlit element */
.tx-tour-popover__arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--tx-card-bg);
  border-left: 1px solid var(--tx-border-mid);
  border-top: 1px solid var(--tx-border-mid);
  transform: rotate(45deg);
}
.tx-tour-popover[data-pos="bottom"] .tx-tour-popover__arrow {
  top: -7px; left: 50%; margin-left: -6px;
  transform: rotate(45deg);
}
.tx-tour-popover[data-pos="top"] .tx-tour-popover__arrow {
  bottom: -7px; left: 50%; margin-left: -6px;
  transform: rotate(225deg);
}
.tx-tour-popover[data-pos="right"] .tx-tour-popover__arrow {
  left: -7px; top: 50%; margin-top: -6px;
  transform: rotate(-45deg);
}
.tx-tour-popover[data-pos="left"] .tx-tour-popover__arrow {
  right: -7px; top: 50%; margin-top: -6px;
  transform: rotate(135deg);
}
.tx-tour-popover[data-pos="center"] .tx-tour-popover__arrow {
  display: none;
}

/* Controls */
.tx-tour-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.tx-tour-controls__left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tx-tour-controls__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tx-tour-progress {
  display: flex;
  gap: 4px;
  align-items: center;
}
.tx-tour-progress__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tx-border-mid);
  transition: background 0.15s, width 0.15s;
}
.tx-tour-progress__dot.active {
  background: var(--tx-coral);
  width: 18px;
  border-radius: 3px;
}
.tx-tour-progress__dot.done {
  background: var(--tx-muted);
}

.tx-tour-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--tx-text);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.tx-tour-btn--primary {
  background: var(--tx-coral);
  color: var(--tx-on-accent);
  border-color: var(--tx-coral);
}
.tx-tour-btn--primary:hover {
  filter: brightness(1.08);
}

.tx-tour-btn--ghost {
  border-color: var(--tx-border-mid);
  color: var(--tx-text);
}
.tx-tour-btn--ghost:hover {
  background: var(--tx-dropdown-hover);
  border-color: var(--tx-text);
}

.tx-tour-btn--quiet {
  color: var(--tx-muted);
  padding: 6px 10px;
  font-size: 12px;
}
.tx-tour-btn--quiet:hover {
  color: var(--tx-text);
}

/* Persistent dismissal checkbox */
.tx-tour-dontshow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--tx-muted);
  user-select: none;
  cursor: pointer;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--tx-divider);
}
.tx-tour-dontshow input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--tx-coral);
}

/* Floating help button — re-open the tour any time */
.tx-tour-help-btn {
  position: fixed;
  bottom: 20px;
  right: 76px;  /* Sits to the left of the theme toggle */
  z-index: 9998;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: var(--tx-card-bg);
  border: 1px solid var(--tx-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 18px;
  font-weight: 500;
  font-family: inherit;
  padding: 0;
}
.tx-tour-help-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .tx-tour-popover {
    width: calc(100vw - 24px);
    padding: 14px 16px 12px;
  }
  .tx-tour-help-btn {
    bottom: 12px;
    right: 64px;
    width: 40px;
    height: 40px;
  }
}
