.inncha-ai {
	--inncha-primary: #2563eb;
	--inncha-bg: #ffffff;
	--inncha-text: #1f2937;
	--inncha-muted: #6b7280;
	--inncha-border: #e5e7eb;
	--inncha-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

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

/* Floating widget */
.inncha-ai--bottom-right,
.inncha-ai--bottom-left {
	position: fixed;
	bottom: 24px;
	z-index: 99999;
}

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

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

/* Inline embed */
.inncha-ai--inline {
	position: relative;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}

.inncha-ai--inline .inncha-ai__panel {
	position: relative;
	width: 100%;
	height: 500px;
	border-radius: 12px;
	box-shadow: var(--inncha-shadow);
}

.inncha-ai--inline .inncha-ai__toggle {
	display: none;
}

/* Toggle button */
.inncha-ai__toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--inncha-primary);
	color: #fff;
	cursor: pointer;
	box-shadow: var(--inncha-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, background 0.2s;
}

.inncha-ai__toggle:hover {
	transform: scale(1.05);
}

.inncha-ai__toggle svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.inncha-ai__toggle--hidden {
	display: none;
}

/* Chat panel */
.inncha-ai__panel {
	display: none;
	flex-direction: column;
	width: 380px;
	height: 520px;
	background: var(--inncha-bg);
	border-radius: 16px;
	box-shadow: var(--inncha-shadow);
	overflow: hidden;
	border: 1px solid var(--inncha-border);
}

.inncha-ai__panel--open {
	display: flex;
}

.inncha-ai--bottom-right .inncha-ai__panel,
.inncha-ai--bottom-left .inncha-ai__panel {
	position: absolute;
	bottom: 68px;
}

.inncha-ai--bottom-right .inncha-ai__panel {
	right: 0;
}

.inncha-ai--bottom-left .inncha-ai__panel {
	left: 0;
}

/* Header */
.inncha-ai__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	background: var(--inncha-primary);
	color: #fff;
}

.inncha-ai__title {
	font-weight: 600;
	font-size: 15px;
}

.inncha-ai__close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 4px;
	opacity: 0.85;
	line-height: 0;
}

.inncha-ai__close:hover {
	opacity: 1;
}

.inncha-ai__close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Messages */
.inncha-ai__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.inncha-ai__message {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 12px;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.inncha-ai__message--user {
	align-self: flex-end;
	background: var(--inncha-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.inncha-ai__message--assistant {
	align-self: flex-start;
	background: #f3f4f6;
	color: var(--inncha-text);
	border-bottom-left-radius: 4px;
}

.inncha-ai__message--typing {
	color: var(--inncha-muted);
	font-style: italic;
}

/* Input area */
.inncha-ai__input-area {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--inncha-border);
	background: #fafafa;
}

.inncha-ai__input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--inncha-border);
	border-radius: 24px;
	font-size: 14px;
	outline: none;
	font-family: inherit;
	resize: none;
	max-height: 100px;
}

.inncha-ai__input:focus {
	border-color: var(--inncha-primary);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.inncha-ai__send {
	padding: 10px 18px;
	border: none;
	border-radius: 24px;
	background: var(--inncha-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
}

.inncha-ai__send:hover:not(:disabled) {
	opacity: 0.9;
}

.inncha-ai__send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.inncha-ai__panel {
		width: calc(100vw - 32px);
		height: calc(100vh - 120px);
		max-height: 520px;
	}

	.inncha-ai--bottom-right .inncha-ai__panel,
	.inncha-ai--bottom-left .inncha-ai__panel {
		right: -8px;
		left: -8px;
		width: calc(100vw - 32px);
	}
}
