/* ==========================================================================
   Evolutiva IA Chat Widget
   Dark theme · Primary #0066FF · Accent #00d4aa · BG #1a1a2e
   ========================================================================== */

.ev-ia-chat-fab {
	position: fixed;
	bottom: 90px; /* acima do botão de WhatsApp */
	right: 24px;
	z-index: 9998;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: #0066FF;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 102, 255, .35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s, box-shadow .2s;
}
.ev-ia-chat-fab:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 24px rgba(0, 102, 255, .5);
}
.ev-ia-chat-fab svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}
.ev-ia-chat-fab[aria-expanded="true"] {
	display: none;
}

/* ── Painel ──────────────────────────────────────────────────────────────── */

.ev-ia-chat-panel {
	position: fixed;
	bottom: 90px;
	right: 24px;
	z-index: 9999;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 120px);
	border-radius: 16px;
	overflow: hidden;
	display: none;
	flex-direction: column;
	background: #1a1a2e;
	border: 1px solid rgba(0, 102, 255, .25);
	box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.ev-ia-chat-panel.is-open {
	display: flex;
}

/* Header */
.ev-ia-chat-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #0066FF 0%, #0044bb 100%);
	color: #fff;
	flex-shrink: 0;
}
.ev-ia-chat-header__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,.15);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ev-ia-chat-header__avatar svg {
	width: 20px;
	height: 20px;
	fill: #fff;
}
.ev-ia-chat-header__info {
	flex: 1;
	min-width: 0;
}
.ev-ia-chat-header__name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
}
.ev-ia-chat-header__status {
	font-size: 12px;
	opacity: .8;
	display: flex;
	align-items: center;
	gap: 5px;
}
.ev-ia-chat-header__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #00d4aa;
	display: inline-block;
}
.ev-ia-chat-close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	transition: background .15s;
}
.ev-ia-chat-close:hover {
	background: rgba(255,255,255,.15);
}
.ev-ia-chat-close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Messages */
.ev-ia-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,.15) transparent;
}
.ev-ia-chat-messages::-webkit-scrollbar {
	width: 5px;
}
.ev-ia-chat-messages::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,.15);
	border-radius: 3px;
}

.ev-ia-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.5;
	word-wrap: break-word;
	white-space: pre-wrap;
}
.ev-ia-msg--bot {
	align-self: flex-start;
	background: #16213e;
	color: #e0e0e0;
	border-bottom-left-radius: 4px;
}
.ev-ia-msg--user {
	align-self: flex-end;
	background: #0066FF;
	color: #fff;
	border-bottom-right-radius: 4px;
}
.ev-ia-msg--typing {
	align-self: flex-start;
	background: #16213e;
	color: #888;
	font-style: italic;
	border-bottom-left-radius: 4px;
}

/* Input area */
.ev-ia-chat-input-area {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: #0f0f23;
	border-top: 1px solid rgba(255,255,255,.08);
	flex-shrink: 0;
}
.ev-ia-chat-input {
	flex: 1;
	background: #1a1a2e;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 20px;
	padding: 10px 16px;
	color: #e0e0e0;
	font-size: 14px;
	outline: none;
	resize: none;
	max-height: 80px;
	line-height: 1.4;
	font-family: inherit;
}
.ev-ia-chat-input::placeholder {
	color: #666;
}
.ev-ia-chat-input:focus {
	border-color: #0066FF;
}
.ev-ia-chat-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: #0066FF;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .15s, transform .1s;
}
.ev-ia-chat-send:hover {
	background: #0055dd;
}
.ev-ia-chat-send:active {
	transform: scale(.94);
}
.ev-ia-chat-send:disabled {
	opacity: .4;
	cursor: not-allowed;
}
.ev-ia-chat-send svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Powered by */
.ev-ia-chat-footer {
	text-align: center;
	padding: 6px;
	font-size: 10px;
	color: #444;
	background: #0f0f23;
}
.ev-ia-chat-footer span {
	color: #00d4aa;
}

/* Mobile */
@media (max-width: 480px) {
	.ev-ia-chat-panel {
		bottom: 0;
		right: 0;
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}
	.ev-ia-chat-fab {
		bottom: 80px;
		right: 16px;
	}
}
