/* =========================================================================
   VYNTRIQO GUIDED WALKTHROUGH — presentation layer only.
   Fully independent from CRM/HCM: no shared classes, no shared file, no
   shared storage key. Colors/typography below are hardcoded to match the
   Makyn Guided Walkthrough design system established in the CRM and HCM
   demos exactly (not derived from marketing.css's own --accent tokens),
   so the walkthrough layer reads as "Makyn is guiding you" the same way
   in every demo, independent of whatever palette the underlying product
   uses.
   ========================================================================= */

#vwt-root { position: fixed; inset: 0; z-index: 999990; pointer-events: none; }

/* Four-panel mask forms a rectangular "hole" around the current target.
   Each panel independently blocks clicks outside the hole; the hole
   itself is simply the absence of a panel, so clicks pass straight
   through to the real target underneath. */
.vwt-mask-panel {
  position: fixed;
  background: rgba(11, 18, 32, 0.6);
  pointer-events: auto;
  transition: none;
}

.vwt-spotlight-ring {
  position: fixed;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px rgba(2, 132, 199, 0.28),
    0 0 0 2px #0284C7,
    0 8px 28px rgba(2, 132, 199, 0.35);
  pointer-events: none;
}

.vwt-tooltip {
  position: fixed;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.35), 0 4px 16px rgba(2, 6, 23, 0.15);
  padding: 16px;
  pointer-events: auto;
  font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  color: #0B1220;
}

.vwt-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #0284C7;
  margin-bottom: 10px;
}

.vwt-title {
  font-family: var(--font-display, 'Inter', 'Segoe UI Semibold', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #0B1220;
}

.vwt-body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
  margin-bottom: 12px;
}

.vwt-body strong { color: #0B1220; font-weight: 700; }

/* ACTION treatment — label + instruction set apart in a light panel,
   matching the CRM/HCM standard so the required action is immediately
   scannable. */
.vwt-action-block {
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  margin-bottom: 12px;
}

.vwt-action-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0369A1;
  margin-bottom: 5px;
}

.vwt-action {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.55;
  color: #0B1220;
  margin: 0;
}

.vwt-nav { margin-bottom: 12px; }

/* Explicit action cue — "› Click Campaigns" — matching the CRM/HCM
   cue treatment (a plain "›" marker via ::before rather than an icon). */
.vwt-hint {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0369A1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vwt-hint::before {
  content: '\203A';
  font-weight: 700;
  color: #0284C7;
}

.vwt-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.vwt-btn-primary { background: #0284C7; color: #fff; }
.vwt-btn-primary:hover { background: #0369A1; }

.vwt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid #E2E8F0;
}

.vwt-link {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 0.5rem 0.5rem;
}
.vwt-link:hover { color: #0B1220; }
/* Back is intentionally never shown (see vyntriqo-walkthrough.js) — this
   selector is kept only in case a future step ever re-enables it. */
#vwt-back-btn[hidden] { display: none; }

.vwt-btn-outline {
  background: #FFFFFF;
  color: #0B1220;
  border: 1.5px solid #E2E8F0;
}
.vwt-btn-outline:hover { border-color: #0284C7; background: #E0F2FE; }

/* ─── Completion choice — shown once, at the very end of the
   walkthrough (see finish()/showCompletionChoice() in
   vyntriqo-walkthrough.js). Deliberately matches the CRM/HCM Guided
   Walkthrough completion screen: a full-screen dark backdrop locks the
   underlying page (still fully rendered underneath, untouched) until
   Restart Walkthrough or Exit Walkthrough is explicitly chosen. ─── */
.vwt-confirm {
  position: fixed;
  inset: 0;
  z-index: 999994;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 18, 32, 0.92);
  padding: 24px;
}
.vwt-confirm[hidden] { display: none; }

.vwt-confirm-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.35), 0 4px 16px rgba(2, 6, 23, 0.15);
  padding: 32px 28px 28px;
}

.vwt-confirm-title {
  font-family: var(--font-display, 'Inter', 'Segoe UI Semibold', sans-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #0B1220;
  margin: 0 0 10px;
}

.vwt-confirm-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 26px;
}

.vwt-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.vwt-confirm-actions .vwt-btn {
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
}

/* Reset Demo Data must stay clickable at every point in the walkthrough
   (the build brief requires reset to work mid-step, mid-preview, etc.).
   A z-index alone on the button is not enough: #app-sidebar uses
   position:sticky, which establishes its own stacking context, so any
   z-index on a descendant is only ever compared against its OTHER
   sidebar children -- never against #vwt-root's fixed overlay above it.
   (Confirmed by a real click-through-the-mask test failing with plain
   z-index; verified fixed by the approach below.)
   The fix is to take the button out of that stacking context entirely
   via position:fixed, pinned to the same visual spot it already
   occupies at the bottom of the sidebar, so it becomes a sibling of
   #vwt-root in the root stacking context where z-index actually applies.
   (Merging its rect into the mask's cutout hole was considered and
   rejected: that would also expose whatever real UI happens to sit
   geometrically between the two rects, e.g. the whole sidebar.) */
#reset-demo-btn {
  position: fixed;
  left: 16px;
  bottom: 20px;
  width: calc(var(--sidebar-w) - 32px);
  z-index: 999993;
}

@media (max-width: 880px) {
  #reset-demo-btn { display: none; } /* sidebar itself is hidden at this width */
}

/* The reset confirmation dialog (built dynamically by marketing.js) must
   also sit above the walkthrough UI, or a reset triggered mid-walkthrough
   would open a dialog the person can't reach. */
.modal-overlay { z-index: 999996; }

/* Welcome modal — full-screen intro shown automatically on arrival at
   the entry page (index.html), replicating the CRM/HCM "Solution
   Experience" welcome pattern: a black-faded backdrop behind a centered
   panel describing the demo, the role being played, and roughly how
   long it takes, with a single Start Experience CTA. */
.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 999995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 220ms ease;
}
.welcome-modal.is-open { opacity: 1; }
.welcome-modal[hidden] { display: none; }

.welcome-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 18, 0.82);
}

.welcome-modal-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #FFFFFF;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  padding: 32px 32px 28px;
  transform: translateY(10px) scale(0.98);
  transition: transform 220ms ease;
}
.welcome-modal.is-open .welcome-modal-panel { transform: translateY(0) scale(1); }

.welcome-modal-panel h2 {
  font-family: var(--font-display, 'Segoe UI Semibold', sans-serif);
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--text, #131629);
}

.welcome-modal-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted, #5B6076);
  margin-bottom: 14px;
}

.welcome-modal-note {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-dark, #1E44D6);
  background: var(--accent-soft, #EAF0FF);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 12px;
  display: inline-block;
  margin-bottom: 22px;
}

.welcome-modal-cta {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #2F5CFF);
  border: none;
  border-radius: var(--radius-sm, 8px);
  padding: 13px 18px;
  cursor: pointer;
}
.welcome-modal-cta:hover { background: var(--accent-dark, #1E44D6); }

@media (max-width: 640px) {
  .vwt-tooltip { width: calc(100vw - 32px); }
  .welcome-modal-panel { padding: 26px 22px 22px; }
}
