/* SvyaZ inbox colours; scoped so storefront controls keep their own styles. */
.ag-chat {
  --ag-chat-deep: #173e32;
  --ag-chat-green: #25664d;
  --ag-chat-line: #e8ece7;
  --ag-chat-muted: #697b5c;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  color: #26332e;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.ag-chat *, .ag-chat *::before, .ag-chat *::after { box-sizing: border-box; }
.ag-chat button, .ag-chat textarea { font: inherit; }
.ag-chat button { cursor: pointer; transition: background .15s, border-color .15s; }
.ag-chat button:focus-visible { outline: 2px solid #4f9a77; outline-offset: 3px; }
.ag-chat-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border: 1px solid #325e4b; border-radius: 9px; padding: 12px 18px; background: var(--ag-chat-deep); color: #f3f6ed; box-shadow: 0 5px 24px #173e3224; font-weight: 550; }
.ag-chat-toggle:hover { background: #214f3f; }
.ag-chat-toggle svg { flex-shrink: 0; color: #c6dcc1; }
.ag-chat-dialog { position: absolute; right: 0; bottom: 62px; width: min(380px, calc(100vw - 30px)); height: min(550px, calc(100dvh - 120px)); border: 1px solid #dfe5dc; border-radius: 12px; background: #fff; box-shadow: 0 12px 48px #173e3229; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.ag-chat-dialog[hidden] { display: none; }
.ag-chat-dialog header { display: flex; align-items: center; gap: 11px; padding: 18px 16px; background: #173d32; color: #f3f6ed; border-bottom: 1px solid #ffffff12; }
.ag-chat-avatar { display: grid; place-items: center; width: 37px; height: 37px; flex-shrink: 0; background: #426352; color: #dbe7ce; border: 1px solid #ffffff17; border-radius: 10px; font-size: 19px; font-weight: 550; }
.ag-chat-dialog header>div { min-width: 0; flex: 1; }
.ag-chat-dialog header strong { display: block; font-size: 17px; line-height: 1.35; letter-spacing: -.3px; font-weight: 600; }
.ag-chat-dialog header .ag-chat-brand-dot { display: inline; color: #7eb584; font-size: inherit; }
.ag-chat-dialog header div>span { display: block; color: #bbcfc5; font-size: 11px; margin-top: 4px; line-height: 1.6; }
.ag-chat-close { display: grid; place-items: center; width: 33px; height: 33px; padding: 0; flex-shrink: 0; border: 0; border-radius: 5px; background: transparent; color: #c6dcc1; font-size: 26px !important; line-height: 1; }
.ag-chat-close:hover { background: #ffffff12; color: white; }
.ag-chat-messages { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 15px; display: flex; flex-direction: column; gap: 12px; background: #fbfcf8; }
.ag-chat-greeting { max-width: 94%; padding: 12px 13px; border: 1px solid #e9eee3; border-radius: 0 9px 9px 9px; background: white; color: #53624a; font-size: 13px; line-height: 1.8; margin: 0 0 5px; }
.ag-chat-message { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; border: 1px solid #e9eee3; border-radius: 0 9px 9px 9px; padding: 10px 12px; max-width: 92%; margin: 0; background: white; color: #53624a; align-self: flex-start; box-shadow: 0 1px 2px #40513103; }
.ag-chat-message.mine { background: #edf2e4; color: #4f6541; border-color: #e4ebd9; border-radius: 9px 0 9px 9px; align-self: flex-end; }
.ag-chat-form { margin: 0; padding: 13px; border-top: 1px solid var(--ag-chat-line); background: white; }
.ag-chat-form label { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.ag-chat-form textarea { display: block; width: 100%; border: 1px solid #dfe7d5; border-radius: 6px; background: #fefffd; color: #26332e; padding: 10px 11px; resize: vertical; font-size: 13px; line-height: 1.7; min-height: 67px; max-height: 130px; }
.ag-chat-form textarea::placeholder { color: #718267; }
.ag-chat-form textarea:focus { outline: 2px solid #7ebba466; outline-offset: 1px; }
.ag-chat-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 9px; }
.ag-chat-form-bottom>span { font-size: 10px; color: var(--ag-chat-muted); line-height: 1.6; }
.ag-chat-form button { padding: 8px 12px; min-height: 35px; border: 1px solid #2b664d; border-radius: 6px; background: #2b664d; color: white; font-size: 12px; font-weight: 550; }
.ag-chat-form button:hover { background: #21553e; }
.ag-chat-form button:disabled { opacity: .55; cursor: not-allowed; }
.ag-chat-status { padding: 9px 13px; margin: 0; border-top: 1px solid var(--ag-chat-line); font-size: 11px; line-height: 1.7; color: #805c30; background: #fbf4e8; }
.ag-chat-status:empty { display: none; }
@media (max-width: 600px) {
  .ag-chat { right: 12px; bottom: 14px; }
  .ag-chat-toggle { padding: 11px 14px; font-size: 13px; }
  .ag-chat-dialog { bottom: 60px; width: min(380px, calc(100vw - 24px)); height: min(550px, calc(100dvh - 100px)); }
  .ag-chat-form textarea { font-size: 16px; }
  .ag-chat-close { width: 40px; height: 40px; }
  .ag-chat-form button { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .ag-chat button { transition: none; } }
