/* Demo Tour (Presentation-demo branch) — self-contained, additive only.
   Does not restyle or override any existing app selector. */

/* ซูมเข้า ~25% เฉพาะตอนทัวร์กำลังคลิกเป้าเล็กๆ (nav/ปุ่ม/dropdown) — ผูกกับ
   body.dtour-zoom-enabled ที่ startTour()/stopTour() คุมเอง กันไม่ให้กระทบ
   การใช้แอปปกตินอกช่วงทัวร์เลย transform จริงตั้งค่าจาก JS (demo-tour.js) */
body.dtour-zoom-enabled header.topbar,
body.dtour-zoom-enabled main.main {
  transition: transform 0.4s ease;
}

/* การ์ดไฟล์ปลอมที่ "ลากเข้ามาจากนอกจอ" ตอนเปิด Drawing Intelligence — ดู dtourPlayFileDrop() */
.dtour-filedrop {
  position: fixed;
  z-index: 100013;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  pointer-events: none;
  white-space: nowrap;
  transition: transform 0.7s cubic-bezier(.2,.9,.3,1.15), opacity 0.35s ease;
}
.dtour-filedrop__icon { font-size: 22px; }

.dtour-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #2066DF;
  color: #fff;
  font-family: 'Sora', 'Sarabun', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(32, 102, 223, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dtour-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(32, 102, 223, 0.45);
}
.dtour-fab[hidden] { display: none; }

.dtour-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  z-index: 100010;
  pointer-events: none;
  transform: translate(-4px, -4px);
  transition: left 0.7s cubic-bezier(.4,0,.2,1), top 0.7s cubic-bezier(.4,0,.2,1), opacity 0.2s ease;
  opacity: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.dtour-cursor[data-visible="1"] { opacity: 1; }
.dtour-cursor svg { width: 100%; height: 100%; }

.dtour-cursor::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(32, 102, 223, 0.35);
  transform: scale(0);
  opacity: 0;
}
.dtour-cursor[data-click="1"]::after {
  animation: dtour-ripple 0.5s ease-out;
}
@keyframes dtour-ripple {
  0%   { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.dtour-spotlight {
  position: fixed;
  z-index: 100005;
  pointer-events: none;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(32, 102, 223, 0.85), 0 0 0 9999px rgba(15, 23, 42, 0.35);
  transition: left 0.5s cubic-bezier(.4,0,.2,1), top 0.5s cubic-bezier(.4,0,.2,1),
              width 0.5s cubic-bezier(.4,0,.2,1), height 0.5s cubic-bezier(.4,0,.2,1),
              opacity 0.2s ease;
  opacity: 0;
}
.dtour-spotlight[data-visible="1"] { opacity: 1; }

.dtour-caption {
  position: fixed;
  z-index: 100010;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #14213D;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, left 0.5s cubic-bezier(.4,0,.2,1), top 0.5s cubic-bezier(.4,0,.2,1);
}
.dtour-caption[data-visible="1"] { opacity: 1; transform: translateY(0); }
.dtour-caption__step {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8FB4FF;
  margin-bottom: 4px;
}

.dtour-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100011;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #14213D;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.dtour-bar[hidden] { display: none; }
.dtour-bar button {
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.dtour-bar button:hover { background: rgba(255,255,255,0.18); }
.dtour-bar__progress {
  color: #cbd5f5;
  font-size: 12px;
  padding: 0 4px;
  min-width: 40px;
  text-align: center;
}

.dtour-end {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100011;
  max-width: 260px;
  padding: 16px;
  border-radius: 14px;
  background: #14213D;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.dtour-end[hidden] { display: none; }
.dtour-end h4 { margin: 0 0 8px; font-size: 14px; }
.dtour-end p { margin: 0 0 12px; font-size: 13px; color: #cbd5f5; }
.dtour-end .dtour-end__actions { display: flex; gap: 8px; }
.dtour-end button {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}
.dtour-end__replay { background: #2066DF; color: #fff; }
.dtour-end__close { background: rgba(255,255,255,0.1); color: #fff; }

/* Full-screen dim, used only behind the big scene-setting callouts
   (title/workflow/closing) — never behind a roadmap toast, which must
   leave the real screen fully visible underneath it. */
.dtour-dim {
  position: fixed;
  inset: 0;
  z-index: 100008;
  background: rgba(10, 15, 30, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.dtour-dim[data-visible="1"] { opacity: 1; }

.dtour-callout {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100012;
  width: min(520px, 86vw);
  padding: 28px 32px;
  border-radius: 16px;
  background: #14213D;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.dtour-callout[data-visible="1"] { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
.dtour-callout__title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}
.dtour-callout__items {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.dtour-callout__items li {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(32, 102, 223, 0.22);
  border: 1px solid rgba(143, 180, 255, 0.4);
  font-size: 13px;
  color: #cfe0ff;
}
.dtour-callout__text {
  font-size: 15px;
  line-height: 1.6;
  color: #cbd5f5;
}

/* Roadmap disclaimer — the honest "not built yet" label the demo owner
   approved (2026-09-01): keep the story beat, label it plainly on screen.
   Deliberately NOT paired with .dtour-dim — the real (unfinished) screen
   must stay visible behind it, this is a caption, not a takeover. */
.dtour-roadmap {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 100011;
  transform: translateX(-50%) translateY(8px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, 90vw);
  padding: 12px 18px;
  border-radius: 12px;
  background: #2A1B06;
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #FDE9C0;
  font-family: 'Sarabun', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.dtour-roadmap[data-visible="1"] { opacity: 1; transform: translateX(-50%) translateY(0); }
.dtour-roadmap__badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.25);
  color: #FBBF24;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
