/* ============================================================
   guide.css — Product Tour / UI Guide Overlay System
   Pure CSS, no frameworks
   ============================================================ */

/* ── Overlay ── */
#guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: all;
  transition: opacity 0.3s ease;
}

#guide-overlay.guide-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Spotlight cutout: four dark rectangles surrounding the target ── */
#guide-spot-top,
#guide-spot-bottom,
#guide-spot-left,
#guide-spot-right {
  position: fixed;
  background: rgba(0, 0, 0, 0.72);
  z-index: 99991;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

/* ── Spotlight ring highlight ── */
#guide-spotlight-ring {
  position: fixed;
  z-index: 99992;
  border-radius: 8px;
  pointer-events: none;
  box-shadow:
    0 0 0 2px rgba(99, 179, 237, 0.9),
    0 0 0 4px rgba(99, 179, 237, 0.3),
    0 0 20px rgba(99, 179, 237, 0.4);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Pulse animation on highlighted element ── */
.guide-pulse-active {
  animation: guide-pulse 1.6s ease-in-out infinite !important;
  position: relative;
  z-index: 99993 !important;
}

@keyframes guide-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 179, 237, 0.6); }
  50%       { box-shadow: 0 0 0 8px rgba(99, 179, 237, 0); }
}

/* ── Tooltip Card ── */
#guide-tooltip {
  position: fixed;
  z-index: 99999;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.07),
    0 20px 40px rgba(0,0,0,0.16);
  padding: 20px 20px 16px;
  font-family: 'Noto Sans KR', 'Manrope', 'Inter', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

#guide-tooltip.guide-hidden {
  opacity: 0;
  transform: scale(0.95) translateY(4px);
  pointer-events: none;
}

/* Tooltip arrow */
#guide-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 2px;
  transform: rotate(45deg);
  transition: all 0.3s ease;
}

#guide-tooltip.arrow-top::before    { bottom: -6px; left: 24px; box-shadow: 2px 2px 4px rgba(0,0,0,0.08); }
#guide-tooltip.arrow-bottom::before { top: -6px;    left: 24px; box-shadow: -2px -2px 4px rgba(0,0,0,0.06); }
#guide-tooltip.arrow-none::before   { display: none; }

/* Header row: step badge + title */
#guide-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#guide-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Special badge for sync/important steps */
#guide-step-badge.badge-important {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Tooltip body text */
#guide-tooltip-text {
  font-size: 14px;
  line-height: 1.65;
  color: #1e293b;
  font-weight: 500;
  margin-bottom: 16px;
}

/* ── Progress bar ── */
#guide-progress-bar-wrap {
  width: 100%;
  height: 3px;
  background: #f1f5f9;
  border-radius: 99px;
  margin-bottom: 14px;
  overflow: hidden;
}

#guide-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 99px;
  transition: width 0.35s ease;
}

/* ── Navigation row ── */
#guide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#guide-step-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

#guide-nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-btn {
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 7px 14px;
  transition: all 0.18s;
  font-family: inherit;
}

.guide-btn:active {
  transform: scale(0.95);
}

#guide-btn-skip {
  background: transparent;
  color: #94a3b8;
  padding: 7px 10px;
}
#guide-btn-skip:hover { color: #64748b; background: #f8fafc; }

#guide-btn-prev {
  background: #f1f5f9;
  color: #475569;
}
#guide-btn-prev:hover { background: #e2e8f0; }
#guide-btn-prev:disabled { opacity: 0.35; cursor: not-allowed; }

#guide-btn-next {
  background: #2563eb;
  color: #ffffff;
  padding: 7px 18px;
}
#guide-btn-next:hover { background: #1d4ed8; }

/* Last step: finish button style */
#guide-btn-next.guide-finish {
  background: linear-gradient(135deg, #10b981, #059669);
}
#guide-btn-next.guide-finish:hover { background: #059669; }

/* ── Floating "Guide" restart button ── */
#guide-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 89000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 12px 18px 12px 14px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.02em;
}

#guide-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.5);
}

#guide-fab:active { transform: scale(0.96); }

#guide-fab.guide-fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

#guide-fab .guide-fab-icon {
  font-size: 16px;
  line-height: 1;
}

/* ── Highlight badge on FAB (shows when guide is available) ── */
#guide-fab-dot {
  width: 7px;
  height: 7px;
  background: #fbbf24;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7);
  animation: guide-dot-pulse 2.5s ease-in-out infinite;
}

@keyframes guide-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.3); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #guide-tooltip {
    width: calc(100vw - 32px);
    bottom: 80px;
    left: 16px !important;
    top: auto !important;
    right: auto !important;
  }

  #guide-tooltip::before { display: none; }

  #guide-fab {
    bottom: 16px;
    right: 16px;
    padding: 10px 14px 10px 12px;
    font-size: 12px;
  }
}
