/* help-mode.css — 인터랙티브 매뉴얼 오버레이 스타일 */

/* ── ? 버튼 ─────────────────────────────────────────────────── */
#wh-help-btn {
  margin-left: 8px;
  padding: 2px 8px;
  font-weight: bold;
  cursor: pointer;
  background: #446688;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
}
#wh-help-btn:hover { background: #5588aa; }
#wh-help-btn.active { background: #cc4444; }

/* ── 스포트라이트 (box-shadow로 전체 오버레이, JS가 style 직접 제어) ── */
#wh-spotlight {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* ── 마커 컨테이너 ──────────────────────────────────────────── */
#wh-markers {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 10001;
  pointer-events: none;
}

/* ── 개별 마커 ──────────────────────────────────────────────── */
.wh-marker {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #446688;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  border: 2px solid #fff;
  z-index: 10001;
  transition: background 0.15s, transform 0.15s;
  user-select: none;
}
.wh-marker:hover { background: #5588aa; transform: scale(1.15); }
.wh-marker.active { background: #cc4444; border-color: #ffaaaa; }
.wh-marker:focus {
  outline: 3px solid #4af;
  outline-offset: 2px;
}

/* ── 툴팁 (말풍선) ──────────────────────────────────────────── */
#wh-tooltip {
  position: fixed;
  z-index: 10002;
  background: #1e2a38;
  color: #e8eaf0;
  border: 1px solid #446688;
  border-radius: 8px;
  padding: 12px 14px;
  max-width: 340px;
  min-width: 260px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  font-size: 13px;
  line-height: 1.5;
}

#wh-tooltip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
#wh-tooltip-title {
  flex: 1;
  font-weight: bold;
  font-size: 14px;
  color: #88ccff;
}
#wh-lang-toggle {
  background: #2c3e50;
  border: 1px solid #446688;
  color: #aac;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 12px;
}
#wh-lang-toggle:hover { background: #3a5068; }

#wh-tooltip-short {
  margin-bottom: 4px;
  color: #ccd6e0;
}

#wh-tooltip-hidden-hint {
  display: none;
  margin-bottom: 8px;
  padding: 5px 8px;
  background: #3a2800;
  border: 1px solid #886633;
  border-radius: 4px;
  color: #ffcc77;
  font-size: 12px;
  line-height: 1.4;
}

#wh-tooltip-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.wh-btn {
  background: #2c4a6a;
  border: 1px solid #446688;
  color: #e8eaf0;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}
.wh-btn:hover { background: #3a5f85; }
.wh-btn:focus { outline: 2px solid #4af; }
.wh-btn-close {
  margin-left: auto;
  background: #4a2c2c;
  border-color: #884444;
}
.wh-btn-close:hover { background: #6a3a3a; }
.wh-btn-detail { background: #2a4a2a; border-color: #447744; }
.wh-btn-detail:hover { background: #3a6a3a; }

#wh-step-indicator {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #7890a0;
  margin-top: 6px;
}

/* ── 사이드 패널 ────────────────────────────────────────────── */
#wh-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  z-index: 10003;
  background: #1a2332;
  color: #e8eaf0;
  border-left: 1px solid #446688;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}
#wh-panel.open { right: 0; }

#wh-panel-header {
  flex: none;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #1e2d42;
  border-bottom: 1px solid #446688;
  gap: 8px;
}
#wh-panel-title {
  flex: 1;
  font-weight: bold;
  font-size: 15px;
  color: #88ccff;
}
#wh-panel-close {
  background: none;
  border: none;
  color: #aab;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
#wh-panel-close:hover { background: #3a2a2a; color: #f88; }

#wh-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
}

/* 패널 내 마크다운 스타일 */
#wh-panel-body h3 {
  color: #88ccff;
  font-size: 14px;
  margin: 16px 0 6px;
  border-bottom: 1px solid #2c3e50;
  padding-bottom: 4px;
}
#wh-panel-body h3:first-child { margin-top: 0; }
#wh-panel-body p { margin: 0 0 8px; }
#wh-panel-body ul, #wh-panel-body ol { margin: 0 0 8px; padding-left: 20px; }
#wh-panel-body li { margin-bottom: 2px; }
#wh-panel-body code {
  background: #2a3a4a;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 12px;
  color: #aaddff;
}
#wh-panel-body pre {
  background: #1a2535;
  border: 1px solid #2c3e50;
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 8px;
}
#wh-panel-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
#wh-panel-body strong { color: #c8e0f4; }
#wh-panel-body table {
  border-collapse: collapse;
  margin-bottom: 8px;
  font-size: 12px;
  width: 100%;
}
#wh-panel-body th, #wh-panel-body td {
  border: 1px solid #2c4060;
  padding: 4px 8px;
  color: #ccd6e0;
}
#wh-panel-body th { background: #1e2d42; color: #88ccff; }

#wh-panel-related {
  flex: none;
  padding: 10px 16px;
  border-top: 1px solid #2c3e50;
  font-size: 12px;
  color: #7890a0;
}
#wh-panel-related span { display: block; margin-bottom: 4px; font-weight: bold; color: #aab; }
#wh-panel-related a {
  display: inline-block;
  margin: 2px 4px 2px 0;
  background: #2c3e50;
  color: #88ccff;
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid #446688;
}
#wh-panel-related a:hover { background: #3a5068; }

/* ── 반응형: 좁은 화면 ──────────────────────────────────────── */
@media (max-width: 600px) {
  #wh-panel { width: 100vw; right: -100vw; }
  #wh-tooltip { max-width: 90vw; min-width: 0; }
}

/* ── 포커스 복원용 숨김 앵커 ────────────────────────────────── */
#wh-focus-sentinel {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
