/* ==========================================================================
   tutorial.css - the guided walkthrough layer (window.DemoTutorial).

   Namespace: .ot-*  ONLY. It styles nothing the application owns, and the
   application does not know it exists. Every colour comes from app-odoo's
   own tokens.css, so light and dark follow the product and there is no
   theme block here.

   One structural rule: the layer is position:fixed and pointer-events:none,
   so the live application underneath stays clickable and typable. Only the
   tip, the cards and the two links take pointer events back.
   ========================================================================== */

.ot-root {
  /* derived, never invented */
  --ot-ink: var(--ink);
  --ot-ink-2: var(--ink-2);
  --ot-ink-3: var(--ink-3);
  --ot-card: var(--view);
  --ot-line: var(--line);
  --ot-brand: var(--brand);
  --ot-action: var(--action);
  --ot-scrim: var(--scrim);
  --ot-ease: cubic-bezier(.2, .8, .2, 1);
  --ot-ease-io: cubic-bezier(.4, 0, .2, 1);
  --ot-w: 332px;

  position: fixed;
  inset: 0;
  z-index: 2147483000;     /* above the app's dialogs (500) and toasts (600) */
  pointer-events: none;
  font-family: var(--font-ui);
  color: var(--ot-ink);
  -webkit-font-smoothing: antialiased;
}
.ot-root[hidden] { display: none !important; }

/* --- the scrim, used only when no single element is the subject -------- */
.ot-veil {
  position: fixed;
  inset: 0;
  background: var(--ot-scrim);
  opacity: 0;
  transition: opacity 220ms var(--ot-ease-io);
}
.ot-veil.is-on { opacity: 1; }

/* --- the spotlight: one box paints the dim, the ring and the glow, so all
       three move together and never drift apart --------------------------- */
.ot-hole {
  position: fixed;
  left: 0; top: 0; width: 0; height: 0;
  border-radius: var(--r-lg);
  border: 2px solid var(--ot-action);
  box-shadow: 0 0 0 5px rgba(17, 98, 125, .18), 0 0 0 9999px var(--ot-scrim);
  box-shadow:
    0 0 0 5px color-mix(in oklab, var(--action) 20%, transparent),
    0 0 0 9999px var(--ot-scrim);
  opacity: 0;
  transition:
    left 360ms var(--ot-ease),
    top 360ms var(--ot-ease),
    width 360ms var(--ot-ease),
    height 360ms var(--ot-ease),
    opacity 200ms var(--ot-ease-io);
}
.ot-hole.is-on { opacity: 1; }
/* first appearance: fade in where it belongs, never fly in from 0,0 */
.ot-hole.is-jump { transition: opacity 200ms var(--ot-ease-io); }

/* --- the tip ---------------------------------------------------------- */
.ot-tip {
  position: fixed;
  left: 0; top: 0;
  width: var(--ot-w);
  max-width: calc(100vw - 32px);
  padding: 18px 18px 14px;
  background: var(--ot-card);
  border: 1px solid var(--ot-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  pointer-events: auto;
  opacity: 0;
  transform: scale(.98);
  transition:
    opacity 240ms var(--ot-ease) 50ms,
    transform 240ms var(--ot-ease) 50ms,
    left 360ms var(--ot-ease),
    top 360ms var(--ot-ease);
}
.ot-tip.is-on { opacity: 1; transform: none; }
.ot-tip.is-jump {
  transition: opacity 240ms var(--ot-ease) 50ms, transform 240ms var(--ot-ease) 50ms;
}

.ot-caret {
  position: absolute;
  width: 11px; height: 11px;
  background: var(--ot-card);
  border: 0 solid var(--ot-line);
  transform: rotate(45deg);
}
.ot-tip[data-side=left]   .ot-caret { border-left-width: 1px; border-bottom-width: 1px; }
.ot-tip[data-side=top]    .ot-caret { border-left-width: 1px; border-top-width: 1px; }
.ot-tip[data-side=bottom] .ot-caret { border-right-width: 1px; border-bottom-width: 1px; }
.ot-tip[data-side=right]  .ot-caret { border-right-width: 1px; border-top-width: 1px; }
.ot-tip[data-side=none]   .ot-caret { display: none; }

.ot-count {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ot-ink-3);
  font-variant-numeric: tabular-nums;
}
.ot-count .ot-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ot-brand);
  flex: none;
}
.ot-title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--ot-ink);
}
.ot-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ot-ink-2);
}
.ot-body[hidden] { display: none; }

