#wp-aichat-root {
	box-sizing: border-box;
	font-family: var(--aichat-font-family, inherit);
	font-size: var(--aichat-font-size, 14px);
	line-height: 1.45;
	z-index: 99999;
}
#wp-aichat-root,
#wp-aichat-root *,
#wp-aichat-root *::before,
#wp-aichat-root *::after {
	box-sizing: border-box;
	letter-spacing: 0;
	text-transform: none;
}
#wp-aichat-root button,
#wp-aichat-root textarea,
#wp-aichat-root input,
#wp-aichat-root select {
	font: inherit;
}
#wp-aichat-root button {
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	text-decoration: none;
}
#wp-aichat-root svg,
#wp-aichat-root img {
	display: block;
	max-width: none;
}
#wp-aichat-root.wp-aichat-floating {
	height: 58px;
	position: fixed;
	transition: height .2s ease, width .2s ease;
	width: 58px;
}
#wp-aichat-root.wp-aichat-floating.is-open {
	height: min(calc(100vh - 48px), var(--aichat-height));
	width: min(calc(100vw - 48px), var(--aichat-width));
}
#wp-aichat-root.wp-aichat-inline { position: relative; width: min(100%, var(--aichat-width)); }
#wp-aichat-bubble {
	-webkit-appearance: none;
	appearance: none;
	align-items: center !important;
	background: var(--aichat-bubble) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: 0 10px 30px rgba(0,0,0,.18);
	color: #fff !important;
	cursor: pointer;
	display: flex !important;
	height: 58px !important;
	justify-content: center !important;
	line-height: 0 !important;
	margin: 0 !important;
	min-height: 58px !important;
	min-width: 58px !important;
	outline: 0;
	padding: 0 !important;
	position: absolute;
	right: 0;
	bottom: 0;
	text-align: center !important;
	width: 58px !important;
	transition: opacity .12s ease, transform .2s ease, visibility .12s ease;
	z-index: 2;
}
#wp-aichat-root.is-open #wp-aichat-bubble {
	opacity: 0;
	pointer-events: none;
	transform: scale(1.16);
	visibility: hidden;
}
#wp-aichat-root.wp-aichat-pos-bottom-left #wp-aichat-bubble { left: 0; right: auto; }
#wp-aichat-root.wp-aichat-pos-bottom-center #wp-aichat-bubble { left: 50%; right: auto; transform: translateX(-50%); }
#wp-aichat-root.wp-aichat-pos-bottom-center.is-open #wp-aichat-bubble { transform: translateX(-50%) scale(1.16); }
#wp-aichat-bubble svg, #wp-aichat-send svg, .aichat-close svg { display: block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
#wp-aichat-bubble svg { height: 28px !important; margin: 0 !important; stroke-width: 1.8; transform: translate(2px, 0); width: 28px !important; }
#wp-aichat-send svg, .aichat-close svg { width: 24px; height: 24px; stroke-width: 1.8; }
#wp-aichat-bubble img { width: 30px; height: 30px; object-fit: contain; }
#wp-aichat-window {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: var(--aichat-window-bg);
	border: 1px solid rgba(0,0,0,.12);
	border-radius: var(--aichat-radius);
	box-shadow: var(--aichat-shadow);
	color: #111;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transform: scale(.18);
	transform-origin: right bottom;
	pointer-events: none;
	transition: opacity .18s ease, transform .22s ease;
}
#wp-aichat-root.wp-aichat-pos-bottom-left #wp-aichat-window { left: 0; right: auto; transform-origin: left bottom; }
#wp-aichat-root.wp-aichat-pos-bottom-center #wp-aichat-window { left: 0; right: auto; transform: scale(.18); transform-origin: center bottom; }
#wp-aichat-root.wp-aichat-inline #wp-aichat-window { position: relative; right: auto; bottom: auto; width: 100%; opacity: 1; transform: none; pointer-events: auto; }
#wp-aichat-root.is-open #wp-aichat-window { opacity: 1; transform: translateY(0); pointer-events: auto; }
#wp-aichat-root.wp-aichat-pos-bottom-center.is-open #wp-aichat-window { transform: scale(1); }
#wp-aichat-header {
	min-height: 58px;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--aichat-header-bg);
	color: var(--aichat-header-text);
	font-family: var(--aichat-font-family, inherit);
	font-size: var(--aichat-font-size, 14px);
	line-height: 1.3;
}
.aichat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.28); flex: 0 0 auto; }
.aichat-avatar-fallback { align-items: center; display: inline-flex; justify-content: center; }
.aichat-avatar-fallback::after { content: ""; display: block; width: 13px; height: 13px; border: 1.8px solid currentColor; border-radius: 50%; }
.aichat-botname { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aichat-close, #wp-aichat-send {
	-webkit-appearance: none;
	appearance: none;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	cursor: pointer;
	display: grid;
	place-items: center;
	line-height: 1;
	margin: 0;
	min-height: 0;
	min-width: 0;
	outline: 0;
	padding: 0;
	text-decoration: none !important;
}
.aichat-close {
	align-items: center !important;
	background: transparent !important;
	border-radius: 8px !important;
	display: flex !important;
	flex: 0 0 40px !important;
	height: 40px !important;
	justify-content: center !important;
	min-height: 40px !important;
	min-width: 40px !important;
	position: static !important;
	transform: none !important;
	width: 40px !important;
}
.aichat-close::before,
.aichat-close::after {
	content: none !important;
	display: none !important;
}
.aichat-close:hover { background: rgba(255,255,255,.12) !important; }
#wp-aichat-messages { background: transparent; flex: 1; font-family: var(--aichat-font-family, inherit); font-size: var(--aichat-font-size, 14px); line-height: 1.55; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.aichat-message { box-shadow: none; margin: 0; max-width: 84%; padding: 10px 12px; border-radius: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.aichat-message.user { align-self: flex-end; background: var(--aichat-user-bg); color: var(--aichat-user-text); border-bottom-right-radius: 4px; }
.aichat-message.model { align-self: flex-start; background: var(--aichat-bot-bg); color: var(--aichat-bot-text); border-bottom-left-radius: 4px; }
.aichat-message.error { align-self: stretch; max-width: 100%; background: #fff1f1; color: #8a1f1f; border: 1px solid #ffd1d1; }
.aichat-typing { display: inline-flex; gap: 4px; align-items: center; }
.aichat-typing span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: aichatTyping 1s infinite ease-in-out; }
.aichat-typing span:nth-child(2) { animation-delay: .15s; }
.aichat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aichatTyping { 50% { opacity: 1; transform: translateY(-2px); } }
.aichat-powered-by { border-top: 1px solid rgba(0,0,0,.08); color: rgba(17,17,17,.56); font-size: 11px; line-height: 1.3; padding: 6px 12px; text-align: center; }
#wp-aichat-input-area { align-items: flex-end; background: var(--aichat-window-bg); display: flex; gap: 10px; margin: 0; padding: 12px; border-top: 1px solid rgba(0,0,0,.1); }
#wp-aichat-input {
	-webkit-appearance: none;
	appearance: none;
	background: #fff !important;
	box-shadow: none;
	color: #111 !important;
	display: block;
	flex: 1 1 auto;
	font-family: var(--aichat-font-family, inherit) !important;
	font-size: var(--aichat-font-size, 14px) !important;
	font-weight: 400;
	line-height: 20px !important;
	margin: 0 !important;
	max-height: 112px;
	min-height: 48px;
	min-width: 0;
	padding: 13px 12px !important;
	resize: none;
	width: auto;
	border: 1px solid rgba(0,0,0,.18) !important;
	border-radius: 8px !important;
	outline: none;
}
#wp-aichat-input:focus { border-color: #111; box-shadow: 0 0 0 2px rgba(17,17,17,.12); }
#wp-aichat-send { background: var(--aichat-bubble) !important; border-radius: 8px !important; color: #fff !important; flex: 0 0 48px; height: 48px !important; width: 48px !important; }
#wp-aichat-send svg { transform: translateX(1px); }
#wp-aichat-send:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 480px) {
	#wp-aichat-root.wp-aichat-floating {
		bottom: 16px !important;
		height: 56px;
		left: auto !important;
		right: 16px !important;
		transform: none !important;
		width: 56px;
	}
	#wp-aichat-root.wp-aichat-floating.wp-aichat-pos-bottom-left:not(.is-open) { left: 16px !important; right: auto !important; }
	#wp-aichat-root.wp-aichat-floating.wp-aichat-pos-bottom-center:not(.is-open) { left: 50% !important; right: auto !important; transform: translateX(-50%) !important; }
	#wp-aichat-root.wp-aichat-floating.is-open {
		bottom: 12px !important;
		height: min(620px, calc(100vh - 24px));
		left: 12px !important;
		right: 12px !important;
		transform: none !important;
		width: auto;
	}
	#wp-aichat-root.wp-aichat-floating #wp-aichat-bubble { height: 56px !important; min-height: 56px !important; min-width: 56px !important; width: 56px !important; }
	#wp-aichat-root.wp-aichat-floating #wp-aichat-bubble svg { height: 27px !important; width: 27px !important; }
	#wp-aichat-window {
		bottom: 0;
		height: 100%;
		max-height: calc(100vh - 24px);
		width: 100%;
	}
	#wp-aichat-header { min-height: 64px; padding: 12px; }
	#wp-aichat-input-area { gap: 8px; padding: 10px; }
	#wp-aichat-input { min-height: 46px; padding: 12px 10px !important; }
	#wp-aichat-send { flex-basis: 46px; height: 46px !important; width: 46px !important; }
	.aichat-close { flex-basis: 38px !important; height: 38px !important; min-height: 38px !important; min-width: 38px !important; width: 38px !important; }
}
@media (min-width: 481px) and (max-width: 782px) {
	#wp-aichat-root.wp-aichat-floating:not(.is-open) { bottom: 88px !important; }
}
