#ask-stitch,#book-service{position:fixed;z-index:1000;bottom:calc(16px + env(safe-area-inset-bottom));border:2px solid white;border-radius:100px;background:#005f58;color:white;box-shadow:0 3px 16px #072d3555;cursor:pointer}
#book-service{right:calc(16px + env(safe-area-inset-right));min-height:48px;padding:10px 25px;font:700 1rem/1.25 Arial,sans-serif}
#ask-stitch{left:calc(16px + env(safe-area-inset-left));width:64px;height:64px;padding:3px;background:#e3f7f8;display:grid;place-items:center}
#ask-stitch img{height:100%;width:100%;object-fit:contain}
.av-popup{position:fixed;inset:0;box-sizing:border-box;margin:auto;width:min(420px,calc(100% - 28px));max-height:calc(100dvh - 30px);overflow:auto;border:1px solid #aac9c7;border-radius:18px;padding:24px;background:white;color:#163337;box-shadow:0 18px 58px #092e3544;font:16px/1.45 Arial,sans-serif}
.av-popup::backdrop{background:#08262e77}
.av-popup h2{margin:0;padding-right:34px;font:700 1.55rem/1.15 Arial,sans-serif;color:#163337}
.av-popup p{margin:12px 0;color:inherit}
.av-popup a{color:#005c59;text-decoration:underline}
.av-popup [data-close]{position:absolute;top:12px;right:12px;border:0;background:#edf4f4;color:#13373a;border-radius:50%;width:34px;height:34px;font-size:22px}
#service-booking a{display:block;padding:12px 0;border-top:1px solid #d1e4e2}
#stitch-chat{inset:auto auto max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));margin:0}
#stitch-chat [role=log]{max-height:32dvh;overflow:auto;overflow-wrap:anywhere}
#stitch-chat .stitch-question{margin-left:28px;text-align:right;font-weight:700}
#stitch-chat form{display:flex;gap:6px;margin-top:12px}
#stitch-chat input{flex:1;min-width:0;padding:10px;border:1px solid #71918e;border-radius:8px;font:inherit}
#stitch-chat button{cursor:pointer}
#stitch-chat [data-question],#stitch-chat button[type=submit]{border:1px solid #97b4b2;background:#eef9f8;color:#104a47;border-radius:8px;padding:7px 10px;font:inherit}
#stitch-chat button[type=submit]{background:#005f58;color:white}

#ask-stitch {display:inline-flex;gap:2px;align-items:center;width:auto;height:58px;padding:2px 13px 2px 3px;color:#10363b;font:700 14px/1 Arial,sans-serif}
.stitch-heading {display:flex;align-items:center;gap:9px}
.stitch-sprite {display:inline-block;width:48px;height:52px;flex:0 0 auto;background:url(assets/stitch-idle.webp) left top / auto 100% no-repeat}
.stitch-status {color:#23595c;font-size:.9rem}
.stitch-status:empty {display:none}
@media (prefers-reduced-motion:no-preference) {
  #ask-stitch.wave .stitch-sprite {background-image:url(assets/stitch-wave.webp);animation:stitch-four .72s steps(4) 2}
  #stitch-chat.thinking .stitch-sprite {background-image:url(assets/stitch-thinking.webp);animation:stitch-six .85s steps(6) 1}
  #stitch-chat.answered .stitch-sprite {background-image:url(assets/stitch-answer.webp);animation:stitch-six .9s steps(6) 1}
  @keyframes stitch-six {to{background-position-x:-288px}}
  @keyframes stitch-four {to{background-position-x:-192px}}
}

#stitch-chat{padding:16px;background:#f5f8f7}
#stitch-chat .stitch-heading{padding-right:36px}
.stitch-clear{margin-left:auto;border:0;background:transparent;color:#175b55;font:600 .8rem Arial,sans-serif;text-decoration:underline;white-space:nowrap}
#stitch-chat [role=log]{display:flex;flex-direction:column;gap:9px;padding:10px 0;max-height:42dvh}
#stitch-chat .stitch-reply,#stitch-chat .stitch-question{width:fit-content;max-width:88%;padding:10px 13px;text-align:left;font-weight:400;line-height:1.45;margin:0;box-sizing:border-box}
#stitch-chat .stitch-reply{align-self:flex-start;background:white;border:1px solid #cadbd7;border-radius:3px 15px 15px 15px;color:#183833}
#stitch-chat .stitch-question{align-self:flex-end;background:#075c55;color:white;border-radius:15px 3px 15px 15px}
#stitch-chat .stitch-reply a,#stitch-chat .stitch-reply button{display:block;margin-top:7px}
#stitch-chat .stitch-status:not(:empty){width:fit-content;padding:6px 12px;background:white;border-radius:12px;color:#365950}

@property --stitch-angle{syntax:"<angle>";inherits:false;initial-value:0deg}
#stitch-chat{
  border:3px solid transparent;border-radius:22px;
  background:linear-gradient(#f6f9f8,#f6f9f8) padding-box,
    conic-gradient(from var(--stitch-angle),#00a3df,#00bcdf 27%,#855898 48%,#bf0050 73%,#ffd53f 91%,#00a3df) border-box;
  box-shadow:0 16px 60px #142c3840;
}
#stitch-chat .stitch-heading{border-bottom:1px solid #cbddda;padding-bottom:6px}
#stitch-chat .stitch-heading h2{letter-spacing:-.04em;color:#18383b}
#stitch-chat .stitch-question{background:#14383e}
#stitch-chat .stitch-reply button{border-radius:16px;font-size:.9rem;padding:7px 12px}
#stitch-chat .stitch-reply a{font-weight:600;text-underline-offset:3px}
@media(prefers-reduced-motion:no-preference){
  #stitch-chat[open]{animation:stitch-border-flow 9s linear infinite}
  @keyframes stitch-border-flow{to{--stitch-angle:360deg}}
}
#stitch-chat .stitch-reply details{margin-top:10px;padding:8px 10px;border:1px solid #cadbd7;border-radius:8px}
#stitch-chat .stitch-reply summary{cursor:pointer;font-weight:600}
#stitch-chat .stitch-reply ul{padding-left:18px;margin:7px 0 0}
#stitch-chat form.stitch-enquiry{display:grid;gap:9px}
#stitch-chat .stitch-enquiry label{display:grid;gap:3px;font-size:.9rem;font-weight:600}
#stitch-chat .stitch-enquiry :is(input,textarea){box-sizing:border-box;width:100%;border:1px solid #71918e;border-radius:8px;padding:8px;background:#fff;color:#163337;font:400 16px/1.35 Arial,sans-serif}
#stitch-chat .stitch-enquiry textarea{resize:vertical}
#stitch-chat .stitch-enquiry [role=status]{margin:0}
@media(min-width:1024px){
  #ask-stitch{height:84px;padding:3px 19px 3px 5px;gap:6px;font-size:16px}
  #ask-stitch .stitch-sprite{width:72px;height:78px}
}
@media(min-width:1024px) and (prefers-reduced-motion:no-preference){
  #ask-stitch.wave .stitch-sprite{animation-name:stitch-desktop-wave}
  @keyframes stitch-desktop-wave{to{background-position-x:-288px}}
}
