.replyan-ai {
	--replyan-ai-primary: #2563eb;
	--replyan-ai-surface: #ffffff;
	--replyan-ai-border: #d9e1ec;
	--replyan-ai-text: #111827;
	--replyan-ai-muted: #6b7280;
	--replyan-ai-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
	color: var(--replyan-ai-text);
	font-family: inherit;
	z-index: 99999;
}

.replyan-ai * {
	box-sizing: border-box;
}

.replyan-ai-floating {
	bottom: 24px;
	position: fixed;
}

.replyan-ai-bottom-right {
	right: 24px;
}

.replyan-ai-bottom-left {
	left: 24px;
}

.replyan-ai-toggle {
	align-items: center;
	background: var(--replyan-ai-primary);
	border: 0;
	border-radius: 999px;
	box-shadow: var(--replyan-ai-shadow);
	color: #ffffff;
	cursor: pointer;
	display: flex;
	font: inherit;
	height: 58px;
	justify-content: center;
	margin: 0;
	padding: 0;
	width: 58px;
}

.replyan-ai-toggle:hover,
.replyan-ai-toggle:focus {
	color: #ffffff;
	filter: brightness(0.92);
	outline: 3px solid rgba(37, 99, 235, 0.22);
	outline-offset: 3px;
}

.replyan-ai-toggle-icon {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1;
}

.replyan-ai-panel {
	background: var(--replyan-ai-surface);
	border: 1px solid var(--replyan-ai-border);
	border-radius: 8px;
	box-shadow: var(--replyan-ai-shadow);
	display: flex;
	flex-direction: column;
	height: min(620px, calc(100vh - 112px));
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	transform: translateY(12px);
	transition: opacity 160ms ease, transform 160ms ease;
	width: min(380px, calc(100vw - 32px));
}

.replyan-ai-bottom-right .replyan-ai-panel {
	bottom: 74px;
	right: 0;
}

.replyan-ai-bottom-left .replyan-ai-panel {
	bottom: 74px;
	left: 0;
}

.replyan-ai.is-open .replyan-ai-panel,
.replyan-ai-inline .replyan-ai-panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.replyan-ai-header {
	align-items: center;
	background: var(--replyan-ai-primary);
	color: #ffffff;
	display: flex;
	justify-content: space-between;
	min-height: 64px;
	padding: 14px 16px;
}

.replyan-ai-header strong,
.replyan-ai-header span {
	display: block;
	letter-spacing: 0;
	line-height: 1.25;
}

.replyan-ai-header strong {
	font-size: 16px;
	font-weight: 700;
}

.replyan-ai-header span {
	font-size: 12px;
	opacity: 0.85;
}

.replyan-ai-close {
	align-items: center;
	background: rgba(255, 255, 255, 0.16);
	border: 0;
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	font: 26px/1 Arial, sans-serif;
	height: 34px;
	justify-content: center;
	margin: 0 0 0 12px;
	padding: 0;
	width: 34px;
}

.replyan-ai-close:hover,
.replyan-ai-close:focus {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
	outline: 2px solid rgba(255, 255, 255, 0.6);
	outline-offset: 2px;
}

.replyan-ai-messages {
	background: #f8fafc;
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	padding: 16px;
}

.replyan-ai-message {
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
	max-width: 86%;
	overflow-wrap: anywhere;
	padding: 10px 12px;
	white-space: pre-wrap;
}

.replyan-ai-message-assistant {
	align-self: flex-start;
	background: #ffffff;
	border: 1px solid var(--replyan-ai-border);
	color: var(--replyan-ai-text);
}

.replyan-ai-message-user {
	align-self: flex-end;
	background: var(--replyan-ai-primary);
	color: #ffffff;
}

.replyan-ai-message-error {
	align-self: center;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 13px;
	max-width: 100%;
}

.replyan-ai-form {
	align-items: flex-end;
	background: #ffffff;
	border-top: 1px solid var(--replyan-ai-border);
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 12px;
}

.replyan-ai-input {
	background: #ffffff;
	border: 1px solid var(--replyan-ai-border);
	border-radius: 8px;
	color: var(--replyan-ai-text);
	flex: 1;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	margin: 0;
	max-height: 120px;
	min-height: 44px;
	padding: 11px 12px;
	resize: none;
	width: 100%;
}

.replyan-ai-input:focus {
	border-color: var(--replyan-ai-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
	outline: none;
}

.replyan-ai-send {
	background: var(--replyan-ai-primary);
	border: 0;
	border-radius: 8px;
	color: #ffffff;
	cursor: pointer;
	flex: 0 0 auto;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	height: 44px;
	line-height: 1;
	margin: 0;
	padding: 0 16px;
}

.replyan-ai-send:hover,
.replyan-ai-send:focus {
	color: #ffffff;
	filter: brightness(0.92);
	outline: 3px solid rgba(37, 99, 235, 0.18);
	outline-offset: 2px;
}

.replyan-ai-send:disabled,
.replyan-ai-input:disabled {
	cursor: wait;
	opacity: 0.68;
}

.replyan-ai-inline {
	margin: 24px 0;
	max-width: 760px;
	position: relative;
	z-index: 1;
}

.replyan-ai-inline .replyan-ai-toggle {
	display: none;
}

.replyan-ai-inline .replyan-ai-panel {
	height: 560px;
	max-width: 100%;
	position: relative;
	width: 100%;
}

@media (max-width: 640px) {
	.replyan-ai-floating {
		bottom: 16px;
	}

	.replyan-ai-bottom-right {
		right: 16px;
	}

	.replyan-ai-bottom-left {
		left: 16px;
	}

	.replyan-ai-panel {
		height: min(560px, calc(100vh - 96px));
		width: calc(100vw - 32px);
	}

	.replyan-ai-form {
		gap: 8px;
		padding: 10px;
	}

	.replyan-ai-send {
		padding: 0 12px;
	}
}
