/* ===== Onboarding Tour Overlay ===== */

/* Elevate target element above the backdrop so users can interact directly */
.tour-target-elevated {
  z-index: 100001 !important;
  pointer-events: auto !important;
}

/* Dissolve stacking contexts on ancestors so the target can escape to
   the body-level stacking context. Without this, an ancestor's background
   (e.g. .main-content with z-index:0) paints over the spotlight box-shadow.
   pointer-events: none ensures only the target itself is clickable,
   not sibling elements inside the elevated ancestor. */
.tour-ancestor-elevated {
  z-index: 100001 !important;
  pointer-events: none !important;
}

/* Backdrop — sits behind spotlight to catch clicks */
.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: transparent;
}

/* Spotlight — box-shadow cutout technique */
.tour-spotlight {
  position: fixed;
  z-index: 100001;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(17, 24, 39, 0.55);
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

/* Tooltip card */
.tour-tooltip {
  position: fixed;
  z-index: 100002;
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-width: 340px;
  min-width: 240px;
  animation: tipPop 0.25s ease-out;
}

.tour-tooltip__icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.tour-tooltip__text {
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  margin-bottom: 16px;
}

.tour-tooltip__text strong {
  color: #111827;
}

/* Footer row: dots + skip/next */
.tour-tooltip__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tour-tooltip__dots {
  display: flex;
  gap: 6px;
}

.tour-tooltip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.2s;
}

.tour-tooltip__dot--active {
  background: #6366f1;
}

.tour-tooltip__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tour-tooltip__skip {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.tour-tooltip__skip:hover {
  color: #6b7280;
}

.tour-tooltip__next {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tour-tooltip__next:hover {
  background: #4f46e5;
}

/* Arrow pseudo-element (8px triangle) */
.tour-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
}

/* Arrow positions */
.tour-tooltip--right::before {
  left: -6px;
  top: 24px;
}

.tour-tooltip--left::before {
  right: -6px;
  top: 24px;
}

.tour-tooltip--below::before {
  top: -6px;
  left: 24px;
}

.tour-tooltip--above::before {
  bottom: -6px;
  left: 24px;
}

/* Waiting/spinner state */
.tour-tooltip__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: tourSpin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== Modals (welcome & done) ===== */
.tour-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100003;
  background: rgba(17, 24, 39, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}

.tour-modal {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90vw;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.3s ease-out;
}

.tour-modal__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.tour-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.tour-modal__body {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 36px;
  margin-top: 24px;
}

.tour-modal__logo {
  width: 135px;
  height: 100px;
  margin-bottom: 8px;
  object-fit: contain;
}

.tour-modal__subtitle {
  color: #6366f1;
  font-size: 15px;
  margin: -4px 0 16px;
}

.tour-modal__hint {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #9ca3af;
}

.tour-modal__btn {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.tour-modal__btn:hover {
  background: #4f46e5;
}

.tour-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
}

.tour-modal__close:hover {
  color: #6b7280;
}

.tour-modal__skip {
  display: block;
  margin-top: 12px;
  margin-left: auto;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
}

.tour-modal__skip:hover {
  color: #6b7280;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes tipPop {
  from { opacity: 0; transform: scale(0.95) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes tourSpin {
  to { transform: rotate(360deg); }
}
