/* Ellery chat widget (2026-11-26), the styles for site/chat.js. Every rule starts with .ec-, so nothing else on the page changes.
   Contrast (WCAG 2.2 AA): white on #2F3BF5 6.4:1; ink #0F1222 on white 18:1; muted #5B6072 on white 6.2:1;
   the error red #B3261E on white 6.5:1. Targets are 44px or more. The focus ring is a 3px blue line, white inside the
   blue launcher. No motion beyond a short fade, and none when the visitor asks for less. */
.ec-root { position: fixed; right: 16px; bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--sans, 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif); font-size: 16px; line-height: 1.5; color: #0F1222; }
.ec-root *, .ec-root *::before, .ec-root *::after { box-sizing: border-box; }
.ec-launch { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: #2F3BF5; color: #fff; font: 600 16px/1 var(--sans, system-ui, sans-serif); cursor: pointer; box-shadow: 0 6px 24px rgba(15, 18, 34, 0.28); }
.ec-launch:hover { background: #1C25B8; }
.ec-launch:focus-visible, .ec-close:focus-visible, .ec-btn:focus-visible { outline: 3px solid #0F1222; outline-offset: 2px; box-shadow: 0 0 0 5px #fff; }
.ec-launch-ico { font-size: 18px; }
.ec-dot { position: absolute; top: 4px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #FF7A59; border: 2px solid #fff; }
.ec-dot[hidden] { display: none; }
.ec-panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); max-height: min(600px, calc(100vh - 110px)); max-height: min(600px, calc(100dvh - 110px)); background: #fff; border: 1px solid #E3E5EC; border-radius: 18px; box-shadow: 0 16px 48px rgba(15, 18, 34, 0.28); overflow: hidden; }
.ec-panel[hidden] { display: none; }
.ec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px 8px 12px 18px; background: #0F1222; color: #fff; }
.ec-title { margin: 0; font: 600 18px/1.3 var(--display, var(--sans, system-ui, sans-serif)); color: #fff; }
.ec-title:focus { outline: none; }
.ec-title:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ec-status { margin: 2px 0 0; font-size: 14px; color: #C9CCD8; }
.ec-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; font: 400 28px/1 var(--sans, system-ui, sans-serif); cursor: pointer; }
.ec-close:hover { background: #23283F; }
.ec-close:focus-visible { outline-color: #fff; box-shadow: none; }
.ec-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px 18px; }
.ec-p { margin: 0 0 12px; color: #0F1222; overflow-wrap: anywhere; }
.ec-sub { font-size: 14px; color: #5B6072; }
.ec-body a { color: #1C25B8; }
.ec-list { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ec-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ec-btn { min-height: 44px; padding: 0 18px; border: 1px solid #C9CCD8; border-radius: 12px; background: #fff; color: #0F1222; font: 600 15px/1.2 var(--sans, system-ui, sans-serif); cursor: pointer; }
.ec-btn:hover { background: #F0F1F5; }
.ec-btn[aria-disabled="true"] { opacity: 0.6; cursor: default; }
.ec-vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ec-quick { width: 100%; text-align: left; }
.ec-primary { border-color: #2F3BF5; background: #2F3BF5; color: #fff; }
.ec-primary:hover { background: #1C25B8; border-color: #1C25B8; }
.ec-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ec-field { display: flex; flex-direction: column; gap: 4px; }
.ec-field label { font-size: 14px; font-weight: 600; color: #0F1222; }
.ec-input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #5B6072; border-radius: 10px; background: #fff; color: #0F1222; font: 400 16px/1.4 var(--sans, system-ui, sans-serif); }
textarea.ec-input { resize: vertical; }
.ec-input:focus-visible { outline: 3px solid #2F3BF5; outline-offset: 1px; }
.ec-note { margin: 0; font-size: 13px; color: #5B6072; }
.ec-err { margin: 0; min-height: 0; font-size: 14px; font-weight: 600; color: #B3261E; }
.ec-err:empty { display: none; }
.ec-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ec-log { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.ec-m { max-width: 92%; padding: 8px 12px; border-radius: 12px; overflow-wrap: anywhere; font-size: 15px; }
.ec-mine { align-self: flex-end; background: #ECEEFF; color: #0F1222; }
.ec-theirs { align-self: flex-start; background: #F0F1F5; color: #0F1222; }
.ec-who { font-weight: 600; }
.ec-reply { flex-direction: row; align-items: flex-end; }
.ec-reply .ec-input { flex: 1 1 auto; }
.ec-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 480px) {
  .ec-root { right: 12px; left: 12px; align-items: stretch; }
  .ec-launch { align-self: flex-end; }
  .ec-panel { width: 100%; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); }
}
@media (prefers-reduced-motion: no-preference) {
  .ec-panel { animation: ec-in 0.16s ease-out; }
  @keyframes ec-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (forced-colors: active) {
  .ec-launch, .ec-primary { border: 2px solid ButtonText; }
  .ec-dot { background: Highlight; }
}
