/* Guided tour of the workflow demo: the window dims, a ring marks the next thing to do, and a tip points at it.
   Drawn inside the demo window, so it is clipped by the window and turns with it in the phone's full-screen viewer. */
.tour-layer {
  position:absolute;
  inset:0;
  z-index:40;
  overflow:hidden;
  pointer-events:none;
  font-family:var(--body)
}
.tour-ring {
  position:absolute;
  left:0;
  top:0;
  border-radius:12px;
  box-shadow:0 0 0 2px #ffff00,0 0 0 6px #ffff0029,0 0 0 200vmax #06060733;
  opacity:0;
  transition:opacity .25s ease
}
.tour-ring.is-on {
  opacity:1
}
/* A slow pulse on the ring when the tip asks for something to be done */
.tour-layer[data-kind="do"] .tour-ring::after {
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  animation:tour-pulse 1.9s ease-out infinite
}
@keyframes tour-pulse {
  0% { box-shadow:0 0 0 2px #ffff00e6 }
  100% { box-shadow:0 0 0 14px #ffff0000 }
}
.tour-tip {
  position:absolute;
  left:0;
  top:0;
  box-sizing:border-box;
  width:min(300px,calc(100% - 20px));
  padding:14px 16px 12px;
  border-radius:14px;
  background:#111114;
  color:#f5f5f7;
  box-shadow:0 18px 44px #06060759,0 2px 8px #06060733;
  opacity:0;
  visibility:hidden;
  translate:0 6px;
  transition:opacity .2s ease,translate .2s ease,visibility 0s linear .2s;
  pointer-events:auto
}
.tour-tip.is-on {
  opacity:1;
  visibility:visible;
  translate:none;
  transition:opacity .2s ease,translate .2s ease
}
.tour-layer.is-gliding .tour-tip {
  transition:opacity .2s ease,translate .2s ease,transform .34s cubic-bezier(.2,.7,.2,1)
}
.tour-layer.is-gliding .tour-ring {
  transition:opacity .25s ease,transform .34s cubic-bezier(.2,.7,.2,1),width .34s cubic-bezier(.2,.7,.2,1),height .34s cubic-bezier(.2,.7,.2,1)
}
/* The closing note has an X at its top right */
.tour-close {
  position:absolute;
  top:8px;
  right:8px;
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  padding:0;
  border:0;
  border-radius:8px;
  background:none;
  color:#a6a6af;
  cursor:pointer
}
.tour-close:hover {
  color:#fff;
  background:#ffffff17
}
.tour-close:focus-visible {
  outline:2px solid #ffff00;
  outline-offset:1px
}
.tour-close[hidden] {
  display:none
}
.tour-close svg {
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round
}
.tour-layer[data-kind="note"] .tour-tip {
  padding-right:42px
}

/* The arrow sits on the edge facing the target, under the point the tip aims at */
.tour-arrow {
  position:absolute;
  width:14px;
  height:14px;
  border-radius:2px;
  background:#111114;
  transform:rotate(45deg)
}
.tour-tip[data-side="top"] .tour-arrow {
  left:calc(var(--arrow,50%) - 7px);
  bottom:-6px
}
.tour-tip[data-side="bottom"] .tour-arrow {
  left:calc(var(--arrow,50%) - 7px);
  top:-6px
}
.tour-tip[data-side="left"] .tour-arrow {
  top:calc(var(--arrow,50%) - 7px);
  right:-6px
}
.tour-tip[data-side="right"] .tour-arrow {
  top:calc(var(--arrow,50%) - 7px);
  left:-6px
}
.tour-tip[data-side="inside"] .tour-arrow {
  display:none
}
/* A tip that asks for an action leans toward its target a few times, then rests */
.tour-layer[data-kind="do"] .tour-tip.is-on[data-side="top"] {
  animation:tour-lean-down 1.4s ease-in-out .5s 3
}
.tour-layer[data-kind="do"] .tour-tip.is-on[data-side="bottom"] {
  animation:tour-lean-up 1.4s ease-in-out .5s 3
}
@keyframes tour-lean-down {
  50% { translate:0 4px }
}
@keyframes tour-lean-up {
  50% { translate:0 -4px }
}
.tour-step {
  margin:0 0 6px;
  font:600 11.5px/1.2 var(--body);
  letter-spacing:.02em;
  color:#ffff00
}
.tour-title {
  margin:0;
  font:600 15.5px/1.3 var(--head);
  letter-spacing:-.01em;
  color:#fff
}
.tour-text {
  margin:6px 0 0;
  font-size:13.5px;
  line-height:1.5;
  color:#c4c4cc
}
.tour-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px
}
.tour-actions:has(.tour-skip[hidden]):has(.tour-next[hidden]) {
  display:none
}
.tour-skip,.tour-next {
  height:32px;
  border:0;
  border-radius:9px;
  font:600 13.5px var(--body);
  cursor:pointer
}
.tour-skip {
  margin-left:-8px;
  padding:0 8px;
  background:none;
  color:#a6a6af;
  font-weight:500
}
.tour-skip:hover {
  color:#fff
}
.tour-next {
  padding:0 15px;
  background:#ffff00;
  color:#060607
}
.tour-next:hover {
  filter:brightness(.94)
}
.tour-skip[hidden],.tour-next[hidden] {
  display:none
}
.tour-skip:focus-visible,.tour-next:focus-visible {
  outline:2px solid #ffff00;
  outline-offset:2px
}
.tour-sr {
  position:absolute;
  width:1px;
  height:1px;
  margin:0;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap
}

/* The Tour button: at the right of the window bar, beside the full-screen button, clear of the steps */
.flow-guide {
  position:absolute;
  top:50%;
  right:52px;
  display:flex;
  align-items:center;
  gap:6px;
  height:32px;
  padding:0 11px 0 9px;
  border:1px solid var(--line-medium);
  border-radius:8px;
  background:var(--panel);
  color:var(--secondary);
  font:600 13.5px var(--body);
  cursor:pointer;
  transform:translateY(-50%);
  transition:color .2s,border-color .2s
}
.flow-guide:hover {
  color:var(--paper);
  border-color:var(--line-strong)
}
.flow-guide svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round
}

