/* ==========================================================================
   Visual Fachadas Voltagem — Chat por Fluxo (Decisão) Styling
   ========================================================================== */

.vf-flow-chat-widget {
	position: fixed;
	bottom: 30px;
	left: 30px;
	z-index: 99999;
	font-family: var(--wp--preset--font-family--montserrat), system-ui, -apple-system, sans-serif;
}

/* 1. Toggle Button */
.vf-flow-chat-toggle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--wp--preset--color--amber, #FFB300);
	color: #111827;
	border: none;
	cursor: pointer;
	box-shadow: 0 8px 32px rgba(255, 179, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vf-flow-chat-toggle:hover {
	transform: scale(1.08) rotate(-5deg);
	background: var(--wp--preset--color--amber-dark, #FFA000);
	box-shadow: 0 12px 40px rgba(255, 179, 0, 0.6);
}

.vf-flow-chat-toggle svg {
	width: 28px;
	height: 28px;
}

/* 2. Chat Box */
.vf-flow-chat-box {
	position: absolute;
	bottom: 80px;
	left: 0;
	width: 380px;
	height: 520px;
	background: rgba(17, 24, 39, 0.9);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 179, 0, 0.2);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
	transform-origin: bottom left;
}

.vf-flow-chat-box.is-active {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Inline Mode (used in shortcode) */
.vf-flow-chat-box.is-inline {
	position: relative;
	bottom: auto;
	left: auto;
	width: 100%;
	max-width: 600px;
	height: 500px;
	opacity: 1;
	transform: none;
	pointer-events: auto;
	margin: 20px auto;
	border-color: rgba(255, 179, 0, 0.3);
}

/* 3. Header */
.vf-flow-chat-header {
	background: linear-gradient(135deg, var(--wp--preset--color--surface-light, #1A2332), rgba(17, 24, 39, 0.95));
	padding: 15px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 179, 0, 0.15);
}

.vf-flow-chat-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vf-flow-chat-avatar {
	font-size: 24px;
	background: rgba(255, 179, 0, 0.15);
	padding: 6px;
	border-radius: 50%;
	border: 1px solid rgba(255, 179, 0, 0.3);
}

.vf-flow-chat-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #ffffff;
}

.vf-flow-chat-status {
	font-size: 11px;
	color: #25D366;
	display: flex;
	align-items: center;
	gap: 4px;
}

.vf-flow-chat-status::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	background-color: #25D366;
	border-radius: 50%;
	animation: vf-flow-pulse 1.5s infinite;
}

.vf-flow-chat-close {
	background: none;
	border: none;
	color: #9CA3AF;
	font-size: 24px;
	cursor: pointer;
	transition: color 0.2s;
}

.vf-flow-chat-close:hover {
	color: #ffffff;
}

/* 4. Messages Container */
.vf-flow-chat-messages {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 15px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 179, 0, 0.2) transparent;
}

.vf-flow-chat-messages::-webkit-scrollbar {
	width: 6px;
}

.vf-flow-chat-messages::-webkit-scrollbar-thumb {
	background: rgba(255, 179, 0, 0.2);
	border-radius: 3px;
}

/* 5. Message Bubbles */
.vf-flow-chat-msg {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.5;
	word-wrap: break-word;
	animation: vf-flow-fade-in 0.3s ease forwards;
}

.vf-flow-chat-msg.is-bot {
	align-self: flex-start;
	background: #1F2937;
	color: #F3F4F6;
	border-bottom-left-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.vf-flow-chat-msg.is-user {
	align-self: flex-end;
	background: var(--wp--preset--color--amber, #FFB300);
	color: #111827;
	border-bottom-right-radius: 4px;
	font-weight: 500;
}

/* 6. Choice Options */
.vf-flow-chat-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
	width: 100%;
}

.vf-flow-chat-btn {
	background: transparent;
	color: var(--wp--preset--color--amber, #FFB300);
	border: 1px solid var(--wp--preset--color--amber, #FFB300);
	padding: 10px 14px;
	border-radius: 20px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	text-align: left;
	transition: all 0.2s ease;
	width: 100%;
}

.vf-flow-chat-btn:hover:not(:disabled) {
	background: var(--wp--preset--color--amber, #FFB300);
	color: #111827;
	transform: translateX(4px);
}

.vf-flow-chat-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 7. Keyframes */
@keyframes vf-flow-pulse {
	0% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
	}
	70% {
		transform: scale(1);
		box-shadow: 0 0 0 5px rgba(37, 211, 102, 0);
	}
	100% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
	}
}

@keyframes vf-flow-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
