.aiguide-chat {
	--aiguide-bg: #070b14;
	--aiguide-panel: #0d1524;
	--aiguide-border: rgba(0, 214, 232, 0.28);
	--aiguide-accent: #00d6e8;
	--aiguide-text: #e8f7fb;
	--aiguide-muted: #8aa3b5;
	--aiguide-user: #123047;
	--aiguide-bot: #101a2c;
	--aiguide-header: #07101c;
	--aiguide-overlay: rgba(7, 11, 20, 0.92);
	--aiguide-input-bg: #0a1422;
	--aiguide-on-accent: #042028;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: var(--aiguide-text);
	box-sizing: border-box;
}

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

.aiguide-chat--disabled {
	padding: 1rem;
	border: 1px dashed var(--aiguide-border);
	border-radius: 12px;
	color: var(--aiguide-muted);
	background: var(--aiguide-panel);
}

.aiguide-chat--embed .aiguide-panel {
	position: relative;
	width: 100%;
	max-width: 420px;
	height: 520px;
	border-radius: 16px;
}

.aiguide-chat--widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
}

.aiguide-launcher {
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: var(--aiguide-header);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--aiguide-border);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
}

.aiguide-launcher img {
	width: 100%;
	height: auto;
	display: block;
}

.aiguide-chat--widget .aiguide-panel {
	position: absolute;
	right: 0;
	bottom: 70px;
	width: min(380px, calc(100vw - 24px));
	height: min(540px, calc(100vh - 120px));
	display: none;
}

.aiguide-chat--widget.is-open .aiguide-panel {
	display: flex;
}

.aiguide-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, var(--aiguide-panel), var(--aiguide-bg));
	border: 1px solid var(--aiguide-border);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

.aiguide-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--aiguide-border);
	background: var(--aiguide-header);
}

.aiguide-header img {
	height: 28px;
	width: auto;
	max-width: 140px;
	object-fit: contain;
	cursor: help;
}

.aiguide-header-title {
	font-weight: 650;
	font-size: 14px;
	flex: 1;
}

.aiguide-account-btn {
	background: transparent;
	border: 1px solid var(--aiguide-border);
	color: var(--aiguide-text);
	border-radius: 8px;
	font-size: 11px;
	padding: 4px 8px;
	cursor: pointer;
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aiguide-credits {
	font-size: 11px;
	color: var(--aiguide-muted);
	padding: 4px 12px 0;
}

.aiguide-overlay {
	position: absolute;
	inset: 48px 0 0;
	background: var(--aiguide-overlay);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 16px;
	z-index: 5;
	overflow-y: auto;
}

.aiguide-overlay[hidden] {
	display: none !important;
}

.aiguide-auth {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aiguide-auth-title {
	font-weight: 700;
	font-size: 15px;
}

.aiguide-auth-msg {
	margin: 0;
	font-size: 13px;
	color: var(--aiguide-muted);
}

.aiguide-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: var(--aiguide-muted);
}

.aiguide-field input,
.aiguide-field input:focus,
.aiguide-field input:-webkit-autofill,
.aiguide-field input:-webkit-autofill:hover,
.aiguide-field input:-webkit-autofill:focus {
	border-radius: 8px;
	border: 1px solid var(--aiguide-border);
	background-color: #f4fbfd !important;
	color: #07101c !important;
	-webkit-text-fill-color: #07101c !important;
	caret-color: #07101c;
	box-shadow: 0 0 0 1000px #f4fbfd inset;
	padding: 8px;
	font: inherit;
	outline: none;
}

.aiguide-field input:focus {
	border-color: var(--aiguide-accent);
}

.aiguide-field input::placeholder {
	color: #5a7384;
	opacity: 1;
}

.aiguide-auth-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aiguide-auth-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 1.5em;
}

.aiguide-plan-btn {
	width: 100%;
	padding: 10px 14px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	line-height: 1.2;
}

.aiguide-plan-name {
	font-weight: 700;
}

.aiguide-plan-meta {
	font-size: 12px;
	font-weight: 600;
	opacity: 0.85;
}

.aiguide-send--ghost {
	background: transparent;
	color: var(--aiguide-text);
	border: 1px solid var(--aiguide-border);
}

.aiguide-header-close {
	background: transparent;
	border: 0;
	color: var(--aiguide-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.aiguide-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aiguide-bubble {
	max-width: 88%;
	padding: 8px 11px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.aiguide-bubble--user {
	align-self: flex-end;
	background: var(--aiguide-user);
	border: 1px solid var(--aiguide-border);
}

.aiguide-bubble--assistant {
	align-self: flex-start;
	background: var(--aiguide-bot);
	border: 1px solid var(--aiguide-border);
}

.aiguide-bubble--status {
	align-self: center;
	color: var(--aiguide-muted);
	font-size: 12px;
	background: transparent;
	border: 0;
	padding: 4px;
}

.aiguide-bubble--status.is-thinking {
	min-width: 12ch;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.aiguide-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid var(--aiguide-border);
	background: var(--aiguide-header);
}

.aiguide-form textarea {
	flex: 1;
	resize: none;
	min-height: 42px;
	max-height: 96px;
	border-radius: 10px;
	border: 1px solid var(--aiguide-border);
	background: var(--aiguide-input-bg);
	color: var(--aiguide-text);
	padding: 10px;
	font: inherit;
}

.aiguide-form textarea:focus {
	outline: 2px solid var(--aiguide-accent);
	outline-offset: 1px;
}

.aiguide-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.aiguide-send {
	border: 0;
	border-radius: 10px;
	background: var(--aiguide-accent);
	color: var(--aiguide-on-accent);
	font-weight: 700;
	padding: 0 14px;
	cursor: pointer;
}

.aiguide-send:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

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

	.aiguide-chat--embed .aiguide-panel {
		height: 70vh;
		max-width: 100%;
	}
}
