/* The chat assistant for visitors: light or dark, with the owner's accent and chat button colours. */
.aib-as { --aib-as-accent: #2563eb; --aib-as-on: #fff; --aib-as-bg: #fff; --aib-as-fg: #1d1d1f; --aib-as-head: #fff; --aib-as-head-fg: #1d1d1f; --aib-as-bot: #f1f3f5; --aib-as-line: #e3e5e8; --aib-as-x: 20px; --aib-as-y: 20px; position: fixed; right: var(--aib-as-x); bottom: var(--aib-as-y); z-index: 99990; font-size: 15px; line-height: 1.45; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: inherit; }
/* Bottom left: the button and the window line up on the left. */
.aib-as--left { right: auto; left: var(--aib-as-x); align-items: flex-start; }
.aib-as--dark { --aib-as-bg: #1e1f23; --aib-as-fg: #f1f2f4; --aib-as-head: #141518; --aib-as-head-fg: #f1f2f4; --aib-as-bot: #2d2f34; --aib-as-line: #34363c; }
.aib-as-open { width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; background: var(--aib-as-launch, var(--aib-as-accent)); color: var(--aib-as-launch-on, var(--aib-as-on)); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .22); }
.aib-as-open:focus-visible, .aib-as button:focus-visible, .aib-as a:focus-visible, .aib-as textarea:focus-visible, .aib-as input:focus-visible { outline: 3px solid var(--wp--preset--color--accent-1, #2563eb); outline-offset: 2px; }
.aib-as-panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px - var(--aib-as-y, 20px))); display: flex; flex-direction: column; background: var(--aib-as-bg); color: var(--aib-as-fg); border: 1px solid var(--aib-as-line); border-radius: 16px; box-shadow: 0 12px 48px rgba(0, 0, 0, .18); overflow: hidden; }
.aib-as-panel[hidden] { display: none; }
.aib-as-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: var(--aib-as-head); color: var(--aib-as-head-fg); border-bottom: 1px solid var(--aib-as-line); }
.aib-as-head strong { flex: 1; font-size: 16px; }
.aib-as-head button { background: transparent; border: 0; color: inherit; cursor: pointer; font: inherit; }
.aib-as-reset { font-size: 13px !important; text-decoration: underline; opacity: .85; }
.aib-as-reset[hidden] { display: none; }
.aib-as-close { font-size: 26px !important; line-height: 1; padding: 0 4px; }
.aib-as-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.aib-as-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.aib-as-msg.is-bot { align-self: flex-start; background: var(--aib-as-bot); border-bottom-left-radius: 4px; }
.aib-as-msg.is-user { align-self: flex-end; background: var(--aib-as-accent); color: var(--aib-as-on); border-bottom-right-radius: 4px; }
.aib-as-msg.is-wait { opacity: .65; font-style: italic; }
.aib-as-msg a { color: inherit; text-decoration: underline; }
.aib-as-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.aib-as-chips:empty { display: none; }
.aib-as-chip { font: inherit; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--aib-as-accent); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.aib-as-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--aib-as-line); }
.aib-as-input { flex: 1; resize: none; font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(127, 127, 127, .45); background: transparent; color: inherit; min-height: 42px; max-height: 120px; }
.aib-as-send { width: 42px; height: 42px; flex: none; border: 0; border-radius: 10px; cursor: pointer; background: var(--aib-as-accent); color: var(--aib-as-on); display: grid; place-items: center; }
.aib-as-send:disabled { opacity: .5; cursor: default; }
.aib-as-foot { padding: 0 16px 10px; font-size: 12px; opacity: .7; }
.aib-as-foot a { color: inherit; }
.aib-as-lead { align-self: stretch; display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(127, 127, 127, .3); border-radius: 12px; }
.aib-as-lead input, .aib-as-lead textarea { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(127, 127, 127, .45); background: transparent; color: inherit; }
.aib-as-lead button { font: inherit; font-weight: 600; padding: 10px; border: 0; border-radius: 8px; cursor: pointer; background: var(--aib-as-accent); color: var(--aib-as-on); }
.aib-as-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 520px) {
	/* Phones: at most 12px from the side; the distance from the bottom stays (sticky bars). */
	.aib-as { right: min(var(--aib-as-x), 12px); }
	.aib-as--left { right: auto; left: min(var(--aib-as-x), 12px); }
	.aib-as.is-open { left: 12px; right: 12px; }
	.aib-as-panel { width: 100%; height: calc(100vh - 88px - var(--aib-as-y, 12px)); }
}
/* The cookie banner sits above the assistant's button. */
body:has(div.aib-consent:not([hidden])) .aib-as { bottom: max(170px, var(--aib-as-y)); }
