/* =========================================================================
   Agent Chat — widget styles
   Every visual value is driven by CSS custom properties set from settings.
   ========================================================================= */

.agntchat-root {
	position: fixed;
	z-index: var(--ac-z, 999999);
	font-family: var(--ac-font);
	font-size: var(--ac-font-size);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.agntchat-root *, .agntchat-root *::before, .agntchat-root *::after { box-sizing: border-box; }
.agntchat-root button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; }

/* ---------- positions ---------- */
.agntchat-pos-bottom-right { right: var(--ac-offset-x); bottom: var(--ac-offset-y); }
.agntchat-pos-bottom-left  { left:  var(--ac-offset-x); bottom: var(--ac-offset-y); }
.agntchat-pos-top-right    { right: var(--ac-offset-x); top:    var(--ac-offset-y); }
.agntchat-pos-top-left     { left:  var(--ac-offset-x); top:    var(--ac-offset-y); }

/* =========================================================================
   LAUNCHER
   ========================================================================= */
.agntchat-launcher {
	position: relative;
	width: var(--ac-launcher-size);
	height: var(--ac-launcher-size);
	display: flex; align-items: center; justify-content: center;
	background: var(--ac-launcher);
	color: var(--ac-launcher-icon);
	box-shadow: 0 8px 28px rgba(0,0,0,.28);
	transition: transform calc(.22s * var(--ac-speed, 1)) cubic-bezier(.34,1.56,.64,1),
	            box-shadow calc(.22s * var(--ac-speed, 1)) ease;
}
.agntchat-shape-circle  { border-radius: 50%; }
.agntchat-shape-rounded { border-radius: 22%; }
.agntchat-shape-square  { border-radius: 8px; }
.agntchat-shape-none    { background: transparent; box-shadow: none; }
.agntchat-root[data-hover-lift="1"] .agntchat-launcher:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 14px 36px rgba(0,0,0,.34); }
.agntchat-launcher:active { transform: scale(.94); }

.agntchat-launcher-svg { width: 56%; height: 56%; }
.agntchat-launcher-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.agntchat-shape-circle .agntchat-launcher-img,
.agntchat-shape-rounded .agntchat-launcher-img,
.agntchat-shape-square .agntchat-launcher-img { object-fit: cover; border-radius: inherit; }

.agntchat-close-icon { position: absolute; width: 42%; height: 42%; opacity: 0; transform: rotate(-90deg) scale(.4); transition: all calc(.28s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1); }
.agntchat-launcher-open .agntchat-close-icon { opacity: 1; transform: rotate(0) scale(1); }
.agntchat-launcher-open .agntchat-launcher-svg,
.agntchat-launcher-open .agntchat-launcher-img { opacity: 0; transform: rotate(90deg) scale(.4); }
.agntchat-launcher-svg, .agntchat-launcher-img { transition: all calc(.28s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1); }