.ot-hint {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--ot-line);
  background: var(--bg);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ot-ink-2);
}
.ot-hint[hidden] { display: none; }

/* --- a value the viewer has to carry away ----------------------------- */
.ot-val {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid var(--ot-line);
  border-radius: var(--r-sm);
  background: var(--bg);
}
.ot-val[hidden] { display: none; }
.ot-val-k {
  width: 100%;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ot-ink-3);
}
.ot-val-t {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ot-ink);
  word-break: break-all;
  user-select: all;
}
.ot-val-t:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.ot-val-c {
  flex: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ot-line);
  background: var(--ot-card);
  color: var(--ot-action);
  cursor: pointer;
}
.ot-val-c:hover { background: var(--hover); }
.ot-val-c:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ot-val-c.is-done { color: var(--ok); border-color: var(--ok); }

/* --- controls --------------------------------------------------------- */
.ot-ctl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.ot-dots { display: flex; gap: 4px; margin-right: auto; }
.ot-pip {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ot-line);
}
.ot-pip.is-done { background: var(--ot-ink-3); }
.ot-pip.is-cur { background: var(--ot-brand); transform: scale(1.35); }

.ot-btn {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.ot-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ot-btn-solid {
  background: var(--ot-brand);
  color: var(--brand-ink);
  border-color: var(--ot-brand);
}
.ot-btn-solid:hover { background: var(--brand-dk); border-color: var(--brand-dk); }
.ot-btn-solid:focus-visible { outline-color: var(--focus-on-brand); }
.ot-btn-ghost {
  background: transparent;
  color: var(--ot-ink-2);
  border-color: var(--ot-line);
}
.ot-btn-ghost:hover { background: var(--hover); color: var(--ot-ink); }

/* --- the chapter card and the closing card ---------------------------- */
.ot-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.985);
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px 30px 24px;
  background: var(--ot-card);
  border: 1px solid var(--ot-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 260ms var(--ot-ease), transform 260ms var(--ot-ease);
}
.ot-card.is-on { opacity: 1; transform: translate(-50%, -50%); }

.ot-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ot-ink-3);
}
.ot-eyebrow .ot-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ot-brand); flex: none;
}
.ot-card-h {
  margin: 11px 0 8px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.015em;
  color: var(--ot-ink);
}
.ot-card-p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ot-ink-2);
}
.ot-card-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--ot-line);
}
.ot-card-list li {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ot-line);
  font-size: 12.5px;
  line-height: 1.5;
}
.ot-card-list b { font-weight: 600; color: var(--ot-ink); }
.ot-card-list span { color: var(--ot-ink-2); }
.ot-card-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ot-ink-3);
}
.ot-card-sig {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ot-ink-3);
}
.ot-card-acts {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

/* --- the two standing links ------------------------------------------- */
.ot-skips {
  position: fixed;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 14px;
  pointer-events: auto;
}
.ot-skips[hidden] { display: none; }
.ot-link {
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--ot-card);
  color: var(--ot-ink-3);
  cursor: pointer;
  box-shadow: var(--shadow-1);
}
.ot-link:hover { color: var(--ot-ink); }
.ot-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* --- the field the tour is currently writing into --------------------- */
.ot-fill {
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--action) 45%, transparent) !important;
  border-radius: var(--r-sm);
}

/* --- screen-reader channel -------------------------------------------- */
.ot-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- small screens: the tip sits at the foot and stops chasing --------- */
@media (max-width: 640px) {
  .ot-root { --ot-w: calc(100vw - 24px); }
  .ot-tip {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
  }
  .ot-caret { display: none; }
  .ot-card { padding: 22px 18px 18px; }
  .ot-card-h { font-size: 19px; }
  .ot-card-list li { grid-template-columns: 1fr; gap: 2px; }
  .ot-skips { left: 12px; right: 12px; justify-content: space-between; bottom: auto; top: 12px; }
}

/* --- reduced motion: the layer stops moving, the reading time is kept -- */
@media (prefers-reduced-motion: reduce) {
  .ot-veil, .ot-hole, .ot-tip, .ot-card {
    transition-duration: 1ms !important;
  }
  .ot-pip.is-cur { transform: none; }
}
