.cleo-chat-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	opacity: 0;
	pointer-events: none;
	transform: translateY(18px);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.cleo-chat-widget.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.cleo-chat-widget__panel {
	width: min(360px, calc(100vw - 24px));
	border: 1px solid rgba(34, 54, 108, 0.12);
	border-radius: 26px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 241, 0.98) 100%);
	box-shadow: 0 24px 54px rgba(34, 54, 108, 0.18);
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.cleo-chat-widget.is-open .cleo-chat-widget__panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.cleo-chat-widget__panel-inner {
	padding: 18px 18px 16px;
}

.cleo-chat-widget__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.cleo-chat-widget__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.cleo-chat-widget__brand img {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #efb93f;
	box-shadow: 0 8px 16px rgba(239, 185, 63, 0.24);
	flex: 0 0 auto;
}

.cleo-chat-widget__brand-text {
	min-width: 0;
}

.cleo-chat-widget__brand-text strong {
	display: block;
	color: #22366c;
	font-size: 1rem;
	line-height: 1.1;
}

.cleo-chat-widget__brand-text span {
	display: block;
	margin-top: 3px;
	color: #6a7896;
	font-size: 0.84rem;
}

.cleo-chat-widget__close {
	border: 0;
	background: transparent;
	color: #7a859d;
	cursor: pointer;
	font-size: 1.6rem;
	line-height: 1;
	padding: 0;
}

.cleo-chat-widget__message {
	color: #4d5f82;
	font-size: 0.98rem;
	line-height: 1.7;
	margin: 0 0 14px;
}

.cleo-chat-widget__schedule {
	display: grid;
	gap: 10px;
	margin: 0;
}

.cleo-chat-widget__market-link {
	display: block;
	padding: 12px 14px;
	border: 1px solid rgba(239, 185, 63, 0.34);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.76);
	color: #22366c;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(34, 54, 108, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cleo-chat-widget__market-link:hover,
.cleo-chat-widget__market-link:focus-visible {
	transform: translateY(-1px);
	border-color: rgba(239, 185, 63, 0.64);
	box-shadow: 0 14px 26px rgba(34, 54, 108, 0.09);
	outline: none;
}

.cleo-chat-widget__market-link strong {
	display: block;
	font-size: 0.92rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.cleo-chat-widget__market-link span {
	display: block;
	margin-top: 4px;
	font-size: 1rem;
}

.cleo-chat-widget.is-visible:not(.is-open) .cleo-chat-widget__toggle {
	animation: cleo-chat-widget-float 3.2s ease-in-out infinite;
}

.cleo-chat-widget.is-visible:not(.is-open) .cleo-chat-widget__toggle::before {
	content: "";
	position: absolute;
	inset: -8px;
	border-radius: 999px;
	background: radial-gradient(circle, rgba(255, 212, 102, 0.22) 0%, rgba(255, 212, 102, 0.08) 48%, rgba(255, 212, 102, 0) 72%);
	animation: cleo-chat-widget-pulse 2.4s ease-out infinite;
	pointer-events: none;
}

.cleo-chat-widget__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #ffd466 0%, #efb93f 100%);
	box-shadow: 0 18px 34px rgba(239, 185, 63, 0.34);
	cursor: pointer;
	padding: 0;
}

.cleo-chat-widget__toggle img {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #efb93f;
}

.cleo-chat-widget__toggle:hover,
.cleo-chat-widget__toggle:focus-visible {
	transform: translateY(-2px);
	outline: none;
}

.cleo-chat-widget.is-open .cleo-chat-widget__toggle,
.cleo-chat-widget.is-open .cleo-chat-widget__toggle::before {
	animation: none;
}

@keyframes cleo-chat-widget-float {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}

	35% {
		transform: translateY(-4px) scale(1.02);
	}

	70% {
		transform: translateY(0) scale(1);
	}
}

@keyframes cleo-chat-widget-pulse {
	0% {
		opacity: 0;
		transform: scale(0.82);
	}

	20% {
		opacity: 0.7;
	}

	100% {
		opacity: 0;
		transform: scale(1.22);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cleo-chat-widget,
	.cleo-chat-widget__panel,
	.cleo-chat-widget__toggle,
	.cleo-chat-widget__toggle::before {
		animation: none !important;
		transition: none;
	}
}

@media (max-width: 767px) {
	.cleo-chat-widget {
		right: 12px;
		left: 12px;
		bottom: 12px;
		align-items: stretch;
	}

	.cleo-chat-widget__panel {
		width: 100%;
	}

	.cleo-chat-widget__toggle {
		align-self: flex-end;
		width: 62px;
		height: 62px;
	}

	.cleo-chat-widget__toggle img {
		width: 50px;
		height: 50px;
	}
}