/* The tour link in the agent's greeting: only on a narrow phone, where the window bar has no room for the button */
.chat-tour {
  display:none;
  align-items:center;
  gap:7px;
  height:36px;
  padding:0 14px 0 10px;
  border:1px solid var(--line-medium);
  border-radius:999px;
  background:var(--panel);
  color:var(--paper);
  font:600 13.5px var(--body);
  cursor:pointer
}
.chat-tour svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round
}
@container flowwin (max-width:419px) {
  .flow-guide {
    display:none
  }
  .chat-tour {
    display:inline-flex
  }
}
.flow-stage.is-touring .chat-tour {
  display:none
}

/* Phones: the Tour button joins the row of steps as a square icon, like the full-screen button */
@media (max-width:900px),(max-height:500px) and (pointer:coarse) {
  .flow-guide {
    position:static;
    flex:none;
    justify-content:center;
    width:40px;
    height:40px;
    padding:0;
    border-radius:10px;
    transform:none
  }
  .flow-guide span {
    display:none
  }
  .flow-guide svg {
    width:19px;
    height:19px
  }
}
@media (pointer:coarse) {
  .tour-skip,.tour-next {
    height:40px
  }
  .tour-close {
    top:4px;
    right:4px;
    width:40px;
    height:40px
  }
  .tour-next {
    padding:0 18px
  }
}
@media (prefers-reduced-motion:reduce) {
  .tour-tip,.tour-tip.is-on,.tour-ring,.tour-layer.is-gliding .tour-tip,.tour-layer.is-gliding .tour-ring {
    transition:none
  }
  .tour-layer[data-kind="do"] .tour-ring::after,.tour-layer[data-kind="do"] .tour-tip.is-on[data-side] {
    animation:none
  }
  .tour-tip {
    translate:none
  }
}
/* Narrow desktops: the button drops its label so the steps keep their room */
@media (min-width:901px) and (max-width:1100px) {
  .flow-guide {
    width:32px;
    padding:0;
    justify-content:center
  }
  .flow-guide span {
    display:none
  }
}
