/* === Seller Exchange Demo — tour wrapper === */

/* Welcome / Complete / Guide — full-screen modals */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Rubik", sans-serif;
}
.demo-modal[hidden] { display: none !important; }

.demo-modal-content {
  background: #fff;
  color: #1f2937;
  border-radius: 12px;
  padding: 32px 36px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.demo-modal-content h2 { font-size: 22px; font-weight: 600; margin: 0 0 8px; color: #001029; }
.demo-modal-content p { font-size: 14px; color: #6b7280; margin: 0 0 20px; line-height: 1.5; }
.demo-modal-content label { display: block; text-align: left; margin: 16px 0 6px; font-size: 12px; color: #6b7280; font-weight: 500; }
.demo-modal-content input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 4px;
  box-sizing: border-box;
}
.demo-modal-content input[type="email"]:focus { outline: 2px solid #017BFF; outline-offset: -1px; border-color: transparent; }
.demo-modal-content textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1.5px solid #017BFF;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.demo-modal-content textarea:focus { outline: 2px solid #017BFF; outline-offset: -1px; border-color: transparent; }
.demo-modal-content .demo-feedback-icon {
  display: flex; justify-content: center; margin-bottom: 12px;
  color: #017BFF;
}
.demo-modal-content .demo-feedback-icon svg { width: 56px; height: 56px; }
.demo-modal-content .demo-feedback-links {
  margin: 14px 0 16px;
  font-size: 13px;
  color: #017BFF;
  text-align: center;
}
.demo-modal-content .demo-feedback-links a {
  color: #017BFF; text-decoration: underline; margin: 0 4px;
}
.demo-modal-content .demo-feedback-links a:hover { color: #357abd; }
.demo-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.demo-btn:disabled:hover { background: #e5e7eb; }

.demo-btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;          /* bold labels */
  cursor: pointer;
  border: none;
  background: #017BFF;
  color: #fff;
  margin: 4px;
  transition: background .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.demo-btn:hover { background: #0066d4; }
.demo-btn.secondary { background: #fff; color: #1f2937; border: 1px solid #d1d5db; }
.demo-btn.secondary:hover { background: #f3f4f6; }
.demo-btn.ghost { background: transparent; color: #6b7280; padding: 0 12px; height: auto; font-weight: 500; }
.demo-btn.ghost:hover { color: #1f2937; background: rgba(0,0,0,0.04); }

/* === Guide TOC — compact rows, play on hover === */
.demo-guide-list { text-align: left; margin: 0; padding: 0; list-style: none; }
.demo-guide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 10px;
  min-height: 36px;
  border-radius: 8px;
  transition: background .12s;
}
.demo-guide-row.available { cursor: pointer; }
.demo-guide-row.available:hover { background: rgba(1, 123, 255, 0.06); }
.demo-guide-row.coming-soon { cursor: default; opacity: 0.5; }
.demo-guide-num {
  flex-shrink: 0;
  width: 22px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-align: right;
}
.demo-guide-name {
  flex: 1; min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #017BFF;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-guide-row.coming-soon .demo-guide-name { color: #1f2937; font-weight: 600; }
.demo-guide-steps {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 12px;
}
/* Play button — visible only on row hover */
.demo-guide-play {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: #017BFF; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  opacity: 0;
  transition: opacity .12s, background .12s;
}
.demo-guide-row.available:hover .demo-guide-play { opacity: 1; }
.demo-guide-play:hover { background: #0066d4; }
.demo-guide-play svg { width: 12px; height: 12px; margin-left: 2px; }
.demo-guide-play-spacer { flex-shrink: 0; width: 28px; height: 28px; }

/* Guide modal: header with title + close (like reference) */
.demo-guide-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.demo-guide-header h2 { flex: 1; margin: 0; text-align: left; font-size: 18px; }
.demo-guide-header .demo-guide-close-x {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  color: #6b7280; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.demo-guide-header .demo-guide-close-x:hover { background: rgba(0,0,0,0.06); color: #1f2937; }

/* Policy modals (Privacy / Cookie) */
.demo-policy-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: #1f2937;
  max-height: 60vh;
  overflow-y: auto;
}
.demo-policy-body b { color: #001029; }

/* "Play demo" button bottom-right of guide */
.demo-guide-footer {
  display: flex; justify-content: flex-end;
  margin-top: 12px;
}
.demo-guide-footer .demo-btn { padding-left: 28px; padding-right: 28px; }

/* Bottom-right persistent controls */
#demo-controls {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999996;
  display: flex;
  gap: 8px;
  font: 13px -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
#demo-controls .demo-ctrl-btn {
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  height: 40px;
  padding: 0 18px;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  font-size: 13px;
  font-weight: 700;        /* bold labels */
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background .15s;
}
#demo-controls .demo-ctrl-btn:hover { background: rgba(60, 60, 60, 0.95); }
#demo-controls .demo-ctrl-btn.primary { background: #017BFF; }
#demo-controls .demo-ctrl-btn.primary:hover { background: #0066d4; }

/* === Tour player === */
#demo-tour {
  position: fixed;
  inset: 0;
  z-index: 999997;
  pointer-events: none;
}
#demo-tour[hidden] { display: none !important; }

/* Spotlight = SVG mask with rectangular cut-out */
#demo-spotlight {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  transition: clip-path .25s ease;
}

#demo-target-ring {
  position: fixed;
  border-radius: 6px;
  border: 2px solid #017BFF;
  box-shadow: 0 0 0 9999px transparent, 0 0 16px rgba(74, 144, 226, 0.5);
  pointer-events: none;
  transition: top .25s, left .25s, width .25s, height .25s;
}

#demo-tooltip {
  position: fixed;
  background: #fff;
  color: #1f2937;
  border-radius: 12px;
  padding: 16px 20px;
  width: 380px;
  max-width: 380px;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  transition: top .25s, left .25s;
}
/* Header row: title + close — like a standard modal */
#demo-tooltip-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
#demo-tooltip h3 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #001029;
  line-height: 1.35;
}
#demo-tooltip-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: -4px -4px 0 0;     /* hug top-right corner without breaking flow */
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
#demo-tooltip-close:hover { background: rgba(0,0,0,0.06); color: #1f2937; }
#demo-tooltip .demo-tooltip-body {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
  white-space: pre-wrap;
}
#demo-tooltip .demo-tooltip-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#demo-tooltip .demo-tooltip-left,
#demo-tooltip .demo-tooltip-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
#demo-tooltip .demo-step-counter {
  font-size: 12px;
  color: #9ca3af;
}

#demo-tooltip-arrow {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
}
