#g4n-chatbot-root {
	position: fixed;
	z-index: 999999;
	bottom: 20px;
	right: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.g4n-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--g4n-accent, #e63946);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
.g4n-bubble:hover {
	transform: scale(1.06);
}
.g4n-bubble svg {
	width: 28px;
	height: 28px;
}

.g4n-window {
	position: fixed;
	bottom: 92px;
	right: 20px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.g4n-window.g4n-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.g4n-header {
	background: var(--g4n-accent, #e63946);
	color: #fff;
	padding: 14px 16px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.g4n-header button {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.85;
}
.g4n-header button:hover {
	opacity: 1;
}

.g4n-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f7f8;
}

.g4n-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.g4n-msg.g4n-bot {
	background: #fff;
	border: 1px solid #e6e6e8;
	color: #222;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
.g4n-msg.g4n-user {
	background: var(--g4n-accent, #e63946);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}
.g4n-msg.g4n-typing {
	background: #fff;
	border: 1px solid #e6e6e8;
	align-self: flex-start;
	color: #999;
	font-style: italic;
}

.g4n-inputbar {
	display: flex;
	border-top: 1px solid #eee;
	padding: 10px;
	gap: 8px;
	background: #fff;
}
.g4n-inputbar input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 14px;
	outline: none;
}
.g4n-inputbar input:focus {
	border-color: var(--g4n-accent, #e63946);
}
.g4n-inputbar button {
	background: var(--g4n-accent, #e63946);
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 0 16px;
	font-size: 14px;
	cursor: pointer;
	font-weight: 600;
}
.g4n-inputbar button:disabled {
	opacity: 0.5;
	cursor: default;
}

@media (max-width: 420px) {
	.g4n-window {
		right: 12px;
		bottom: 84px;
		width: calc(100vw - 24px);
	}
	#g4n-chatbot-root {
		right: 12px;
		bottom: 12px;
	}
}
