/* "Como o seu cliente agenda" (D-184): the client's flow on one phone, the seven steps beside it (seven story bars on phones).
   Only landing tokens. The phone screen is sized in container units (cqw: 1cqw = 1% of the screen width). Screens change like
   the panel carousel (js/moments.js fadeOut: the old one fades out on top in 350ms ease-out while the new one eases in), and
   every other movement is a transition on var(--ease) or goes through js/motion.js. */

/* The phone and its screen */
.flow-phone{display:block;padding:8px;border-radius:40px;background:#15181d;box-shadow:30px 40px 70px -30px #000000b3,inset 0 0 0 1px #ffffff1f;transition:opacity .5s var(--ease),transform .6s var(--ease),box-shadow .5s}
.fx-screen{display:block;position:relative;aspect-ratio:390/844;overflow:hidden;border-radius:32px;background:#fbf6ef;color:var(--ink);container-type:inline-size;text-align:left;line-height:1.3;letter-spacing:0}
.fx-layer{position:absolute;inset:0;display:block;opacity:0}
.fx-layer.is-leaving{z-index:1;pointer-events:none}
.fx-layer.is-on{opacity:1}
img.fx-layer,.fx-shot{width:100%;height:100%;object-fit:cover;object-position:top}
/* The code screen is one layer: its four captures (one more digit each) crossfade inside it, under the WhatsApp head and foot,
   so the head and foot leave together with the capture and its e-mail wording never shows through */
.fx-code{isolation:isolate}
.fx-shot{position:absolute;inset:0;display:block;opacity:0}
.fx-shot.is-on{opacity:1}
.fx-shot.is-leaving{z-index:1;pointer-events:none}
/* The booking page is one long page: the top capture, then the calendar capture (s2a) where it sits on the real page, 1664 px of
   the 780 px capture down (it overlaps the bottom of the top capture pixel for pixel). Step 1 scrolls it from the top (profile and
   services) to exactly the calendar and its times; js/client-flow.js puts it back at the top, without the scroll, before it shows. */
.fx-page-roll{display:block;transition:transform 1.6s var(--ease)}
.fx-page-roll.is-placed{transition:none}
.fx-page img{display:block;width:100%;height:auto}
.fx-page picture+picture img{margin-top:-120cqw}
.fx-screen[data-page="1"] .fx-page-roll{transform:translateY(-213.333cqw)}
.fx-tap{position:absolute;left:50%;top:50%;width:16cqw;height:16cqw;border-radius:50%;background:radial-gradient(circle,#923b23 0 22%,#bc563355 23% 60%,#bc563300 61%);opacity:0;transform:translate(-50%,-50%);pointer-events:none;z-index:5}

/* Notification banner (the e-mail with the code, the WhatsApp) */
.fx-note{position:absolute;left:4%;right:4%;top:2.6%;z-index:4;display:flex;align-items:center;gap:3cqw;padding:3.2cqw 3.6cqw;border-radius:5cqw;background:#fffaf4f5;box-shadow:0 2cqw 6cqw -2cqw #091b2d59,0 0 0 1px #d6cec2;transform:translateY(-150%);opacity:0;transition:transform .55s var(--ease),opacity .35s}
.fx-note>span:last-child{display:grid;min-width:0}
.fx-note small{font-size:3cqw;color:var(--muted)}
.fx-note b{font-size:3.6cqw;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fx-note-icon{display:grid;place-items:center;width:9cqw;height:9cqw;flex:none;border-radius:2.6cqw;font-size:4.6cqw;font-weight:700}
.fx-note-icon.is-mail{background:var(--sand);color:var(--terra)}
.fx-note-icon.is-wa{background:var(--terra-deep);color:var(--straw)}
.fx-note-icon .icon{width:5.4cqw;height:5.4cqw}
.fx-screen[data-note=code] .fx-note[data-n=code],.fx-screen[data-note=confirmed] .fx-note[data-n=confirmed],.fx-screen[data-note=reminder] .fx-note[data-n=reminder]{transform:none;opacity:1}

/* WhatsApp: the chat in the landing colours; the messages are the real client templates with sample data. The thread scrolls
   (no bar) and js/client-flow.js keeps it at the bottom, so the last message always shows whole. */
.fx-wa{display:flex;flex-direction:column;background:var(--sand) radial-gradient(circle,#e2c38c66 0 .5cqw,transparent .6cqw) 0 0/6cqw 6cqw}
.fx-wa-top{display:flex;align-items:center;gap:2.6cqw;padding:5cqw 3.6cqw 3.2cqw;background:var(--terra-deep);color:var(--paper);font-size:3.8cqw;line-height:1.2}
.fx-wa-top>.icon{width:5cqw;height:5cqw}
.fx-wa-top .wa-avatar{width:9.6cqw;height:9.6cqw;background-size:6.6cqw}
.fx-wa-top small{display:block;font-size:3cqw;color:var(--paper-on-terra);margin-top:.4cqw}
.fx-wa-thread{flex:1;min-height:0;display:flex;flex-direction:column;gap:2.6cqw;padding:3cqw 3.4cqw;overflow-y:auto;scrollbar-width:none}
.fx-wa-thread::-webkit-scrollbar{display:none}
.fx-wa-thread>:first-child{margin-top:auto}
.fx-wa-thread>*{flex:none}
.fx-wa-card{align-self:center;display:grid;justify-items:center;gap:.6cqw;margin-top:4cqw;padding:4cqw 7cqw;border-radius:4cqw;background:#fffaf4d9;text-align:center}
.fx-wa-card .wa-avatar{width:13cqw;height:13cqw;background-size:9cqw;margin-bottom:1cqw}
.fx-wa-card b{font-size:4cqw}
.fx-wa-card small{font-size:3cqw;color:var(--muted)}
.fx-wa-day{align-self:center;margin-top:3cqw;padding:1cqw 3cqw;border-radius:2cqw;background:#fffaf4b3;font-size:3cqw;color:var(--muted)}
.fx-wa-typing{display:none;gap:1.4cqw;width:max-content;padding:3.6cqw 4cqw;border-radius:1.2cqw 4cqw 4cqw 4cqw;background:var(--surface)}
.fx-wa-typing i{width:2cqw;height:2cqw;border-radius:50%;background:var(--muted);opacity:.5}
.fx-screen[data-typing="1"] .fx-wa-typing{display:flex}
.fx-screen[data-typing="1"] .fx-wa-typing i{animation:fx-dot 1s infinite}
.fx-wa-typing i:nth-child(2){animation-delay:.15s!important}.fx-wa-typing i:nth-child(3){animation-delay:.3s!important}
@keyframes fx-dot{50%{opacity:1;transform:translateY(-1cqw)}}
.fx-wa-msg{display:none;width:90%;border-radius:1.2cqw 4cqw 4cqw 4cqw;background:var(--surface);box-shadow:0 1.6cqw 4cqw -2cqw #3b150a66;overflow:hidden;transform-origin:left bottom}
.fx-wa-msg.is-shown{display:grid}
.fx-wa-text{display:block;padding:3cqw 3.6cqw 2cqw;font-size:3.5cqw;line-height:1.38;color:var(--text);overflow-wrap:anywhere}
.fx-wa-text strong{display:block;font-size:3.9cqw;color:var(--ink);margin-bottom:1cqw}
.fx-wa-text b{font-weight:650;color:var(--ink)}
.fx-wa-text .fx-wa-code{font-size:5cqw;letter-spacing:.04em}
.fx-wa-link{color:var(--terra);text-decoration:underline;word-break:break-all}
.fx-wa-time{display:flex;justify-content:flex-end;align-items:center;gap:1cqw;margin-top:1cqw;font-size:2.8cqw;color:var(--muted)}
.fx-wa-time .icon{width:3.8cqw;height:3.8cqw;color:var(--terra-bright)}
.fx-wa-btn{display:flex;align-items:center;justify-content:center;gap:2cqw;padding:3cqw;border-top:1px solid var(--line);font-size:3.7cqw;font-weight:650;color:var(--terra)}
.fx-wa-btn .icon{width:4.6cqw;height:4.6cqw}
.fx-wa-input{display:flex;align-items:center;gap:2cqw;padding:1.6cqw 3.4cqw 4.4cqw}
.fx-wa-input span{flex:1;padding:2.6cqw 4cqw;border-radius:999px;background:var(--surface);color:var(--muted);font-size:3.4cqw}
.fx-wa-input i{width:9.4cqw;height:9.4cqw;border-radius:50%;background:var(--terra)}

/* The code screen: the real capture, with the head and the foot written for the WhatsApp (the capture's e-mail wording is covered) */
.fx-code-head,.fx-code-foot{position:absolute;left:4cqw;right:4cqw;z-index:2;display:grid;justify-items:center;align-content:center;gap:1.2cqw;background:#fffaf5;text-align:center;color:var(--ink);pointer-events:none}
.fx-code-head{top:34cqw;height:56cqw;gap:1.6cqw}
.fx-code-head b{font-size:6.4cqw;line-height:1.1;font-weight:700;letter-spacing:-.01em}
.fx-code-head small{font-size:3.4cqw;line-height:1.4;color:var(--muted)}
.fx-code-head strong{color:var(--ink);font-weight:650}
.fx-code-head u{color:var(--terra);font-weight:650}
.fx-code-icon{display:grid;place-items:center;width:13cqw;height:13cqw;border-radius:50%;background:var(--sand);color:var(--terra)}
.fx-code-icon .icon{width:6cqw;height:6cqw}
.fx-code-foot{display:block;top:144.2cqw;height:7cqw;line-height:7cqw;font-size:3.1cqw;color:var(--muted)}
.fx-code-foot strong{color:var(--ink)}

/* Shared: the step bars (filled by js/autoplay.js), the plan tag inside a step */
.flow-bar{display:block;height:2px;border-radius:2px;overflow:hidden}
.flow-bar>span{display:block;height:100%;transform:scaleX(0);transform-origin:left}
[aria-current=step] .flow-bar>span,.is-done .flow-bar>span{transform:scaleX(1)}
.flow-plan{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;background:var(--straw);color:var(--terra-deep);font-size:12px;font-weight:700;letter-spacing:.02em;vertical-align:2px}

/* The steps on the left, the phone and the facts on the right */
.flow-inner{--cc:1fr;--ca:1.15fr}
.flow-steps{display:grid;gap:6px;margin-top:clamp(18px,3svh,28px);max-width:520px}
.flow-step{position:relative;display:grid;grid-template-columns:38px minmax(0,1fr);gap:14px;align-items:center;width:100%;min-height:52px;padding:8px 14px 10px;border-radius:var(--radius-sm);text-align:left;color:var(--fg);transition:background-color .5s var(--ease),color .5s var(--ease),box-shadow .5s var(--ease)}
.flow-step b{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#6f2d1b80;color:var(--paper);font-family:var(--font-display);font-size:18px;transition:background-color .5s var(--ease),color .5s var(--ease)}
.flow-step>span:nth-child(2){font-size:14px;line-height:1.4;color:var(--sub)}
.flow-step strong{display:block;font-size:17px;line-height:1.3;color:inherit}
.flow-step .flow-bar{position:absolute;left:14px;right:14px;bottom:4px}
.flow-step:hover:not([aria-current=step]){box-shadow:inset 0 0 0 1.5px var(--rule)}
.flow-step[aria-current=step]{background:var(--surface);color:var(--ink);box-shadow:0 18px 34px -22px #00000099}
.flow-step[aria-current=step]>span:nth-child(2){color:var(--text)}
.flow-step[aria-current=step] b{background:var(--terra);color:var(--straw)}
.flow-step[aria-current=step] .flow-bar{background:#923b2326}
.flow-step .flow-bar>span{background:var(--terra)}
.flow-art{--ph:min(300px,calc((100svh - 250px)*.462));display:grid;grid-template-columns:calc(var(--ph) + 16px) minmax(0,250px);gap:clamp(28px,3.4vw,56px);align-items:center;justify-content:center}
.flow-art .flow-phone{width:calc(var(--ph) + 16px);max-width:100%}
.flow-facts{display:grid;gap:14px}
.flow-facts p{font-size:15px;line-height:1.5;color:var(--sub);padding-top:14px;border-top:1px solid var(--rule)}
.flow-facts strong{color:var(--fg)}
.flow-facts .flow-note{font-size:12px;line-height:1.45;border:0;padding:0;opacity:.9}

/* Tablets */
@media(max-width:1150px){
  .flow-art{grid-template-columns:calc(var(--ph) + 16px) minmax(0,220px)}
}
@media(max-width:1023px){
  .flow-art{--ph:min(290px,62vw);justify-content:start}
}
/* Phones */
@media(max-width:760px){
  /* The steps become a row of seven bars (like stories) with the text of the one that plays under it */
  .flow-steps{position:relative;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;padding-bottom:62px;margin-top:16px;max-width:none}
  .flow-step{position:static;display:flex;flex-direction:column-reverse;align-items:stretch;gap:6px;min-height:44px;padding:6px 0 0;background:none!important;box-shadow:none!important;color:var(--paper-on-terra)}
  .flow-step b{width:auto;height:auto;background:none!important;font-family:var(--font-body);font-size:12px;font-weight:650;color:inherit!important;justify-self:start;display:block}
  .flow-step .flow-bar{position:static;background:#f5eee640!important}
  .flow-step .flow-bar>span{background:var(--straw)}
  .flow-step[aria-current=step]{color:var(--straw)}
  .flow-step>span:nth-child(2){position:absolute;left:0;right:0;top:56px;display:none;font-size:14px;color:var(--sub)!important}
  .flow-step[aria-current=step]>span:nth-child(2){display:block}
  .flow-step strong{font-size:16px;color:var(--fg)}
  .flow-art{--ph:min(262px,66vw);grid-template-columns:minmax(0,1fr);justify-items:center;gap:22px}
  .flow-facts{gap:10px}
  .flow-facts p{font-size:14px;padding-top:10px}
}

/* Reduced motion or "Pausar movimentos": every step is shown as it ends, nothing travels */
@media(prefers-reduced-motion:reduce){.fx-wa-typing i{animation:none!important}}
html[data-motion=paused] .fx-wa-typing i{animation:none!important}
