.ge-support-chat {
	--ge-chat-accent: #135e96;
	--ge-chat-bg: #ffffff;
	--ge-chat-muted: #64748b;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.ge-support-chat__launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--ge-chat-accent);
	color: #fff;
	box-shadow: 0 8px 24px rgba(19, 94, 150, 0.35);
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
}

.ge-support-chat__launcher-icon {
	display: inline-flex;
}

.ge-support-chat__panel[hidden],
.ge-support-chat__gate[hidden],
.ge-support-chat__thread[hidden],
.ge-support-chat__composer[hidden] {
	display: none !important;
}

.ge-support-chat__panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 12px);
	width: min(360px, calc(100vw - 32px));
	height: 520px;
	max-height: calc(100vh - 120px);
	background: var(--ge-chat-bg);
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.ge-support-chat__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 16px;
	background: var(--ge-chat-accent);
	color: #fff;
}

.ge-support-chat__header-main {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ge-support-chat__routing-status {
	display: inline-block;
	font-size: 11px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
}

.ge-support-presence-bar {
	margin: 0 0 12px;
	padding: 10px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	max-width: 720px;
}

.ge-support-chat__close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.ge-support-chat__gate,
.ge-support-chat__thread {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.ge-support-chat__gate {
	padding: 16px;
	overflow: auto;
}

.ge-support-chat__gate-heading {
	margin: 0 0 8px;
	font-size: 18px;
}

.ge-support-chat__gate-body {
	margin: 0 0 16px;
	color: var(--ge-chat-muted);
	font-size: 14px;
	line-height: 1.5;
}

.ge-support-chat__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 13px;
	font-weight: 600;
}

.ge-support-chat__field input {
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
}

.ge-support-chat__consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 8px 0 16px;
	font-size: 12px;
	color: var(--ge-chat-muted);
}

.ge-support-chat__error {
	color: #b91c1c;
	font-size: 13px;
}

.ge-support-chat__primary {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 10px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--ge-chat-accent);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.ge-support-chat__thread {
	padding: 0;
}

.ge-support-chat__messages {
	flex: 1;
	overflow: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f8fafc;
}

.ge-support-chat__bubble {
	max-width: 85%;
	padding: 10px 12px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	word-break: break-word;
}

.ge-support-chat__bubble--user {
	align-self: flex-end;
	background: var(--ge-chat-accent);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.ge-support-chat__bubble--agent,
.ge-support-chat__bubble--system,
.ge-support-chat__bubble--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-bottom-left-radius: 4px;
}

.ge-support-chat__bubble--bot {
	background: #eef6ff;
	border-color: #dbeafe;
}

.ge-support-chat__bubble-meta {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	opacity: 0.75;
}

.ge-support-chat__typing {
	margin: 0;
	padding: 0 16px 8px;
	font-size: 12px;
	color: var(--ge-chat-muted);
}

.ge-support-chat__composer {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
}

.ge-support-chat__composer textarea {
	flex: 1;
	resize: none;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
}

.ge-support-chat.is-open .ge-support-chat__launcher {
	box-shadow: 0 4px 16px rgba(19, 94, 150, 0.25);
}

@media (max-width: 480px) {
	.ge-support-chat {
		right: 12px;
		bottom: 12px;
	}

	.ge-support-chat__launcher-label {
		display: none;
	}

	.ge-support-chat__panel {
		width: calc(100vw - 24px);
	}
}
