/* LiveAgent chat mockup. One identical block on every page (see README) loads this file and chat.js.
   A single bordered box morphs between the 56px square and the window by transitioning its width and
   height; the panel and the icons cross-fade around it. The LiveAgent chat will mount in .la-slot.
   Design-system tokens; square corners, hairlines, no shadows. The focus ring sits 4px inside,
   because the box clips anything drawn outside it. */

.la { --la-w: 360px; --la-h: min(440px, 100dvh - 96px); position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 30;
  opacity: 0; visibility: hidden; translate: 0 var(--space-2);
  transition: opacity .2s var(--st-ease), translate .2s var(--st-ease), visibility 0s .2s; }
.la.is-shown { opacity: 1; visibility: visible; translate: none; transition-delay: 0s; }

/* the box: 56px square, grows into the window */
.la-box { box-sizing: border-box; position: relative; overflow: hidden; width: 56px; height: 56px;
  background: var(--paper); border: var(--hairline) solid var(--ink);
  transition: width .32s var(--st-ease) .08s, height .32s var(--st-ease) .08s; }
.la.is-open .la-box { width: var(--la-w); height: var(--la-h); transition-delay: 0s; }

/* the window's content, anchored bottom-right so it is uncovered as the box grows */
.la-panel { position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column;
  width: calc(var(--la-w) - 2 * var(--hairline)); height: calc(var(--la-h) - 2 * var(--hairline));
  opacity: 0; visibility: hidden; transition: opacity .1s var(--st-ease), visibility 0s .1s; }
.la.is-open .la-panel { opacity: 1; visibility: visible; transition: opacity .16s var(--st-ease) .2s, visibility 0s .2s; }
.la-slot { flex: 1; margin: var(--space-4); background: var(--paper-2); border: var(--hairline) solid var(--line); }
.la-credit { display: flex; align-items: center; gap: var(--space-2); height: 55px; padding: 0 64px 0 var(--space-4);
  border-top: var(--hairline) solid var(--line); color: var(--ink-muted); font: 12px/16px var(--font-text); text-decoration: none;
  transition: color .2s var(--st-ease); }
.la-credit img { display: block; width: auto; height: 30px; }
.la-credit:hover { color: var(--ink); }

/* the square's button stays as the window's bottom-right cell: LiveAgent mark when closed, "−" when open */
.la-btn { position: absolute; right: 0; bottom: 0; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px;
  padding: 0; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; transition: background-color .2s var(--st-ease); }
.la-btn:hover { background: var(--paper-2); }
.la-btn img, .la-btn::after { grid-area: 1 / 1; }
.la-btn img { display: block; width: 32px; height: auto; transition: opacity .12s var(--st-ease) .3s; }
.la-btn::after { content: "\2212"; font: 500 20px/1 var(--font-display); opacity: 0; transition: opacity .08s var(--st-ease); }
.la.is-open .la-btn img { opacity: 0; transition: opacity .08s var(--st-ease); }
.la.is-open .la-btn::after { opacity: 1; transition: opacity .16s var(--st-ease) .2s; }
.la-btn:focus-visible, .la-credit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -4px; }

/* 1px marker chat.js puts on the hero's bottom edge */
.la-sentinel { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; pointer-events: none; }

@media (max-width: 767px) { .la { --la-w: calc(100vw - 2 * var(--space-4)); --la-h: min(480px, 70dvh); } }
@media (prefers-reduced-motion: reduce) {
  .la { translate: none; }
  .la-box { transition: none; }
  .la *, .la ::after { transition-delay: 0s !important; }
}
