/* SRJ Sprays — live chat widget */
.srjchat {
  --c-navy: var(--navy, #133142);
  --c-deep: var(--navy-deep, #0f202b);
  --c-slate: var(--slate, #3b505c);
  --c-mist: var(--mist, #e6e8eb);
  --c-sage: var(--sage, #93a08a);
  --c-paper: #f4f5f3;
  --c-online: #3ccf78;
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 900; font-family: var(--font-body, "Poppins", system-ui, sans-serif); color: var(--c-deep);
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.srjchat .sr-only, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.srjchat [hidden] { display: none !important; }
.srjchat svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.srjchat button { font: inherit; cursor: pointer; }

/* Launcher */
.srjchat-launcher {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px; background: var(--c-navy); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 14px 34px rgba(15, 32, 43, .32), 0 2px 6px rgba(15, 32, 43, .2);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, background-color .2s ease;
}
.srjchat-launcher:hover { transform: translateY(-2px); background: var(--c-deep); box-shadow: 0 18px 40px rgba(15, 32, 43, .38); }
.srjchat-launcher:focus-visible { outline: 3px solid var(--c-navy); outline-offset: 3px; box-shadow: 0 0 0 3px #fff, 0 14px 34px rgba(15, 32, 43, .32); }
.srjchat-launcher-icon { display: grid; place-items: center; }
.srjchat-launcher-dot {
  position: absolute; top: 12px; left: 34px; width: 11px; height: 11px; border-radius: 50%;
  background: #a9b3ba; border: 2px solid var(--c-navy); transition: background-color .3s ease;
}
.srjchat.is-online .srjchat-launcher-dot { background: var(--c-online); }
.srjchat.is-online .srjchat-launcher-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--c-online);
  opacity: 0; animation: srjchat-ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes srjchat-ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.srjchat-badge {
  position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #b3261e; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
  box-shadow: 0 0 0 3px #fff;
}
.srjchat.is-open .srjchat-launcher { transform: scale(.92); }

/* Teaser (new reply while closed) */
.srjchat-teaser {
  position: relative; max-width: 300px; animation: srjchat-pop .35s cubic-bezier(.2, .8, .2, 1);
}
.srjchat-teaser-body {
  display: grid; gap: 2px; width: 100%; padding: 14px 18px; border: 0; border-radius: 18px 18px 6px 18px;
  background: #fff; color: var(--c-deep); text-align: left; box-shadow: 0 14px 40px rgba(15, 32, 43, .22);
}
.srjchat-teaser-from { font-size: 12px; font-weight: 600; color: var(--c-slate); }
.srjchat-teaser-text { font-size: 14px; line-height: 1.45; }
.srjchat-teaser-close {
  position: absolute; top: -10px; left: -10px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: var(--c-deep); color: #fff;
}
.srjchat-teaser-close svg { width: 14px; height: 14px; }
@keyframes srjchat-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* Panel */
.srjchat-panel {
  position: absolute; right: 0; bottom: 74px; width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 120px)); height: min(620px, calc(100dvh - 120px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; background: var(--c-paper);
  box-shadow: 0 30px 80px rgba(15, 32, 43, .35), 0 4px 14px rgba(15, 32, 43, .18);
  opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom right;
  transition: opacity .22s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.srjchat-panel.is-in { opacity: 1; transform: none; }
.srjchat-panel:not(.is-in) { pointer-events: none; } /* (opening or closing: nothing in it takes a tap meanwhile) */
.srjchat-head {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 10px 14px 16px;
  background: linear-gradient(135deg, var(--c-navy), var(--c-deep)); color: #fff;
}
.srjchat-avatar { position: relative; width: 40px; height: 40px; flex: none; }
.srjchat-avatar img { width: 40px; height: 40px; border-radius: 50%; display: block; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.srjchat-who { flex: 1; min-width: 0; }
.srjchat-who h2 { margin: 0; font-family: var(--font-display, "Vollkorn", Georgia, serif); font-size: 19px; font-weight: 700; line-height: 1.15; color: #fff; }
.srjchat-status { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, .82); }
.srjchat-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a9b3ba; }
.srjchat.is-online .srjchat-status-dot { background: var(--c-online); box-shadow: 0 0 0 3px rgba(60, 207, 120, .25); }
.srjchat-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  border: 0; background: transparent; color: #fff; text-decoration: none; transition: background-color .2s ease;
}
.srjchat-icon:hover { background: rgba(255, 255, 255, .14); }
.srjchat-icon:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.srjchat-icon svg { width: 20px; height: 20px; }

/* "We're not online right now…": a calm status note that still stands out from the grey chat (a soft sand tint, an
   amber edge and a clock), so a visitor sees at once that a reply may take a while. Nothing bright and nothing moves. */
.srjchat-offline {
  flex: none; margin: 0; padding: 11px 16px 11px 13px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start;
  background: #faf1dc; border-left: 3px solid #d2a54b; border-bottom: 1px solid rgba(120, 86, 20, .16);
  font-size: 13px; line-height: 1.45; color: #3d3322;
}
.srjchat-offline svg { width: 18px; height: 18px; margin-top: 1px; color: #8d6410; }
.srjchat-offline strong { font-weight: 600; color: #2a2213; }
@media (max-width: 359.98px) { /* the narrowest phones: no clock, so the words keep their 3 lines */
  .srjchat-offline { grid-template-columns: minmax(0, 1fr); }
  .srjchat-offline svg { display: none; }
}
.srjchat-offline a { color: var(--c-navy); font-weight: 600; }

.srjchat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px 10px; overscroll-behavior: contain; scroll-behavior: smooth; }
.srjchat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.srjchat-msg { display: flex; flex-direction: column; max-width: 86%; animation: srjchat-pop .28s cubic-bezier(.2, .8, .2, 1); }
.srjchat-msg.is-them { align-self: flex-start; }
.srjchat-msg.is-me { align-self: flex-end; align-items: flex-end; }
.srjchat-bubble {
  padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.srjchat-msg.is-them .srjchat-bubble { background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(15, 32, 43, .08); }
.srjchat-msg.is-me .srjchat-bubble { background: var(--c-navy); color: #fff; border-bottom-right-radius: 6px; }
.srjchat-msg.is-faq .srjchat-bubble { background: #fff; border-left: 3px solid var(--c-sage); }
.srjchat-msg.is-pending .srjchat-bubble { opacity: .65; }
.srjchat-msg.is-failed .srjchat-bubble { background: #fbe3e0; color: #8c1d14; }
.srjchat-meta { margin: 3px 8px 0; font-size: 11.5px; color: var(--c-slate); }
.srjchat-retry { border: 0; background: none; padding: 0; color: #8c1d14; font-weight: 600; text-decoration: underline; font-size: 11.5px; }

.srjchat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.srjchat-chip {
  padding: 8px 13px; border-radius: 999px; border: 1.5px solid rgba(19, 49, 66, .18); background: #fff;
  color: var(--c-navy); font-size: 13px; font-weight: 500; line-height: 1.2;
  transition: border-color .2s ease, background-color .2s ease, transform .15s ease;
}
.srjchat-chip:hover { border-color: var(--c-navy); }
.srjchat-chip:active { transform: scale(.97); }
.srjchat-chip.is-primary { background: var(--c-sage); border-color: var(--c-sage); color: var(--c-deep); font-weight: 600; }
.srjchat-chip.is-primary:hover { background: #a2ae9a; }
.srjchat-body > .srjchat-chips { animation: srjchat-pop .28s cubic-bezier(.2, .8, .2, 1); }
/* "More questions": brings the quick questions back once one has been picked. (Scoped to .srjchat so its
   font outranks `.srjchat button { font: inherit; }`.) */
.srjchat .srjchat-more {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 2px; padding: 6px 12px 6px 9px;
  border: 1.5px solid rgba(19, 49, 66, .18); border-radius: 999px; background: transparent;
  color: var(--c-slate); font-size: 12.5px; font-weight: 600; line-height: 1.2;
  transition: border-color .2s ease, color .2s ease, transform .15s ease;
  animation: srjchat-pop .28s cubic-bezier(.2, .8, .2, 1);
}
.srjchat-more svg { width: 15px; height: 15px; flex: none; }
.srjchat-more:hover { border-color: var(--c-navy); color: var(--c-navy); }
.srjchat-more:active { transform: scale(.97); }
@media (pointer: coarse) { .srjchat-more { min-height: 40px; } }

.srjchat-contact {
  display: grid; gap: 8px; width: min(300px, 100%); padding: 14px; border-radius: 18px; border-bottom-left-radius: 6px;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 32, 43, .08); border-left: 3px solid var(--c-sage);
}
.srjchat-contact-title { margin: 0 0 2px; font-size: 14px; line-height: 1.45; }
.srjchat-contact input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid #7b8790;
  font: inherit; font-size: 16px; color: var(--c-deep); background: #fff;
}
.srjchat-contact input:focus { outline: none; border-color: var(--c-navy); box-shadow: 0 0 0 3px rgba(147, 160, 138, .4); }
.srjchat-contact-row { display: flex; gap: 8px; align-items: center; }
.srjchat-contact-save { flex: 1; height: 40px; border: 0; border-radius: 999px; background: var(--c-navy); color: #fff; font-weight: 600; font-size: 14px; }
.srjchat-contact-skip { height: 40px; padding: 0 12px; border: 0; background: none; color: var(--c-slate); text-decoration: underline; font-size: 13px; }
.srjchat-contact-msg { margin: 0; min-height: 1em; font-size: 12.5px; color: var(--c-slate); }

.srjchat-typing { flex: none; margin: 0; padding: 0 18px 6px; font-size: 12.5px; color: var(--c-slate); }
.srjchat-typing span {
  display: inline-block; width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; background: var(--c-sage);
  animation: srjchat-blink 1.2s infinite ease-in-out;
}
.srjchat-typing span:nth-child(2) { animation-delay: .15s; }
.srjchat-typing span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes srjchat-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.srjchat-error { flex: none; margin: 0; padding: 8px 16px; background: #fbe3e0; color: #8c1d14; font-size: 13px; line-height: 1.4; }

.srjchat-composer {
  flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px 8px 12px;
  background: #fff; border-top: 1px solid rgba(19, 49, 66, .08);
}
.srjchat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.srjchat-composer textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 132px; padding: 11px 14px; border-radius: 22px;
  border: 1.5px solid #7b8790; background: var(--c-paper); font: inherit; font-size: 16px; line-height: 1.35; color: var(--c-deep);
}
.srjchat-composer textarea:focus { outline: none; border-color: var(--c-navy); background: #fff; box-shadow: 0 0 0 3px rgba(147, 160, 138, .35); }
.srjchat-send {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--c-navy); color: #fff; transition: background-color .2s ease, transform .15s ease;
}
.srjchat-send svg { width: 19px; height: 19px; margin-left: 2px; }
.srjchat-send:disabled { background: #b9c1c7; cursor: default; }
.srjchat-send:not(:disabled):active { transform: scale(.93); }
.srjchat-foot { flex: none; margin: 0; padding: 0 16px 10px; background: #fff; font-size: 11.5px; color: var(--c-slate); text-align: center; }
.srjchat-foot a { color: inherit; }

/* Phones: full-screen chat */
@media (max-width: 640px) {
  .srjchat { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .srjchat-launcher { height: 56px; width: 56px; padding: 0; justify-content: center; }
  .srjchat-launcher-text { display: none; }
  .srjchat-launcher-dot { top: 9px; left: auto; right: 9px; }
  .srjchat-panel {
    position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0;
    padding-top: env(safe-area-inset-top); transform: translateY(24px);
  }
  /* the room for the home indicator goes under the last line, below the message box */
  .srjchat-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .srjchat-teaser { max-width: calc(100vw - 90px); }
  html.srjchat-lock, html.srjchat-lock body { overflow: hidden; }
  /* when a mobile action bar is present the launcher sits above it */
  body.has-actionbar .srjchat { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-actionbar .srjchat-launcher { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .srjchat *, .srjchat *::before, .srjchat *::after { animation: none !important; transition: none !important; }
}

/* "Prefer to talk now?" nudge after 3 minutes without a reply */
.srjchat-nudge {
  display: grid; gap: 10px; width: min(300px, 100%); padding: 12px 14px; border-radius: 18px; border-bottom-left-radius: 6px;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 32, 43, .08); border-left: 3px solid var(--c-sage);
}
.srjchat-nudge p { margin: 0; font-size: 14px; line-height: 1.45; }
.srjchat-nudge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.srjchat-nudge-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--c-navy); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
}
.srjchat-nudge-btn.is-wa { background: #25d366; color: var(--c-deep); }

/* typing dots drawn as paint droplets */
.srjchat-typing span, .srjchat-typing span:nth-child(n) {
  width: 7px; height: 9px; border-radius: 50% 50% 50% 50% / 62% 62% 40% 40%; background: var(--c-sage);
}

/* unavailable notice, counter, footer actions, estimate service picker */
.srjchat-unavailable { flex: none; display: grid; gap: 8px; padding: 12px 16px; background: #fbe9e6; border-bottom: 1px solid rgba(19, 49, 66, .08); }
.srjchat-unavailable p { margin: 0; font-size: 13.5px; font-weight: 600; color: #7a1d14; }
.srjchat-composer { position: relative; }
.srjchat-count { position: absolute; right: 64px; top: -18px; font-size: 11px; color: var(--c-slate); background: #fff; padding: 0 6px; border-radius: 6px; }
.srjchat-composer textarea:disabled { opacity: .55; cursor: not-allowed; }
.srjchat-clear { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.srjchat-services {
  display: grid; gap: 10px; width: min(310px, 100%); padding: 12px 14px; border-radius: 18px; border-bottom-left-radius: 6px;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 32, 43, .08); border-left: 3px solid var(--c-sage);
}
.srjchat-services p { margin: 0; font-size: 14px; }
.srjchat-services .srjchat-chips { margin: 0; }
.srjchat-chip.is-link { border-style: dashed; background: transparent; }
@media (pointer: coarse) { .srjchat-chip { min-height: 44px; } }

/* the open chat always sits above the cookie card and action bar */
.srjchat.is-open { z-index: 1000; }
.srjchat-chip:focus-visible, .srjchat-more:focus-visible, .srjchat-icon:focus-visible, .srjchat-send:focus-visible, .srjchat-contact-save:focus-visible,
.srjchat-nudge-btn:focus-visible, .srjchat-retry:focus-visible, .srjchat-clear:focus-visible, .srjchat-foot a:focus-visible {
  outline: 3px solid var(--c-navy); outline-offset: 2px;
}
.srjchat-head .srjchat-icon:focus-visible { outline-color: #fff; }

/* Hosts that pin their own badge to the bottom-right corner (see --host-badge in site.css): the launcher, its teaser
   and the panel sit above it, and on phones the full-screen chat keeps its last line (and everything above it) clear
   of it. The window height is chosen once with @supports: a height that uses var() can't fall back to an earlier
   100vh line */
.srjchat { --chat-screen-h: 100vh; }
@supports (height: 100dvh) { .srjchat { --chat-screen-h: 100dvh; } }
@media (min-width: 640.02px) {
  .srjchat { bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--host-badge, 0px)); }
  .srjchat-panel { height: min(620px, calc(var(--chat-screen-h) - 120px - var(--host-badge, 0px))); }
}
@media (max-width: 640px) {
  .srjchat { bottom: calc(12px + var(--host-badge, 0px) + env(safe-area-inset-bottom)); }
  body.has-actionbar .srjchat { bottom: calc(84px + var(--host-badge, 0px) + env(safe-area-inset-bottom)); }
  .srjchat-foot { padding-bottom: calc(10px + var(--host-badge, 0px) + env(safe-area-inset-bottom)); }
}

/* "We are here": a waving hand, emoji style, slides up out of the Live chat button (on phones, the Live chat button of
   the Call / WhatsApp / Live chat bar) and waves; then a cloud-shaped bubble whose trailing dots lead to it appears;
   later the bubble goes and the hand slides back down into the button (timing in the chat's script, which sets
   is-in, is-waving and is-saying). The bubble (a button) and the hand both open the chat. The hand sits just under the chat's layer, so the button (or the bar) hides its lower
   part: it seems to stand inside it. Only what's drawn takes taps: the bubble once it's showing, and the hand itself,
   which moves with the slide. On phones the bubble sits above the hand, clear of the screen's middle. */
.srjchat-hello {
  --hand: 64px;                        /* the hand's box (the drawing has room for its motion lines) */
  --hand-sink: 15px;                   /* how far it reaches behind the button */
  --cloud: 140px;                      /* the bubble's width */
  --lift: .72;                         /* how high the bubble sits, in hands */
  position: fixed; z-index: 899; right: calc(max(16px, env(safe-area-inset-right)) + 34px);
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--host-badge, 0px) + 58px - var(--hand-sink));
  display: flex; align-items: flex-end;
  font-family: var(--font-body, "Poppins", system-ui, sans-serif); color: var(--navy-deep, #0f202b);
  pointer-events: none; visibility: hidden; transition: visibility 0s linear .95s; /* once it's back in */
}
.srjchat-hello.is-in { visibility: visible; transition-delay: 0s; }
.srjchat-hello button {
  margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.srjchat-hello-say { /* hidden (so it takes no taps or focus) until it's drawn, and again once it has faded */
  position: relative; z-index: 1; flex: none; margin: 0 -12px calc(var(--hand) * var(--lift)) 0;
  opacity: 0; translate: 8px 6px; scale: .92; transform-origin: 92% 100%; visibility: hidden;
  transition: opacity .22s ease, translate .3s var(--ease, cubic-bezier(.2, .8, .2, 1)), scale .3s var(--ease, cubic-bezier(.2, .8, .2, 1)), visibility 0s linear .22s;
}
.srjchat-hello .srjchat-hello-bubble { /* the cloud, after SRJ's reference: six lobes and three dots trailing to the hand */
  position: relative; display: block; width: var(--cloud); aspect-ratio: 470 / 435; border-radius: 40%;
  pointer-events: none; transition: transform .2s ease; /* only the drawn cloud takes taps: its box's empty corners don't */
}
.srjchat-hello-cloud * { pointer-events: visiblePainted; }
.srjchat-hello-cloud {
  position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; overflow: visible;
  filter: drop-shadow(0 0 1px rgba(15, 32, 43, .55)) drop-shadow(0 8px 16px rgba(15, 32, 43, .22));
}
.srjchat-hello-words { /* real text, in the middle of the cloud's body */
  position: absolute; left: 49%; top: 38%; translate: -50% -50%; white-space: nowrap; pointer-events: auto;
  font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: .01em;
}
.srjchat-hello .srjchat-hello-close { /* on the cloud's upper-left lobe */
  position: absolute; z-index: 2; top: 9%; left: 5%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-deep, #0f202b); color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(15, 32, 43, .25); pointer-events: auto;
}
.srjchat-hello-close svg { width: 13px; height: 13px; display: block; }
.srjchat-hello-close::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; } /* a 44px target */

.srjchat-hello-figure { /* clipped only at the bottom, where the button hides the rest of the hand */
  position: relative; flex: none; width: var(--hand); height: calc(var(--hand) * 1.05);
  clip-path: inset(-60px -60px 0 -60px); pointer-events: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.srjchat-hello-media { /* inside the button: the whole hand below the box, out of sight */
  position: absolute; inset: 0; translate: 0 100%; pointer-events: none;
  transition: translate .7s cubic-bezier(.55, 0, .8, .35) .2s, transform .2s ease; /* going: down, once the bubble's gone */
}
.srjchat-hello-hand, .srjchat-hello-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.srjchat-hello-hand { transform-origin: 54% 96%; } /* the wrist */
.srjchat-hello-hand path { pointer-events: visiblePainted; } /* only the drawn hand takes clicks */
.srjchat-hello-marks { opacity: 0; pointer-events: none; }

/* coming: it slides up out of the button; the bubble pops out once it has waved */
.srjchat-hello.is-in .srjchat-hello-media { translate: 0 0; transition: translate .9s cubic-bezier(.22, .8, .32, 1), transform .2s ease; }
.srjchat-hello.is-saying .srjchat-hello-say { opacity: 1; translate: 0 0; scale: 1; visibility: visible; transition-delay: 0s; } /* after the wave */

/* the wave: one short, gentle rock from the wrist (two and a half swings), with the motion lines while it lasts */
.srjchat-hello.is-waving .srjchat-hello-hand { animation: srjchat-hello-wave 1.8s ease-in-out; }
.srjchat-hello.is-waving .srjchat-hello-marks { animation: srjchat-hello-marks 1.8s ease-in-out; }
@keyframes srjchat-hello-wave {
  0%, 100% { transform: rotate(0); }
  16% { transform: rotate(16deg); }
  36% { transform: rotate(-8deg); }
  56% { transform: rotate(14deg); }
  78% { transform: rotate(-3deg); }
}
@keyframes srjchat-hello-marks { 0%, 100% { opacity: 0; } 14%, 76% { opacity: 1; } }

/* a mouse over the bubble, the hand or the Live chat button lifts them together (classes set by the chat's script) */
.srjchat-hello .srjchat-hello-bubble:hover { transform: translateY(-2px); }
.srjchat-hello.is-lift .srjchat-hello-media { transform: translateY(-3px); }
.srjchat.is-hello-hover .srjchat-launcher { transform: translateY(-2px); background: var(--c-deep); }
/* focus: a navy ring with a white one outside it, so it shows on the white bubble, light pages and the navy hero alike */
.srjchat-hello .srjchat-hello-bubble:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 3px var(--navy-deep, #0f202b); }
.srjchat-hello .srjchat-hello-close:focus-visible {
  outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--navy-deep, #0f202b), 0 0 0 8px #fff, 0 4px 10px rgba(15, 32, 43, .25);
}
@media (forced-colors: active) {
  .srjchat-hello-cloud { display: none; }
  .srjchat-hello .srjchat-hello-bubble { border: 1px solid CanvasText; background: Canvas; }
  .srjchat-hello .srjchat-hello-close { border: 1px solid CanvasText; }
  .srjchat-hello .srjchat-hello-bubble:focus-visible, .srjchat-hello .srjchat-hello-close:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }
}

/* short laptop and sideways-phone screens */
@media (min-width: 640.02px) and (max-height: 520px) {
  .srjchat-hello { --hand: 50px; --hand-sink: 12px; --cloud: 116px; --lift: .5; }
  .srjchat-hello-words { font-size: 13px; }
}
/* phones: the bubble above the hand; behind the bar (z-index 800) over its Live chat button */
@media (max-width: 640px) {
  .srjchat-hello { /* a page without the bar: over the round Live chat button */
    --hand: 54px; --hand-sink: 10px; --cloud: 118px;
    flex-direction: column; align-items: flex-end;
    right: 12px; bottom: calc(12px + var(--host-badge, 0px) + env(safe-area-inset-bottom) + 46px);
  }
  body.has-actionbar .srjchat-hello {
    z-index: 799;
    right: calc(22px + env(safe-area-inset-right, 0px)); /* the hand rises from the right-hand part of the bar's Live chat
       button, so the bubble above it stays clear of the screen's middle (the hero slider) */
    bottom: calc(70px + var(--host-badge, 0px) + env(safe-area-inset-bottom) - var(--hand-sink));
  }
  .srjchat-hello-say { margin: 0 -4px -4px 0; transform-origin: 96% 100%; } /* its dots end over the hand */
  .srjchat-hello-words { font-size: 14px; }
  .srjchat-hello .srjchat-hello-close { left: auto; right: 14%; top: 10%; margin: -13px -13px 0 0; } /* clear of the screen's middle */
  /* typing in the estimate form sends the bar down out of the way: the hand goes down with it, rather than sinking
     where it was */
  body.has-actionbar .srjchat-hello { transition: translate .35s var(--ease, cubic-bezier(.2, .8, .2, 1)), visibility 0s linear .95s; }
  body.has-actionbar .srjchat-hello.is-in { transition-delay: 0s; }
  body.has-actionbar.is-typing .srjchat-hello { /* (both ways: a moment's focus in the form is a small dip, not a blink) */
    translate: 0 calc(100% + 80px + var(--host-badge, 0px) + env(safe-area-inset-bottom));
    transition: translate .35s var(--ease, cubic-bezier(.2, .8, .2, 1)), visibility 0s linear .35s;
  }
}
/* narrow phones: a smaller cloud, the hand nearer the edge, so the cloud stays clear of the hero slider's hint */
@media (max-width: 374px) {
  body.has-actionbar .srjchat-hello { --cloud: 106px; right: calc(14px + env(safe-area-inset-right, 0px)); }
  .srjchat-hello-words { font-size: 13px; }
}
/* reduced motion: no slide and no wave (the script doesn't start one); the hand and the bubble fade in and out where
   they stand, on the same timings, with the hand's motion lines on to say it's waving. These win over the site's own
   rule that makes every transition instant. No hover lift either. */
@media (prefers-reduced-motion: reduce) {
  .srjchat-hello .srjchat-hello-marks { opacity: 1; }
  .srjchat-hello { transition: visibility 0s linear .45s !important; }
  .srjchat-hello.is-in { transition: visibility 0s linear 0s !important; }
  .srjchat-hello .srjchat-hello-media { translate: none !important; opacity: 0; transition: opacity .4s ease !important; }
  .srjchat-hello.is-in .srjchat-hello-media { opacity: 1; }
  .srjchat-hello .srjchat-hello-say { translate: none !important; scale: none !important; transition: opacity .4s ease, visibility 0s linear .4s !important; }
  .srjchat-hello.is-saying .srjchat-hello-say { transition: opacity .4s ease, visibility 0s linear 0s !important; }
  .srjchat-hello .srjchat-hello-bubble:hover, .srjchat-hello.is-lift .srjchat-hello-media { transform: none !important; }
}

/* Photos: the tray of photos waiting to go (between the error line and the message box), the + button at the start
   of the message box (its menu: Add photos, and on touch screens Take a photo), and the tiles in a message. The tiles,
   their progress rings and the menu are styled by the shared photo script, which puts its stylesheet first in <head>:
   these rules fit them to the chat (and win any tie). Reduced motion is covered by the rule for everything in the
   chat above. */
.srjchat-tray { /* (it gives way before the message box does: it can shrink, and scrolls) */
  flex: 0 1 auto; min-height: 0; max-height: 168px; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 12px 12px 2px; gap: 8px;
  background: #fff; border-top: 1px solid rgba(19, 49, 66, .08);
  --srjphoto-size: 56px; --srjphoto-mist: var(--c-mist); --srjphoto-muted: var(--c-slate);
  --srjphoto-accent: var(--c-navy); --srjphoto-danger: #8c1d14;
}
.srjchat-tray:not([hidden]) ~ .srjchat-composer { border-top-color: transparent; }
.srjchat-tray .srjphoto-tile { animation: srjchat-pop .28s cubic-bezier(.2, .8, .2, 1); }
.srjchat .srjphoto-retry { font-size: 13px; font-weight: 600; } /* (`.srjchat button` would reset its font) */
/* "You can add up to 6 photos…", under the photos. The character counter (from 1,800 characters) sits just above
   the message box, on this line, so while it shows the note keeps a strip clear for it under its words */
.srjchat-photo-note { flex: none; margin: 0; padding: 6px 16px 0; background: #fff; font-size: 12px; line-height: 1.4; color: var(--c-slate); }
.srjchat-panel:has(.srjchat-count:not([hidden])) .srjchat-photo-note { padding-bottom: 19px; }

/* the + button, in the message box's row: as tall as the box, like Send */
.srjchat .srjchat-photo {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: var(--c-mist); color: var(--c-navy);
  transition: background-color .2s ease, transform .15s ease;
}
.srjchat-composer:has(> .srjchat-photo:not([hidden])) { padding-left: 10px; } /* (as far from the edge as Send) */
.srjchat-photo:not(:disabled):hover, .srjchat-photo[aria-expanded="true"] { background: #d5dade; }
.srjchat-photo:not(:disabled):active { transform: scale(.93); }
.srjchat-photo:disabled { opacity: .55; cursor: not-allowed; }
.srjchat-photo:focus-visible { outline: 3px solid var(--c-navy); outline-offset: 2px; }
/* its menu's file inputs and the menu itself (fixed, placed by the photo script) live here, under the message box;
   it takes no room */
.srjchat-tools { position: relative; flex: none; height: 0; margin: 0; padding: 0; }
.srjchat .srjphoto-pop-item { font-size: 15px; font-weight: 500; }
@media (forced-colors: active) { .srjchat .srjphoto-pop { border: 1px solid CanvasText; } } /* (its shadow is dropped there) */
/* A short chat (is-short: the panel under 520 px tall while the tray of photos shows, a phone with its keyboard open,
   say; set by the chat's script): the tray gets compact, so the header, the message box and Send still fit. It keeps
   one row of smaller photos in view (scroll for more); the message area, the notices and the box give up a little
   room; and on touch screens, where it's the keyboard that makes the chat short, the line under the message box makes
   way while the tray is there (on a computer it always stays: its Privacy link and Clear chat are there). */
.srjchat-panel.is-short .srjchat-tray { max-height: 62px; padding-top: 8px; --srjphoto-size: 44px; }
.srjchat-panel.is-short .srjchat-tray:not([hidden]) { min-height: 46px; }
.srjchat-panel.is-short .srjchat-tray .srjphoto-tile.has-note { min-height: 44px; }
.srjchat-panel.is-short .srjchat-tray .srjphoto-tile.has-note .srjphoto-thumb { width: 44px; height: 44px; }
.srjchat-panel.is-short .srjchat-photo-note { padding-top: 4px; }
.srjchat-panel.is-short .srjchat-body { padding-block: 6px 2px; }
.srjchat-panel.is-short .srjchat-offline, .srjchat-panel.is-short .srjchat-error { padding-block: 5px; }
/* when even that isn't enough, the "not online" notice gives way (down to one line, and scrolls) before the message box
   is pushed out of the panel */
.srjchat-panel.is-short .srjchat-offline { flex: 0 1 auto; min-height: 29px; overflow-y: auto; }
.srjchat-panel.is-short .srjchat-composer textarea { max-height: 88px; }
@media (pointer: coarse) {
  .srjchat-panel.is-short .srjchat-tray:not([hidden]) ~ .srjchat-foot { display: none; }
}
@media (pointer: coarse) and (max-width: 640px) { /* the line's room for a host badge (--host-badge) goes under the box */
  .srjchat-panel.is-short .srjchat-tray:not([hidden]) ~ .srjchat-composer { padding-bottom: calc(8px + var(--host-badge, 0px)); }
}

/* in a message: above its words. On the navy bubble the tiles' own colours turn light; on a "Not sent" one, red. */
.srjchat-bubble .srjchat-photos { margin: 2px 0 8px; gap: 6px; --srjphoto-size: 64px; }
.srjchat-msg.is-me .srjchat-bubble {
  --srjphoto-mist: rgba(255, 255, 255, .14); --srjphoto-muted: rgba(255, 255, 255, .78);
  --srjphoto-accent: #fff; --srjphoto-danger: #ffd2cc;
}
.srjchat-msg.is-failed .srjchat-bubble {
  --srjphoto-mist: rgba(140, 29, 20, .1); --srjphoto-muted: #8c1d14; --srjphoto-accent: #8c1d14; --srjphoto-danger: #8c1d14;
}
.srjchat-msg.is-me .srjphoto-thumb { outline: 1px solid rgba(255, 255, 255, .22); outline-offset: -1px; } /* a dark photo on navy */
/* the message's own Try again covers its photos; their × only while the message can still change (not sent, and
   not possibly stored by a try that got no answer) */
.srjchat-msg .srjphoto-retry, .srjchat-msg .srjphoto-sep { display: none !important; }
.srjchat-msg:not(.is-editable) .srjphoto-remove { display: none !important; }
.srjchat-msg:not(.is-editable) .srjphoto-tile.has-note { padding-right: 0; } /* (no × to keep room for) */
