/* Guided Tour — spotlight overlay + info card */

/* Fixed backdrop — click to dismiss */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

/* Spotlight cutout via box-shadow */
.tour-spotlight {
  position: fixed;
  z-index: 10001;
  border-radius: var(--radius-sm, 4px);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity var(--transition-base, 200ms ease),
    top var(--transition-base, 200ms ease),
    left var(--transition-base, 200ms ease),
    width var(--transition-base, 200ms ease),
    height var(--transition-base, 200ms ease);
}

.tour-spotlight.visible {
  opacity: 1;
}

/* Target element highlight — no position override to avoid breaking fixed/absolute elements */
.tour-target {
  z-index: 10002 !important;
  box-shadow:
    0 0 0 2px var(--color-accent-orange, #cc6600),
    0 0 12px rgba(204, 102, 0, 0.4);
  border-radius: var(--radius-sm, 4px);
  animation: tourPulse 1.5s ease-in-out infinite;
}

@keyframes tourPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px #cc6600,
      0 0 12px rgba(204, 102, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 3px #cc6600,
      0 0 20px rgba(204, 102, 0, 0.6);
  }
}

/* ================================
   TOUR CARD
   ================================ */

.tour-card {
  position: fixed;
  z-index: 10003;
  width: 400px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0c1220 0%, #162032 50%, #1a2640 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 6px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 1px rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  transition: opacity var(--transition-base, 200ms ease);
  pointer-events: auto;
  overflow: hidden;
}

.tour-card.visible {
  opacity: 1;
}

/* Orange accent bar at top */
.tour-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #cc6600, #e8943a, #cc6600);
  flex-shrink: 0;
}

/* ================================
   CARD HEADER
   ================================ */

.tour-card-header {
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tour-card-header h4 {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex: 1;
}

.tour-step-badge {
  font-size: var(--font-size-xs);
  font-family: var(--gd-font-mono);
  color: #cc6600;
  background: rgba(204, 102, 0, 0.08);
  border: 1px solid rgba(204, 102, 0, 0.2);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Progress bar */
.tour-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  margin: 0 20px;
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
}

.tour-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #cc6600, #e8943a);
  border-radius: 1px;
  transition: width 0.3s ease;
}

/* ================================
   CARD BODY
   ================================ */

.tour-card-body {
  padding: 16px 20px;
  color: #b0c4d8;
  font-size: 12.5px;
  line-height: 1.65;
  overflow-y: auto;
  flex: 1;
}

/* Bold labels within content */
.tour-card-body b {
  color: #e2e8f0;
  font-weight: 600;
}

/* Italic text (examples) */
.tour-card-body i {
  color: #8b9cb8;
  font-style: italic;
}

/* Line break spacing — tighter for list items, wider for paragraph breaks */
.tour-card-body br + b {
  margin-left: 0;
}

/* ================================
   CARD FOOTER
   ================================ */

.tour-card-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.tour-card-nav {
  display: flex;
  gap: 8px;
}

/* Shared button base */
.tour-btn-dismiss,
.tour-btn-back,
.tour-btn-next {
  padding: 7px 16px;
  border-radius: 3px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.tour-btn-dismiss {
  background: rgba(255, 255, 255, 0.04);
  color: #7a92a8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tour-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #b0c4d8;
}

.tour-btn-back {
  background: transparent;
  color: #7a92a8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-btn-back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
  border-color: rgba(255, 255, 255, 0.15);
}

.tour-btn-next {
  background: #cc6600;
  color: #fff;
  border: 1px solid #b35900;
}

.tour-btn-next:hover {
  background: #e07000;
  border-color: #cc6600;
}

/* ================================
   MENU BAR TOUR BUTTON
   ================================ */

.tour-menu-btn {
  cursor: pointer;
}

/* ================================
   EXAMPLE POPUP (shown during tour)
   ================================ */

.tour-example-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  width: min(320px, 80vw);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tour-example-label {
  text-align: center;
  padding: 5px;
  font-size: var(--font-size-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #cc6600;
  background: rgba(204, 102, 0, 0.1);
  border-top: 1px solid rgba(204, 102, 0, 0.25);
}
