.pany-ai-root {
	position: fixed;
	right: 20px;
	bottom: 96px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pany-ai-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--pany-ai-primary, #333);
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.pany-ai-toggle:focus-visible {
	outline: 3px solid var(--pany-ai-accent, #fff);
	outline-offset: 2px;
}

.pany-ai-panel[hidden] {
	display: none;
}

.pany-ai-panel {
	position: fixed;
	right: 20px;
	bottom: 164px;
	width: 360px;
	max-width: calc(100vw - 40px);
	height: 480px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.pany-ai-header {
	background: var(--pany-ai-primary, #333);
	color: #fff;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}

.pany-ai-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.pany-ai-close:focus-visible,
.pany-ai-send:focus-visible,
.pany-ai-input:focus-visible {
	outline: 3px solid var(--pany-ai-accent, #333);
	outline-offset: 1px;
}

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

.pany-ai-msg {
	max-width: 85%;
	padding: 8px 12px;
	border-radius: 10px;
	line-height: 1.4;
	font-size: 14px;
	white-space: pre-wrap;
}

.pany-ai-msg-user {
	align-self: flex-end;
	background: var(--pany-ai-primary, #333);
	color: #fff;
}

.pany-ai-msg-assistant {
	align-self: flex-start;
	background: #f1f1f1;
	color: #222;
}

.pany-ai-typing {
	opacity: 0.6;
}

.pany-ai-consent {
	font-size: 11px;
	color: #666;
	padding: 0 12px;
	margin: 0 0 8px;
}

.pany-ai-form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #eee;
}

.pany-ai-input {
	flex: 1;
	resize: none;
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	max-height: 120px;
	min-height: 36px;
}

.pany-ai-send {
	background: var(--pany-ai-accent, #666);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 16px;
	font-size: 14px;
	cursor: pointer;
}

.pany-ai-send:disabled {
	opacity: 0.6;
	cursor: default;
}

@media (max-width: 600px) {
	.pany-ai-panel {
		right: 0;
		bottom: 0;
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}

	.pany-ai-toggle {
		right: 4px;
		bottom: 80px;
	}
}
