.aw-ai-chat {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 9998;
	font-family: var(--aw-font, system-ui, sans-serif);
	color: var(--aw-text, #e9f4f9);
}

.aw-ai-chat *,
.aw-ai-chat *::before,
.aw-ai-chat *::after {
	box-sizing: border-box;
}

.aw-ai-chat__launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 54px;
	padding: 0 20px;
	border: 1px solid rgba(46, 230, 200, 0.48);
	border-radius: 999px;
	background: linear-gradient(120deg, #2ee6c8, #23c9d6 58%, #2a9fe8);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
	color: #032b27;
	font: 700 14px/1 var(--aw-font, system-ui, sans-serif);
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.aw-ai-chat__launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
}

.aw-ai-chat__launcher:focus-visible,
.aw-ai-chat button:focus-visible,
.aw-ai-chat textarea:focus-visible,
.aw-ai-chat input:focus-visible,
.aw-ai-chat a:focus-visible {
	outline: 3px solid #f5c451;
	outline-offset: 3px;
}

.aw-ai-chat__launcher-icon {
	font-size: 20px;
}

.aw-ai-chat__panel {
	position: absolute;
	right: 0;
	bottom: 68px;
	display: flex;
	flex-direction: column;
	width: min(390px, calc(100vw - 28px));
	max-height: min(690px, calc(100vh - 112px));
	overflow: hidden;
	border: 1px solid rgba(125, 210, 225, 0.28);
	border-radius: 20px;
	background: #081a29;
	box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.aw-ai-chat__panel[hidden] {
	display: none;
}

.aw-ai-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 17px 18px;
	border-bottom: 1px solid rgba(125, 190, 210, 0.16);
	background: #0a2133;
}

.aw-ai-chat__eyebrow {
	margin: 0 0 4px;
	color: #2ee6c8;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.aw-ai-chat__header h2 {
	margin: 0;
	color: #e9f4f9;
	font: 700 19px/1.2 var(--aw-display, var(--aw-font, system-ui, sans-serif));
}

.aw-ai-chat__close {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border: 1px solid rgba(125, 190, 210, 0.24);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	color: #e9f4f9;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.aw-ai-chat__disclosure {
	padding: 12px 16px 10px;
	border-bottom: 1px solid rgba(125, 190, 210, 0.14);
	color: #b6cbd5;
	font-size: 12px;
	line-height: 1.5;
}

.aw-ai-chat__disclosure p {
	margin: 0 0 7px;
}

.aw-ai-chat__disclosure p:last-of-type {
	margin-bottom: 9px;
}

.aw-ai-chat__disclosure a,
.aw-ai-chat__fallback a {
	color: #2ee6c8;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aw-ai-chat__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: #e9f4f9;
	cursor: pointer;
}

.aw-ai-chat__consent input {
	flex: 0 0 auto;
	margin: 2px 0 0;
	accent-color: #2ee6c8;
}

.aw-ai-chat__messages {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	min-height: 120px;
	max-height: 275px;
	overflow-y: auto;
	padding: 15px;
}

.aw-ai-chat__message {
	max-width: 88%;
	padding: 10px 12px;
	border: 1px solid rgba(125, 190, 210, 0.16);
	border-radius: 14px 14px 14px 4px;
	background: #0d2434;
	color: #e9f4f9;
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.aw-ai-chat__message--user {
	align-self: flex-end;
	border-color: rgba(46, 230, 200, 0.22);
	border-radius: 14px 14px 4px 14px;
	background: rgba(46, 230, 200, 0.12);
}

.aw-ai-chat__message.is-status {
	color: #94adbb;
	font-style: italic;
}

.aw-ai-chat__form {
	padding: 12px 14px 10px;
	border-top: 1px solid rgba(125, 190, 210, 0.14);
}

.aw-ai-chat__form textarea {
	display: block;
	width: 100%;
	min-height: 56px;
	max-height: 120px;
	resize: vertical;
	padding: 11px 12px;
	border: 1px solid rgba(125, 190, 210, 0.25);
	border-radius: 12px;
	background: #04090f;
	color: #e9f4f9;
	font: 14px/1.45 var(--aw-font, system-ui, sans-serif);
}

.aw-ai-chat__form textarea::placeholder {
	color: #8299a6;
}

.aw-ai-chat__form-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 9px;
}

.aw-ai-chat__hint {
	color: #94adbb;
	font-size: 11px;
}

.aw-ai-chat__send {
	min-height: 38px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: #2ee6c8;
	color: #032b27;
	font: 700 13px/1 var(--aw-font, system-ui, sans-serif);
	cursor: pointer;
}

.aw-ai-chat__send:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.aw-ai-chat__fallback {
	margin: 0;
	padding: 0 15px 13px;
	color: #94adbb;
	font-size: 12px;
}

@media (max-width: 520px) {
	.aw-ai-chat {
		right: 12px;
		bottom: 12px;
	}

	.aw-ai-chat__launcher {
		min-height: 49px;
		padding: 0 16px;
		font-size: 13px;
	}

	.aw-ai-chat__panel {
		right: -2px;
		bottom: 60px;
		width: min(390px, calc(100vw - 20px));
		max-height: calc(100dvh - 82px);
	}

	.aw-ai-chat__messages {
		max-height: min(34vh, 250px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.aw-ai-chat *,
	.aw-ai-chat *::before,
	.aw-ai-chat *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
