.___widget,
.___widget *,
.___widget *::before,
.___widget *::after {
	box-sizing: border-box;
}

.___widget {
	background-color: #3cbccc;
	font-family: sans-serif;
	max-width: 600px;
	margin: 0 auto;
	border: 1px solid #ccc;
	border-radius: 16px;
	overflow: hidden;
}

.___widget__header {
	background-color: #ecc474;
	padding: 10px;
}

.___widget__title {
	font-weight: 700;
	font-size: 18px;
}

.___widget__description {
	font: 14px;
}

.___widget__list {
	display: grid;
	gap: 10px;
	background-color: #284c58;
	padding: 10px;
	max-height: 600px;
	overflow-y: auto;
	scroll-behavior: smooth;
	min-height: 100px;
	position: relative;
}

.___widget__list:empty::after {
	content: 'Сообщений нет';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
}

.___widget__msg {
	padding: 5px;
}

.___widget__msg--ai {
	background: #749e9c;
	color: #fff;
}

.___widget__msg--user {
	background: #acd1d3;
	color: #000;
}

.___widget__msgHeader {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 5px;
}

.___widget__msg--user .___widget__msgHeader {
	flex-direction: row-reverse;
}

.___widget__msg--user .___widget__msgText {
	justify-self: flex-end;
}

.___widget__form {
	position: sticky;
	bottom: 0;
	width: 100%;
}

.___widget__input {
	display: block;
	width: 100%;
	padding: 0 60px 0 10px;
	border: none;
	height: 50px;
	outline: none;
	font-size: 16px;
}

.___widget__btn {
	position: absolute;
	right: 0;
	top: 0;
	height: 100%;
	width: 50px;
	background: none;
	padding: 0;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.___widget--waitingForAnswer .___widget__btn {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' class='svg-loader' viewBox='0 0 80 80'%3E%3Cpath fill='currentColor' d='M10 40v-3.2c0-.3.1-.6.1-.9.1-.6.1-1.4.2-2.1.2-.8.3-1.6.5-2.5.2-.9.6-1.8.8-2.8.3-1 .8-1.9 1.2-3 .5-1 1.1-2 1.7-3.1.7-1 1.4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rotate'/%3E%3C/path%3E%3Cpath fill='currentColor' d='M62 40.1s0 .2-.1.7c0 .2 0 .5-.1.8v.5c0 .2-.1.4-.1.7-.1.5-.2 1-.3 1.6-.2.5-.3 1.1-.5 1.8-.2.6-.5 1.3-.7 1.9-.3.7-.7 1.3-1 2.1-.4.7-.9 1.4-1.4 2.1-.5.7-1.1 1.4-1.7 2-1.2 1.3-2.7 2.5-4.4 3.6-1.7 1-3.6 1.8-5.5 2.4-2 .5-4 .7-6.2.7-1.9-.1-4.1-.4-6-1.1-1.9-.7-3.7-1.5-5.2-2.6s-2.9-2.3-4-3.7c-.6-.6-1-1.4-1.5-2-.4-.7-.8-1.4-1.2-2-.3-.7-.6-1.3-.8-2l-.6-1.8c-.1-.6-.3-1.1-.4-1.6-.1-.5-.1-1-.2-1.4-.1-.9-.1-1.5-.1-2v-.7s0 .2.1.7c.1.5 0 1.1.2 2 .1.4.2.9.3 1.4.1.5.3 1 .5 1.6.2.6.4 1.1.7 1.8.3.6.6 1.2.9 1.9.4.6.8 1.3 1.2 1.9.5.6 1 1.3 1.6 1.8 1.1 1.2 2.5 2.3 4 3.2 1.5.9 3.2 1.6 5 2.1 1.8.5 3.6.6 5.6.6 1.8-.1 3.7-.4 5.4-1 1.7-.6 3.3-1.4 4.7-2.4 1.4-1 2.6-2.1 3.6-3.3.5-.6.9-1.2 1.3-1.8.4-.6.7-1.2 1-1.8.3-.6.6-1.2.8-1.8.2-.6.4-1.1.5-1.7l.3-1.5c.1-.4.1-.8.1-1.2 0-.2 0-.4.1-.5v-2c0-1.1.9-2 2-2s2 .9 2 2c.1-.1.1 0 .1 0z'%3E%3CanimateTransform attributeName='transform' attributeType='xml' dur='0.6s' from='0 40 40' repeatCount='indefinite' to='-360 40 40' type='rotate'/%3E%3C/path%3E%3C/svg%3E");
}

.___widget--waitingForAnswer .___widget__btn svg {
	visibility: hidden;
}

.___widget--waitingForHistory .___widget__list {
	background-position: center center;
	background-repeat: no-repeat;
	background-image: url("data:image/svg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.1 0 .1 0z'%3E%3CanimateTransform attributeName='transform' attributeType='xml' dur='0.6s' from='0 40 40' repeatCount='indefinite' to='-360 40 40' type='rotate'/%3E%3C/path%3E%3C/svg%3E");
}

.___widget--waitingAI {
	animation: waitingAnimation 1s infinite;
}

@keyframes waitingAnimation {
	50% {
		opacity: .75;
	}
}