/**
 * tour-guide.css — Spotlight overlay + tooltip styles for Catnip first-visit tour.
 *
 * Owns: overlay dim layer, spotlight highlight ring, tooltip card, completion toast.
 * Does NOT own: prefs modal, census panel, any other modal/overlay.
 */

/* ── Overlay (dim layer, full-screen, pointer-events block except spotlight) ── */
#catnipTourOverlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  pointer-events: auto;
  /* Actual dimming handled by spotlight box-shadow so we keep clicks through
     to the spotlight area. The overlay itself is transparent. */
  background: transparent;
}

/* ── Spotlight ── */
#catnipTourSpotlight {
  position: fixed;
  z-index: 9901;
  pointer-events: none;
  border-radius: 8px;
  /* box-shadow set dynamically in JS: amber ring + full-page dark fog */
}

/* ── Tooltip card ── */
#catnipTourTooltip {
  position: fixed;
  z-index: 9902;
  width: 280px;
  background: #FAF6EC;
  border: 2px solid #5C4A3A;
  border-radius: 16px 14px 18px 15px / 15px 18px 14px 16px;
  box-shadow: 3px 3px 0 #8B7160, 0 8px 28px rgba(42, 33, 24, 0.22);
  padding: 1rem 1.1rem 0.85rem;
  pointer-events: auto;
  animation: tgTooltipIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

html[data-cat-theme="dark"] #catnipTourTooltip {
  background: #2A2118;
  border-color: #8B7160;
  box-shadow: 3px 3px 0 rgba(139, 113, 96, 0.5), 0 8px 28px rgba(0, 0, 0, 0.5);
}

@keyframes tgTooltipIn {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Step counter */
.tg-step-count {
  font-family: 'Caveat', cursive;
  font-size: 0.78rem;
  color: #C9B8A8;
  margin-bottom: 0.25rem;
}

html[data-cat-theme="dark"] .tg-step-count {
  color: #7A6A5A;
}

/* Step title */
.tg-title {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  font-weight: 700;
  color: #2A2118;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

html[data-cat-theme="dark"] .tg-title {
  color: #F0E6D2;
}

/* Step body */
.tg-body {
  font-family: 'Caveat', cursive;
  font-size: 0.95rem;
  color: #5C4A3A;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

html[data-cat-theme="dark"] .tg-body {
  color: #C9B8A8;
}

/* Action row */
.tg-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Skip button */
.tg-skip {
  font-family: 'Caveat', cursive;
  font-size: 0.88rem;
  color: #8B7160;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.tg-skip:hover {
  color: #5C4A3A;
}

html[data-cat-theme="dark"] .tg-skip {
  color: #7A6A5A;
}

html[data-cat-theme="dark"] .tg-skip:hover {
  color: #C9B8A8;
}

/* Next / Done button */
.tg-next {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  font-weight: 700;
  color: #FAF6EC;
  background: #E8A04C;
  border: none;
  border-radius: 9px 8px 10px 8px / 8px 10px 8px 9px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 #8B5A2B;
  transition: background 0.15s, transform 0.1s;
}

.tg-next:hover {
  background: #D4903C;
  transform: translateY(-1px);
}

.tg-next:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 #8B5A2B;
}

/* ── Completion toast ── */
#catnipTourToast {
  position: fixed;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 9950;
  background: #FAF6EC;
  border: 2px solid #5C4A3A;
  border-radius: 12px 11px 13px 11px / 11px 13px 11px 12px;
  box-shadow: 2px 2px 0 #8B7160, 0 6px 20px rgba(42, 33, 24, 0.2);
  padding: 0.65rem 1.2rem;
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2A2118;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#catnipTourToast.tg-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

html[data-cat-theme="dark"] #catnipTourToast {
  background: #2A2118;
  border-color: #8B7160;
  color: #F0E6D2;
  box-shadow: 2px 2px 0 rgba(139, 113, 96, 0.5), 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  #catnipTourTooltip {
    width: calc(100vw - 2rem);
    left: 1rem !important;
    right: 1rem;
  }

  #catnipTourToast {
    white-space: normal;
    width: calc(100vw - 3rem);
    text-align: center;
  }
}
