/* CRMExperience: How-to tour and synthetic demo. Scoped with xp- prefix. */

.xp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- header toolbar ---------- */
.xp-toolbar{display:flex;gap:8px;align-items:center;margin-left:auto;margin-right:16px;flex:none}
.xp-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:6px 12px;font-size:12px;line-height:1.3;font-weight:600;border-radius:8px;border:1px solid var(--line,#dce4de);background:var(--white,#fff);color:var(--ink,#1b3028);white-space:nowrap;cursor:pointer}
.xp-btn:hover{background:#f1f5f1}
.xp-btn:focus-visible,.xp-x:focus-visible,.xp-root :focus-visible{outline:3px solid var(--green,#245d48);outline-offset:2px}
.xp-btn.xp-primary{background:var(--green,#245d48);border-color:var(--green,#245d48);color:#fff}
.xp-btn.xp-primary:hover{background:#184936}
.xp-btn.xp-quiet{background:none;border-color:transparent;color:var(--muted,#65736c)}
.xp-btn.xp-quiet:hover{background:#f1f5f1;color:var(--ink,#1b3028)}
.xp-ico{width:18px;height:18px;border-radius:50%;display:inline-grid;place-items:center;font-size:10px;font-weight:700;background:#f6eed9;color:var(--gold,#8c6727)}

/* ---------- toast ---------- */
.xp-toast{position:fixed;left:16px;bottom:16px;z-index:60;max-width:min(420px,calc(100vw - 32px));padding:12px 14px;border-radius:10px;background:#1b3028;color:#fff;font-size:12px;box-shadow:0 12px 34px #00000030}
.xp-toast:empty{display:none}

/* ---------- guided tour ---------- */
dialog.xp-tour{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;overflow:hidden;box-shadow:none;color:var(--ink,#1b3028)}
dialog.xp-tour.xp-nospot{background:rgba(36,42,39,.6)}
dialog.xp-tour::backdrop{background:transparent}
.xp-spot{position:fixed;border-radius:10px;pointer-events:none;box-shadow:0 0 0 9999px rgba(36,42,39,.6);outline:3px solid #c9a24d;outline-offset:0}
.xp-card{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(360px,calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:20px;background:#fff;border:1px solid var(--line,#dce4de);border-radius:14px;box-shadow:0 20px 60px #00000047}
.xp-card.xp-placed{transform:none}
.xp-card.xp-dock{left:50%;top:auto;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(560px,calc(100vw - 32px));max-height:60vh;max-height:60dvh}
.xp-kicker{margin:0 0 8px;font-size:10px;font-weight:700;letter-spacing:1.3px;color:var(--gold,#8c6727)}
.xp-card h2{margin:0 0 8px;font-size:18px;letter-spacing:-.2px}
.xp-card h2:focus{outline:none}
.xp-body{margin:0 0 8px;font-size:13px;color:var(--ink,#1b3028)}
.xp-warn{margin:0 0 8px;padding:9px 11px;font-size:12px;color:var(--gold,#8c6727);background:#fbf3e5;border:1px solid #e5d6b7;border-radius:8px}
.xp-warn:empty{display:none}
.xp-meter{display:grid;gap:6px;margin:14px 0 4px}
.xp-count{font-size:11px;font-weight:650;color:var(--muted,#65736c)}
.xp-progress{appearance:none;-webkit-appearance:none;width:100%;height:6px;border:0;border-radius:3px;background:#edf2eb;overflow:hidden}
.xp-progress::-webkit-progress-bar{background:#edf2eb}
.xp-progress::-webkit-progress-value{background:var(--green,#245d48)}
.xp-progress::-moz-progress-bar{background:var(--green,#245d48)}
.xp-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;margin-top:14px}
.xp-skip{margin-right:auto}
.xp-safe{margin:12px 0 0;font-size:11px;color:var(--muted,#65736c)}

/* ---------- demo ---------- */
dialog.xp-demo{width:min(640px,94vw);max-height:90vh;max-height:90dvh;overflow:auto;padding:24px;border:1px solid var(--line,#dce4de);border-radius:14px;box-shadow:0 20px 100px #0002;color:var(--ink,#1b3028)}
dialog.xp-demo::backdrop{background:rgba(36,42,39,.6)}
.xp-demo-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.xp-demo-head h2{margin:8px 0 0;font-size:20px}
.xp-badge{display:inline-block;padding:3px 8px;border-radius:6px;font-size:10px;font-weight:700;letter-spacing:.8px;color:var(--gold,#8c6727);background:#fbf3e5;border:1px solid #e5d6b7}
.xp-x{flex:none;width:40px;height:40px;border-radius:8px;border:1px solid transparent;background:none;font-size:24px;line-height:1;color:var(--muted,#65736c);cursor:pointer}
.xp-x:hover{background:#f1f5f1}
.xp-lead{margin:12px 0 0;font-size:13px;color:var(--muted,#65736c)}
.xp-steps{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0;padding:0;list-style:none}
.xp-steps li{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--line,#dce4de);border-radius:999px;font-size:11px;color:var(--muted,#65736c)}
.xp-steps li.is-done{color:var(--green,#245d48)}
.xp-steps li.is-current{border-color:var(--green,#245d48);background:var(--green-soft,#edf5ef);color:var(--green,#245d48);font-weight:700}
.xp-dot{min-width:16px;text-align:center;font-weight:700}
.xp-facts{display:grid;gap:8px;margin:0}
.xp-fact{padding:10px 12px;border:1px solid var(--line,#dce4de);border-radius:10px;background:#fbfcfa}
.xp-fact dt{margin:0 0 2px;font-size:10px;font-weight:650;letter-spacing:.3px;color:var(--muted,#65736c)}
.xp-fact dd{margin:0;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.xp-fact.xp-pending{visibility:hidden}
.xp-explain{margin:14px 0 0;padding:11px 13px;font-size:13px;background:var(--green-soft,#edf5ef);border:1px solid #c4dacb;border-radius:8px;color:var(--green,#245d48)}
.xp-notes{margin:16px 0 0;padding-left:18px;font-size:12px;color:var(--muted,#65736c)}
.xp-notes li{margin-bottom:4px}

/* ---------- small screens (390px) ---------- */
@media (max-width:680px){
  #app .workspace header.xp-has-toolbar{flex-wrap:wrap;row-gap:12px}
  .xp-toolbar{order:3;width:100%;margin:0}
  .xp-toolbar .xp-btn{flex:1}
  .xp-card{padding:16px}
  .xp-actions .xp-btn{flex:1 1 auto;min-height:42px}
  .xp-skip{flex-basis:100%;margin-right:0}
  dialog.xp-demo{padding:16px}
  .xp-demo-head h2{font-size:18px}
  .xp-toast{left:12px;right:12px;bottom:12px;max-width:none}
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion:no-preference){
  .xp-spot{transition:left .2s ease,top .2s ease,width .2s ease,height .2s ease}
  .xp-card.xp-placed{transition:left .2s ease,top .2s ease}
}
@media (prefers-reduced-motion:reduce){
  .xp-spot,.xp-card,.xp-btn{transition:none;animation:none}
}
