/* ════════════════════════════════════════════════════════════════
 * dentpt.ai — 프레젠테이션 시연 (사용자 직접 클릭형 가이드)
 *   onboarding-tour.css 의 말풍선 톤(cream + accent 그린)을 그대로 따름.
 *   id/class 는 pt- 접두어 — 기존 #tour-bubble 과 충돌하지 않음.
 * ════════════════════════════════════════════════════════════════ */

/* 어둠 마스크 4장 — 강조 영역만 구멍을 남긴다. lock 단계에서는 바깥 클릭을 흡수. */
.pt-mask {
  position: fixed;
  z-index: 2147483640;
  background: rgba(14, 13, 11, 0.58);
  display: none;
  transition: top 220ms cubic-bezier(0.4,0,0.2,1), left 220ms cubic-bezier(0.4,0,0.2,1),
              width 220ms cubic-bezier(0.4,0,0.2,1), height 220ms cubic-bezier(0.4,0,0.2,1);
}

/* 강조 테두리 — 클릭은 통과 */
#pt-ring,
.pt-ring-x {
  position: fixed;
  z-index: 2147483641;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 4px var(--accent, #1a6b4a), 0 0 26px rgba(26,107,74,0.6);
  animation: pt-pulse 1.6s ease-in-out infinite;
  transition: top 220ms cubic-bezier(0.4,0,0.2,1), left 220ms cubic-bezier(0.4,0,0.2,1),
              width 220ms cubic-bezier(0.4,0,0.2,1), height 220ms cubic-bezier(0.4,0,0.2,1);
  display: none;
}
@keyframes pt-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent, #1a6b4a), 0 0 22px rgba(26,107,74,0.55); }
  50%      { box-shadow: 0 0 0 6px var(--accent, #1a6b4a), 0 0 38px rgba(26,107,74,0.85); }
}

/* 말풍선 */
#pt-bubble {
  position: fixed;
  z-index: 2147483647;
  isolation: isolate;
  width: clamp(360px, 34vw, 600px);
  max-width: calc(100vw - 32px);
  overflow: visible;             /* 꼬리(::before)가 바깥으로 나가므로 hidden/auto 금지 — 긴 본문은 .pt-body 가 스크롤 */
  background: #fff;
  border: 2px solid var(--accent, #1a6b4a);
  border-radius: 18px;
  padding: clamp(18px, 1.6vw, 30px) clamp(20px, 1.8vw, 34px) clamp(14px, 1.2vw, 22px);
  box-shadow: 0 20px 60px rgba(14,13,11,0.35), 0 0 0 1px rgba(26,107,74,0.1);
  font-family: var(--sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif);
  color: var(--ink, #0e0d0b);
  display: none;
  transition: top 220ms cubic-bezier(0.4,0,0.2,1), left 220ms cubic-bezier(0.4,0,0.2,1);
}
#pt-bubble.pt-in { animation: pt-bubble-in 240ms ease-out; }
@keyframes pt-bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 꼬리 */
#pt-bubble::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border: 2px solid var(--accent, #1a6b4a);
  transform: rotate(45deg);
}
#pt-bubble[data-placement="top"]::before    { left: 50%; bottom: -10px; margin-left: -8px; border-top: none; border-left: none; }
#pt-bubble[data-placement="bottom"]::before { left: 50%; top: -10px; margin-left: -8px; border-bottom: none; border-right: none; }
#pt-bubble[data-placement="left"]::before   { top: 50%; right: -10px; margin-top: -8px; border-left: none; border-bottom: none; }
#pt-bubble[data-placement="right"]::before  { top: 50%; left: -10px; margin-top: -8px; border-right: none; border-top: none; }
#pt-bubble[data-placement="center"]::before { display: none; }

.pt-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--accent, #1a6b4a);
}
.pt-stage-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-light, #e6f2ec);
  padding: 4px 12px; border-radius: 999px;
}
.pt-count { color: var(--ink3, #8a8580); font-weight: 600; }
.pt-meta-right { display: inline-flex; align-items: center; gap: 10px; }
.pt-mute {
  display: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--cream3, #e3ddd2); background: var(--cream, #f7f4ee);
  color: var(--accent, #1a6b4a); font-size: 15px; cursor: pointer; padding: 0;
}
.pt-mute:hover { background: var(--accent-light, #e6f2ec); }

.pt-title {
  font-size: 21px; font-weight: 800; line-height: 1.35;
  color: var(--ink, #0e0d0b);
  margin: 0 0 10px; letter-spacing: -0.01em;
  word-break: keep-all;
}
.pt-title u { text-decoration: underline; text-decoration-color: var(--accent, #1a6b4a); text-underline-offset: 4px; }

.pt-body {
  font-size: 15.5px; line-height: 1.7;
  color: var(--ink2, #3a3733);
  margin-bottom: 16px;
  word-break: keep-all;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}
.pt-body strong { color: var(--ink, #0e0d0b); font-weight: 700; }
.pt-body em { color: var(--accent, #1a6b4a); font-style: normal; font-weight: 700; }
.pt-body small { font-size: 13px; color: var(--ink3, #8a8580); }
.pt-body code {
  background: var(--accent-light, #e6f2ec); color: var(--accent, #1a6b4a);
  padding: 1px 8px; border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 13.5px; font-weight: 700;
}
.pt-media {
  margin-top: 12px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--cream3, #e3ddd2); background: #1a1a1a; line-height: 0;
}
.pt-media img { width: 100%; display: block; }

.pt-actions {
  padding-top: 12px;
  border-top: 1px solid var(--cream2, #efebe3);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.pt-hint {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700;
  color: var(--accent, #1a6b4a);
  background: var(--accent-light, #e6f2ec);
  padding: 8px 14px; border-radius: 10px;
}
.pt-hint i { font-size: 16px; }
.pt-buttons { display: inline-flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }   /* 버튼이 셋 이상이면(마지막 단계) 좁은 화면에서 줄바꿈 */

.pt-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: inherit; border: 1px solid var(--cream3, #e3ddd2);
  background: var(--cream2, #efebe3); color: var(--ink2, #3a3733);
  transition: all .15s; white-space: nowrap;
}
.pt-btn:hover { background: var(--cream3, #e3ddd2); color: var(--ink, #0e0d0b); }
.pt-btn--primary {
  background: var(--accent, #1a6b4a); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(26,107,74,0.3);
}
.pt-btn--primary:hover { background: #155a3c; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,107,74,0.4); }
.pt-skip {
  background: none; border: none; cursor: pointer;
  color: var(--ink3, #8a8580); font-size: 13px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 6px 4px; font-family: inherit; white-space: nowrap;
}
.pt-skip:hover { color: var(--ink, #0e0d0b); }

/* HUD — 좌하단 진행 점 (우상단은 explain 의 언어 선택, form 의 등급 뱃지와 겹침) */
#pt-hud {
  position: fixed;
  bottom: 84px; left: 14px;
  z-index: 2147483646;
  display: none; align-items: center; gap: 8px;
  padding: 8px 10px 8px 14px;
  background: rgba(14,13,11,0.78);
  color: #fff;
  border-radius: 100px;
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  font-family: var(--sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif);
  backdrop-filter: blur(6px);
  user-select: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.pt-hud-logo { opacity: .75; margin-right: 4px; font-weight: 700; }
.pt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.28);
  transition: background .25s, transform .25s;
}
.pt-dot.done   { background: rgba(255,255,255,0.7); }
.pt-dot.active { background: var(--accent2, #2fb37a); transform: scale(1.35); }
.pt-hud-label { margin-left: 6px; font-weight: 700; }
.pt-hud-close {
  margin-left: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pt-hud-close:hover { background: rgba(255,255,255,0.28); }

/* 좁은 화면 */
@media (max-width: 720px) {
  #pt-bubble { width: calc(100vw - 24px); padding: 18px 20px 14px; border-radius: 14px; }
  .pt-title { font-size: 18px; }
  .pt-body  { font-size: 14.5px; }
  .pt-btn { padding: 9px 16px; font-size: 14px; }
  #pt-hud { bottom: 76px; left: 10px; padding: 6px 8px 6px 12px; }
  .pt-hud-logo, .pt-hud-label { display: none; }
}

/* 동의서 화면의 전화번호 키패드(숫자 패드)는 시연 막·말풍선보다 위에 둔다 — 아니면 어두운 막과 말풍선이 숫자 키를 가려 번호를 못 누른다 */
#phone-keypad-overlay { z-index: 2147483647 !important; }

/* 좁거나 세로인 화면에서 체험 중 위쪽에 한 번 뜨는 얇은 안내(화면 클릭은 막지 않고 ✕ 만 눌림) */
#pt-narrow-hint {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2147483645;
  display: flex; align-items: center; justify-content: center;
  padding: 7px 44px 7px 14px; min-height: 34px;
  background: #fff4d9; color: #5a3d00; border-bottom: 1px solid #f0b94a;
  font: 600 13px/1.4 var(--sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif);
  text-align: center; pointer-events: none;
}
#pt-narrow-hint button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  pointer-events: auto; border: 0; background: transparent; color: #5a3d00; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 4px 12px;
}
