/* ============================================
   TrekSense Onboarding Tooltip System
   Pure CSS — no external libraries required
   ============================================ */

/* Backdrop overlay */
.onboard-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(10, 14, 26, 0.65);
  pointer-events: none;
  animation: onboardFadeIn 0.25s ease-out;
}

@keyframes onboardFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Spotlight: cut out the target element via box-shadow inset */
.onboard-spotlight {
  position: fixed;
  z-index: 9998;
  border-radius: 10px;
  box-shadow: 0 0 0 4000px rgba(10, 14, 26, 0.65);
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Tooltip card */
.onboard-tooltip {
  position: fixed;
  z-index: 9999;
  width: 280px;
  background: var(--bg-surface);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.04);
  pointer-events: all;
  animation: onboardSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes onboardSlideIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.onboard-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.onboard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.onboard-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
}

.onboard-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.onboard-body {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.onboard-body strong {
  color: var(--fg);
}

.onboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.onboard-next {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  flex-shrink: 0;
}

.onboard-next:hover { opacity: 0.88; }
.onboard-next:active { transform: scale(0.97); }

.onboard-skip {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-body);
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.25rem;
}

.onboard-skip:hover { opacity: 1; }

/* Progress dots */
.onboard-dots {
  display: flex;
  gap: 4px;
  margin-top: 0.85rem;
}

.onboard-dot {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}

.onboard-dot.active { background: var(--accent); }
.onboard-dot.done   { background: rgba(212, 168, 83, 0.4); }

/* Arrow connector (CSS triangle) */
.onboard-arrow {
  position: absolute;
  width: 0;
  height: 0;
}

.onboard-arrow.up {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--bg-surface);
}

.onboard-arrow.down {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bg-surface);
}

.onboard-arrow.left {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--bg-surface);
}

.onboard-arrow.right {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--bg-surface);
}

/* Tooltip — positioning variants */
.onboard-tooltip.below  { margin-top: 10px; }
.onboard-tooltip.above  { margin-bottom: 10px; }
.onboard-tooltip.right  { margin-left: 10px; }
.onboard-tooltip.left   { margin-right: 10px; }

/* First-visit banner (subtle, dismissable) */
.onboard-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9996;
  background: var(--bg-surface);
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  max-width: 280px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: onboardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: none;
}

.onboard-banner.visible { display: block; }

.onboard-banner-text {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.onboard-banner-text strong {
  color: var(--fg);
  font-weight: 600;
}

.onboard-banner-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.onboard-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.onboard-banner-cta:hover { opacity: 0.88; }

.onboard-banner-dismiss {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 0.25rem;
  font-family: var(--font-body);
}

.onboard-banner-dismiss:hover { opacity: 1; }

/* Mobile: full-width tooltip at bottom */
@media (max-width: 600px) {
  .onboard-tooltip {
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    top: auto;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
    border-radius: 16px 16px 8px 8px;
  }

  .onboard-banner {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}