/* ===================================================================
   Octologic Health — Spotlight Tour
   Guided walkthrough overlay with spotlight cutout + tooltip bubbles.
   =================================================================== */

/* ── Overlay (blocks interaction with everything except spotlight) ── */
.oh-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: auto;
}

/* ── Spotlight cutout ── */
.oh-tour-spotlight {
  position: fixed;
  z-index: 9998;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}

/* ── Tooltip bubble ── */
.oh-tour-bubble {
  position: fixed;
  z-index: 9999;
  background: var(--bg-surface, #fff);
  border-radius: 12px;
  padding: 24px 24px 16px;
  max-width: 340px;
  min-width: 260px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  color: var(--text-primary, #1e293b);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.oh-tour-bubble.oh-tour-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Arrow — positioned dynamically via data-arrow attribute */
.oh-tour-bubble::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--bg-surface, #fff);
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

/* Arrow directions */
.oh-tour-bubble[data-arrow="top"]::after    { top: -7px; left: 50%; margin-left: -7px; }
.oh-tour-bubble[data-arrow="bottom"]::after { bottom: -7px; left: 50%; margin-left: -7px; box-shadow: 2px 2px 4px rgba(0,0,0,0.04); }
.oh-tour-bubble[data-arrow="left"]::after   { left: -7px; top: 50%; margin-top: -7px; }
.oh-tour-bubble[data-arrow="right"]::after  { right: -7px; top: 50%; margin-top: -7px; box-shadow: 2px -2px 4px rgba(0,0,0,0.04); }

/* ── Step counter ── */
.oh-tour-step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #596673);
  margin-bottom: 6px;
}

/* ── Title ── */
.oh-tour-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading, #0f172a);
  margin: 0 0 8px;
  line-height: 1.3;
}

/* ── Body text ── */
.oh-tour-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary, #475569);
  margin: 0 0 16px;
}

/* ── Button row ── */
.oh-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.oh-tour-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.oh-tour-btn-next {
  background: var(--brand-deep-teal, #0E6B6B);
  color: var(--text-on-dark, #fff);
}
.oh-tour-btn-next:hover { opacity: 0.9; }

.oh-tour-btn-skip {
  background: transparent;
  color: var(--text-muted, #596673);
  padding: 8px 10px;
}
.oh-tour-btn-skip:hover { color: var(--text-secondary, #475569); }

.oh-tour-btn-back {
  background: var(--bg-surface-alt, #f1f5f9);
  color: var(--text-secondary, #475569);
}
.oh-tour-btn-back:hover { background: var(--border-default, #e2e8f0); }

/* ── Progress dots ── */
.oh-tour-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.oh-tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-default, #cbd5e1);
  transition: background 0.2s ease;
}
.oh-tour-dot--active {
  background: var(--brand-deep-teal, #0E6B6B);
}

/* ── Welcome overlay (centered card, no spotlight target) ── */
.oh-tour-welcome {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}
.oh-tour-welcome-card {
  background: var(--bg-surface, #fff);
  border-radius: 16px;
  padding: 40px 36px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
}
.oh-tour-welcome-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.oh-tour-welcome-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading, #0f172a);
  margin: 0 0 10px;
}
.oh-tour-welcome-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary, #475569);
  margin: 0 0 24px;
}
.oh-tour-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.oh-tour-welcome-start {
  border: none;
  border-radius: 10px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand-deep-teal, #0E6B6B);
  color: var(--text-on-dark, #fff);
  width: 100%;
  max-width: 240px;
  transition: opacity 0.15s ease;
}
.oh-tour-welcome-start:hover { opacity: 0.9; }
.oh-tour-welcome-dismiss {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-muted, #596673);
  cursor: pointer;
  padding: 6px 12px;
}
.oh-tour-welcome-dismiss:hover { color: var(--text-secondary, #475569); }

/* ── Relaunch button (persistent, unobtrusive) ── */
.oh-tour-help-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-default, #e2e8f0);
  background: var(--bg-surface, #fff);
  color: var(--text-muted, #596673);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
}
.oh-tour-help-btn:hover {
  border-color: var(--brand-deep-teal, #0E6B6B);
  color: var(--brand-deep-teal, #0E6B6B);
  box-shadow: 0 2px 12px rgba(14, 107, 107, 0.15);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .oh-tour-bubble { max-width: 280px; min-width: 220px; padding: 18px 18px 14px; }
  .oh-tour-welcome-card { padding: 28px 24px 24px; }
}

/* ── Dark mode — tour contrast fixes ──────────────────────── */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .oh-tour-welcome-card h2 { color: var(--text-primary, #E2E8F0); }
  html:not([data-theme="light"]) .oh-tour-welcome-dismiss { color: var(--text-secondary, #94A3B8); }
  html:not([data-theme="light"]) .oh-tour-help-btn { color: var(--text-secondary, #94A3B8); }
}