/* badge */
.agntchat-badge {
	position: absolute; top: -4px; right: -4px;
	min-width: 20px; height: 20px; padding: 0 5px;
	background: #FF3B5C; color: #fff;
	font-size: 11px; font-weight: 700;
	border-radius: 12px; border: 2px solid #fff;
	display: none; align-items: center; justify-content: center;
}
.agntchat-badge-show { display: flex; animation: agntchat-badge-pop calc(.4s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1); }
@keyframes agntchat-badge-pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- launcher ENTRANCE animations ---------- */
.agntchat-enter-bounce-in { animation: agntchat-bounce-in calc(.7s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1) both; }
@keyframes agntchat-bounce-in { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.agntchat-enter-slide-up { animation: agntchat-slide-up calc(.55s * var(--ac-speed,1)) cubic-bezier(.22,1,.36,1) both; }
@keyframes agntchat-slide-up { from { transform: translateY(90px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.agntchat-enter-fade { animation: agntchat-fade calc(.6s * var(--ac-speed,1)) ease both; }
@keyframes agntchat-fade { from { opacity: 0; } to { opacity: 1; } }
.agntchat-enter-zoom { animation: agntchat-zoom calc(.5s * var(--ac-speed,1)) cubic-bezier(.22,1,.36,1) both; }
@keyframes agntchat-zoom { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.agntchat-enter-flip { animation: agntchat-flip calc(.7s * var(--ac-speed,1)) cubic-bezier(.22,1,.36,1) both; }
@keyframes agntchat-flip { from { transform: rotateY(180deg) scale(.4); opacity: 0; } to { transform: rotateY(0) scale(1); opacity: 1; } }

/* ---------- launcher IDLE animations ---------- */
.agntchat-idle-pulse-ring::after {
	content: ''; position: absolute; inset: 0; border-radius: inherit;
	box-shadow: 0 0 0 0 var(--ac-launcher);
	animation: agntchat-ring calc(2.6s * var(--ac-speed,1)) ease-out infinite;
	pointer-events: none;
}
@keyframes agntchat-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac-launcher) 55%, transparent); } 70% { box-shadow: 0 0 0 18px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.agntchat-idle-heartbeat { animation: agntchat-heartbeat calc(2.2s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-heartbeat { 0%,100% { transform: scale(1); } 12% { transform: scale(1.09); } 24% { transform: scale(1); } 36% { transform: scale(1.07); } 48% { transform: scale(1); } }
.agntchat-idle-float { animation: agntchat-float calc(3.4s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.agntchat-idle-wiggle { animation: agntchat-wiggle calc(4s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-wiggle { 0%,86%,100% { transform: rotate(0); } 88% { transform: rotate(-9deg); } 91% { transform: rotate(8deg); } 94% { transform: rotate(-5deg); } 97% { transform: rotate(3deg); } }
.agntchat-idle-glow { animation: agntchat-glow calc(2.8s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-glow { 0%,100% { box-shadow: 0 8px 28px rgba(0,0,0,.28); } 50% { box-shadow: 0 8px 28px rgba(0,0,0,.28), 0 0 26px 4px color-mix(in srgb, var(--ac-launcher) 60%, transparent); } }
.agntchat-idle-bounce { animation: agntchat-idle-bounce calc(2.8s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1) infinite; }
@keyframes agntchat-idle-bounce { 0%,60%,100% { transform: translateY(0) scaleY(1); } 66% { transform: translateY(0) scaleY(.88) scaleX(1.08); } 74% { transform: translateY(-14px) scaleY(1.05); } 84% { transform: translateY(0) scaleY(.94) scaleX(1.04); } 92% { transform: translateY(-4px); } }
.agntchat-idle-swing { transform-origin: top center; animation: agntchat-swing calc(3.2s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-swing { 0%,100% { transform: rotate(0); } 20% { transform: rotate(8deg); } 40% { transform: rotate(-7deg); } 60% { transform: rotate(4deg); } 80% { transform: rotate(-3deg); } }
.agntchat-idle-breathe { animation: agntchat-breathe calc(3.6s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-breathe { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.06); filter: brightness(1.12); } }
.agntchat-idle-spin { animation: agntchat-idle-spin calc(6s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-idle-spin { 0%,80%,100% { transform: rotate(0); } 88% { transform: rotate(360deg); } }
.agntchat-idle-orbit::before {
	content: ''; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
	background:
		radial-gradient(circle 4px at 50% 0, var(--ac-launcher) 98%, transparent) no-repeat,
		radial-gradient(circle 2.5px at 50% 100%, color-mix(in srgb, var(--ac-launcher) 55%, transparent) 98%, transparent) no-repeat;
	animation: agntchat-orbit calc(3.2s * var(--ac-speed,1)) linear infinite;
}
@keyframes agntchat-orbit { to { transform: rotate(360deg); } }
.agntchat-idle-rainbow { animation: agntchat-rainbow calc(7s * var(--ac-speed,1)) linear infinite; }
@keyframes agntchat-rainbow { to { filter: hue-rotate(360deg); } }

/* ---------- launcher NUDGE one-shots (idle behaviors) ---------- */
.agntchat-nudge-wiggle { animation: agntchat-nudge-wiggle calc(.9s * var(--ac-speed,1)) ease-in-out 1 !important; }
@keyframes agntchat-nudge-wiggle { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-14deg); } 35% { transform: rotate(12deg); } 55% { transform: rotate(-8deg); } 75% { transform: rotate(5deg); } }
.agntchat-nudge-bounce { animation: agntchat-nudge-bounce calc(.85s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1) 1 !important; }
@keyframes agntchat-nudge-bounce { 0%,100% { transform: translateY(0); } 20% { transform: translateY(0) scaleY(.85) scaleX(1.1); } 45% { transform: translateY(-20px); } 70% { transform: translateY(0) scaleY(.92) scaleX(1.05); } 85% { transform: translateY(-6px); } }
.agntchat-nudge-spin { animation: agntchat-nudge-spin calc(.8s * var(--ac-speed,1)) cubic-bezier(.45,0,.2,1) 1 !important; }
@keyframes agntchat-nudge-spin { to { transform: rotate(360deg); } }
.agntchat-nudge-pulse { animation: agntchat-nudge-pulse calc(.7s * var(--ac-speed,1)) ease-in-out 1 !important; }
@keyframes agntchat-nudge-pulse { 0%,100% { transform: scale(1); } 30% { transform: scale(1.22); } 60% { transform: scale(.95); } }
.agntchat-nudge-shake { animation: agntchat-nudge-shake calc(.7s * var(--ac-speed,1)) ease-in-out 1 !important; }
@keyframes agntchat-nudge-shake { 0%,100% { transform: translateX(0); } 15% { transform: translateX(-7px); } 30% { transform: translateX(6px); } 45% { transform: translateX(-5px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.agntchat-nudge-wave { animation: agntchat-nudge-wave calc(1.1s * var(--ac-speed,1)) ease-in-out 1 !important; transform-origin: bottom center; }
@keyframes agntchat-nudge-wave { 0%,100% { transform: rotate(0) translateY(0); } 15% { transform: rotate(-16deg) translateY(-4px); } 35% { transform: rotate(14deg) translateY(-6px); } 55% { transform: rotate(-12deg) translateY(-4px); } 75% { transform: rotate(8deg) translateY(-2px); } }

/* ---------- launcher SLEEP state (dozes off after inactivity) ---------- */
.agntchat-asleep { animation: agntchat-sleep-breathe calc(4.5s * var(--ac-speed,1)) ease-in-out infinite !important; filter: saturate(.55) brightness(.82); }
@keyframes agntchat-sleep-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.agntchat-zzz {
	position: absolute; top: -6px; right: -4px; font-size: 15px; line-height: 1;
	pointer-events: none; opacity: 0;
}
.agntchat-asleep .agntchat-zzz { animation: agntchat-zzz calc(2.6s * var(--ac-speed,1)) ease-in-out infinite; }
@keyframes agntchat-zzz { 0% { opacity: 0; transform: translate(0,0) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(10px,-18px) scale(1.15); } }

/* =========================================================================
   GREETING BUBBLE
   ========================================================================= */
.agntchat-greet {
	position: absolute;
	bottom: calc(var(--ac-launcher-size) + 16px);
	max-width: 260px;
	background: var(--ac-bg);
	color: var(--ac-bot-text);
	padding: 12px 34px 12px 16px;
	border-radius: 16px;
	box-shadow: 0 10px 32px rgba(0,0,0,.22);
	cursor: pointer;
	opacity: 0; transform: translateY(12px) scale(.92); pointer-events: none;
	transition: all calc(.4s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1);
}
.agntchat-pos-bottom-right .agntchat-greet, .agntchat-pos-top-right .agntchat-greet { right: 0; }
.agntchat-pos-bottom-left .agntchat-greet, .agntchat-pos-top-left .agntchat-greet { left: 0; }
.agntchat-pos-top-right .agntchat-greet, .agntchat-pos-top-left .agntchat-greet { bottom: auto; top: calc(var(--ac-launcher-size) + 16px); }
.agntchat-greet-show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.agntchat-greet-x { position: absolute; top: 4px; right: 8px; font-size: 18px; color: inherit; opacity: .5; line-height: 1; }
.agntchat-greet-x:hover { opacity: 1; }

/* =========================================================================
   PANEL
   ========================================================================= */
.agntchat-panel {
	position: absolute;
	width: var(--ac-width);
	height: var(--ac-height);
	max-height: calc(100vh - var(--ac-offset-y) - var(--ac-launcher-size) - 40px);
	max-width: calc(100vw - 32px);
	background: var(--ac-bg);
	border-radius: var(--ac-radius);
	box-shadow: 0 24px 64px rgba(0,0,0,.28);
	display: flex; flex-direction: column;
	overflow: hidden;
	opacity: 0; pointer-events: none;
	bottom: calc(var(--ac-launcher-size) + 18px);
}
.agntchat-pos-bottom-right .agntchat-panel, .agntchat-pos-top-right .agntchat-panel { right: 0; transform-origin: bottom right; }
.agntchat-pos-bottom-left .agntchat-panel, .agntchat-pos-top-left .agntchat-panel { left: 0; transform-origin: bottom left; }
.agntchat-pos-top-right .agntchat-panel, .agntchat-pos-top-left .agntchat-panel { bottom: auto; top: calc(var(--ac-launcher-size) + 18px); transform-origin: top right; }
.agntchat-pos-top-left .agntchat-panel { transform-origin: top left; }

/* ---------- open animations ---------- */
.agntchat-open-spring-up { transform: translateY(28px) scale(.94); transition: all calc(.42s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1); }
.agntchat-open-scale-pop { transform: scale(.6); transition: all calc(.36s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1); }
.agntchat-open-fade { transform: none; transition: opacity calc(.3s * var(--ac-speed,1)) ease; }
.agntchat-open-flip-3d { transform: perspective(1200px) rotateX(-24deg) translateY(20px); transition: all calc(.46s * var(--ac-speed,1)) cubic-bezier(.22,1,.36,1); }
.agntchat-open-slide-side { transform: translateX(60px); transition: all calc(.38s * var(--ac-speed,1)) cubic-bezier(.22,1,.36,1); }
.agntchat-pos-bottom-left .agntchat-open-slide-side, .agntchat-pos-top-left .agntchat-open-slide-side { transform: translateX(-60px); }
.agntchat-open-genie { transform: scale(.1) translateY(60%); transition: all calc(.5s * var(--ac-speed,1)) cubic-bezier(.22,1.4,.36,1); }
.agntchat-panel.agntchat-visible { opacity: 1; pointer-events: auto; transform: none; }

/* =========================================================================
   HEADER
   ========================================================================= */
.agntchat-header {
	display: flex; align-items: center; gap: 12px;
	padding: 16px 14px 16px 18px;
	color: var(--ac-header-text);
	flex-shrink: 0;
}
.agntchat-avatar {
	position: relative;
	width: 42px; height: 42px; border-radius: 50%;
	background: rgba(255,255,255,.22);
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 18px;
	flex-shrink: 0;
}
.agntchat-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.agntchat-status-dot {
	position: absolute; bottom: 0; right: 0;
	width: 11px; height: 11px; border-radius: 50%;
	background: #2ED573; border: 2px solid var(--ac-primary);
	animation: agntchat-status calc(2s * var(--ac-speed,1)) ease-in-out infinite;
}
@keyframes agntchat-status { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.agntchat-head-meta { flex: 1; min-width: 0; }
.agntchat-bot-name { font-weight: 700; font-size: 15.5px; }
.agntchat-bot-tag { font-size: 12px; opacity: .85; }
.agntchat-btn-min, .agntchat-btn-reset { width: 32px; height: 32px; border-radius: 9px; color: var(--ac-header-text); display: flex; align-items: center; justify-content: center; opacity: .85; transition: all .18s ease; flex-shrink: 0; }
.agntchat-btn-min:hover, .agntchat-btn-reset:hover { background: rgba(255,255,255,.18); opacity: 1; }
.agntchat-btn-min svg, .agntchat-btn-reset svg { width: 18px; height: 18px; }

/* =========================================================================
   MESSAGES
   ========================================================================= */
.agntchat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px 8px;
	display: flex; flex-direction: column; gap: 12px;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
}
.agntchat-messages::-webkit-scrollbar { width: 6px; }
.agntchat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.14); border-radius: 3px; }

.agntchat-row { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.agntchat-row-user { align-self: flex-end; flex-direction: row-reverse; }
.agntchat-row-assistant { align-self: flex-start; }
.agntchat-msg-avatar {
	width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
	background: linear-gradient(135deg, var(--ac-primary), var(--ac-secondary));
	color: #fff; font-size: 12px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
.agntchat-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }

.agntchat-bubble {
	padding: 10px 14px;
	border-radius: var(--ac-bubble-radius);
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: pre-wrap;
}
.agntchat-bubble-assistant { background: var(--ac-bot-bubble); color: var(--ac-bot-text); border-bottom-left-radius: 5px; }
.agntchat-bubble-user { background: var(--ac-user-bubble); color: var(--ac-user-text); border-bottom-right-radius: 5px; }
.agntchat-bubble a { color: inherit; text-decoration: underline; }
.agntchat-bubble code { background: rgba(0,0,0,.09); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.agntchat-bubble pre { background: rgba(0,0,0,.08); padding: 10px; border-radius: 8px; overflow-x: auto; margin: 6px 0; white-space: pre; }

/* ---------- message animations ---------- */
.agntchat-root[data-msg-anim="slide-fade"] .agntchat-row.agntchat-anim { animation: agntchat-msg-slide calc(.34s * var(--ac-speed,1)) cubic-bezier(.22,1,.36,1) both; }
@keyframes agntchat-msg-slide { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.agntchat-root[data-msg-anim="pop"] .agntchat-row.agntchat-anim { animation: agntchat-msg-pop calc(.34s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1) both; }
@keyframes agntchat-msg-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.agntchat-root[data-msg-anim="fade"] .agntchat-row.agntchat-anim { animation: agntchat-fade calc(.3s * var(--ac-speed,1)) ease both; }
.agntchat-root[data-msg-anim="drop"] .agntchat-row.agntchat-anim { animation: agntchat-msg-drop calc(.42s * var(--ac-speed,1)) cubic-bezier(.34,1.56,.64,1) both; }
@keyframes agntchat-msg-drop { from { opacity: 0; transform: translateY(-16px) scale(.94); } to { opacity: 1; transform: none; } }

.agntchat-fade-in { animation: agntchat-fade calc(.45s * var(--ac-speed,1)) ease both; }

/* ---------- typing indicators ---------- */
.agntchat-typing { display: flex; align-items: center; gap: 5px; min-height: 24px; }
.agntchat-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; }
.agntchat-typing-dots-bounce .agntchat-dot { animation: agntchat-dotb calc(1.2s * var(--ac-speed,1)) ease-in-out infinite; }
.agntchat-typing-dots-bounce .agntchat-dot:nth-child(2) { animation-delay: .15s; }
.agntchat-typing-dots-bounce .agntchat-dot:nth-child(3) { animation-delay: .3s; }
@keyframes agntchat-dotb { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }
.agntchat-typing-dots-wave .agntchat-dot { animation: agntchat-dotw calc(1.4s * var(--ac-speed,1)) ease-in-out infinite; }
.agntchat-typing-dots-wave .agntchat-dot:nth-child(2) { animation-delay: .12s; }
.agntchat-typing-dots-wave .agntchat-dot:nth-child(3) { animation-delay: .24s; }
@keyframes agntchat-dotw { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(2.1) translateY(-1px); opacity: 1; } }
.agntchat-typing-dots-pulse .agntchat-dot { animation: agntchat-dotp calc(1.3s * var(--ac-speed,1)) ease-in-out infinite; }
.agntchat-typing-dots-pulse .agntchat-dot:nth-child(2) { animation-delay: .18s; }
.agntchat-typing-dots-pulse .agntchat-dot:nth-child(3) { animation-delay: .36s; }
@keyframes agntchat-dotp { 0%,100% { transform: scale(.7); opacity: .3; } 50% { transform: scale(1.25); opacity: 1; } }
.agntchat-tbar { display: block; width: 60px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, currentColor, transparent); background-size: 200% 100%; animation: agntchat-bar calc(1.1s * var(--ac-speed,1)) linear infinite; opacity: .7; }
@keyframes agntchat-bar { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.agntchat-brain { display: inline-block; animation: agntchat-spin calc(1.6s * var(--ac-speed,1)) linear infinite; margin-right: 6px; }
@keyframes agntchat-spin { to { transform: rotate(360deg); } }
.agntchat-think { opacity: .6; font-size: .9em; font-style: italic; }

/* =========================================================================
   SUGGESTIONS / INPUT / FOOTER
   ========================================================================= */
.agntchat-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 6px 16px 10px; flex-shrink: 0; }
.agntchat-suggestions:empty { display: none; }
.agntchat-chip {
	padding: 7px 13px; border-radius: 999px;
	border: 1.5px solid color-mix(in srgb, var(--ac-primary) 45%, transparent);
	color: var(--ac-primary); font-size: 12.5px; font-weight: 600;
	background: transparent;
	transition: all .18s ease;
}
.agntchat-chip:hover { background: var(--ac-primary); color: #fff; transform: translateY(-1px); }

.agntchat-input-wrap {
	display: flex; align-items: flex-end; gap: 8px;
	padding: 10px 12px 12px;
	flex-shrink: 0;
}
.agntchat-input {
	flex: 1;
	background: var(--ac-input-bg);
	color: var(--ac-input-text);
	border: 1.5px solid transparent;
	border-radius: 14px;
	padding: 11px 14px;
	font-family: inherit; font-size: inherit;
	resize: none; outline: none;
	max-height: 120px;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.agntchat-input:focus { border-color: var(--ac-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-primary) 18%, transparent); }
.agntchat-send {
	width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
	background: linear-gradient(135deg, var(--ac-primary), var(--ac-secondary));
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	transition: transform .18s cubic-bezier(.34,1.56,.64,1), filter .18s ease;
}
.agntchat-send svg { width: 19px; height: 19px; }
.agntchat-send:hover { transform: scale(1.08); filter: brightness(1.08); }
.agntchat-send:active { transform: scale(.92); }
.agntchat-send-busy { animation: agntchat-send-pulse .9s ease-in-out infinite; pointer-events: none; }
@keyframes agntchat-send-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.agntchat-footer { padding: 0 16px 10px; flex-shrink: 0; }
.agntchat-gdpr { font-size: 10.5px; opacity: .55; color: var(--ac-bot-text); }
.agntchat-powered { font-size: 10.5px; opacity: .45; color: var(--ac-bot-text); text-align: center; padding-top: 4px; }

/* =========================================================================
   DARK MODE
   ========================================================================= */
.agntchat-root[data-dark="on"] .agntchat-panel,
.agntchat-root[data-dark="on"] .agntchat-greet { background: var(--ac-bg-dark); }
.agntchat-root[data-dark="on"] .agntchat-bubble-assistant { background: var(--ac-bot-bubble-dark); color: var(--ac-bot-text-dark); }
.agntchat-root[data-dark="on"] .agntchat-greet,
.agntchat-root[data-dark="on"] .agntchat-gdpr,
.agntchat-root[data-dark="on"] .agntchat-powered { color: var(--ac-bot-text-dark); }
.agntchat-root[data-dark="on"] .agntchat-input { background: var(--ac-input-bg-dark); color: var(--ac-bot-text-dark); }
.agntchat-root[data-dark="on"] .agntchat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); }

@media (prefers-color-scheme: dark) {
	.agntchat-root[data-dark="auto"] .agntchat-panel,
	.agntchat-root[data-dark="auto"] .agntchat-greet { background: var(--ac-bg-dark); }
	.agntchat-root[data-dark="auto"] .agntchat-bubble-assistant { background: var(--ac-bot-bubble-dark); color: var(--ac-bot-text-dark); }
	.agntchat-root[data-dark="auto"] .agntchat-greet,
	.agntchat-root[data-dark="auto"] .agntchat-gdpr,
	.agntchat-root[data-dark="auto"] .agntchat-powered { color: var(--ac-bot-text-dark); }
	.agntchat-root[data-dark="auto"] .agntchat-input { background: var(--ac-input-bg-dark); color: var(--ac-bot-text-dark); }
}

/* =========================================================================
   MOBILE
   ========================================================================= */
@media (max-width: 540px) {
	.agntchat-root[data-fs-mobile="1"] .agntchat-panel.agntchat-visible {
		position: fixed; inset: 0;
		width: 100vw; height: 100dvh; max-height: 100dvh; max-width: 100vw;
		border-radius: 0;
	}
	/* The launcher (now an ✕) would sit on top of the input/send area in
	   fullscreen — hide it while open; the header's − button closes the chat. */
	.agntchat-root[data-fs-mobile="1"] .agntchat-launcher.agntchat-launcher-open { display: none; }
}

/* =========================================================================
   INLINE MODE ([agent_chat inline="true"])
   ========================================================================= */
.agntchat-inline { position: relative; z-index: 1; width: 100%; }
.agntchat-inline .agntchat-panel { position: relative; inset: auto; width: 100%; max-width: 100%; max-height: none; opacity: 1; pointer-events: auto; transform: none; }

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
.agntchat-root[data-reduced="1"] *, .agntchat-root[data-reduced="1"] *::after { animation: none !important; transition: opacity .2s ease !important; }
