.apv-agente {
	--apv-color: #2563eb;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.apv-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	background: var(--apv-color);
	color: #fff;
	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;
	margin-left: auto;
}

.apv-launcher:hover {
	transform: scale(1.06);
}

.apv-panel {
	width: 360px;
	max-width: calc(100vw - 40px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin-bottom: 14px;
}

.apv-header {
	background: var(--apv-color);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.apv-title {
	font-weight: 600;
	font-size: 15px;
}

.apv-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
}

.apv-close:hover {
	opacity: 1;
}

.apv-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.apv-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	word-wrap: break-word;
	white-space: normal;
}

.apv-bot {
	background: #fff;
	color: #1f2937;
	align-self: flex-start;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}

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

.apv-typing {
	display: flex;
	gap: 4px;
	align-items: center;
}

.apv-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9ca3af;
	display: inline-block;
	animation: apv-bounce 1.2s infinite ease-in-out;
}

.apv-typing span:nth-child(2) {
	animation-delay: 0.2s;
}

.apv-typing span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes apv-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-5px); opacity: 1; }
}

.apv-footer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.apv-input {
	flex: 1;
	resize: none;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	padding: 9px 11px;
	font-size: 14px;
	font-family: inherit;
	max-height: 120px;
	outline: none;
	line-height: 1.4;
}

.apv-input:focus {
	border-color: var(--apv-color);
}

.apv-send {
	background: var(--apv-color);
	color: #fff;
	border: none;
	border-radius: 10px;
	width: 42px;
	height: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

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

@media (max-width: 480px) {
	.apv-agente {
		right: 12px;
		bottom: 12px;
	}
	.apv-panel {
		height: calc(100vh - 100px);
	}
}
