/* Root variables */
:root {
	--primary-blue: #0A1128; /* Azul Escuro Dominante */
	--secondary-teal: #007EA7; /* Verde Azulado para detalhes */
	--accent-orange: #F5A623; /* Laranja vibrante para destaque */
	--light-bg: #EAF2F8; /* Fundo claro geral */
	--dark-text: #2C3E50; /* Texto escuro padrão */
	--light-text: #ECF0F1; /* Texto claro */
	--user-bubble: #007EA7; /* Bolha do usuário */
	--bot-bubble: #FFFFFF; /* Bolha do bot */
	--border-color: #BCCCDC; /* Cor de borda mais suave */
	--success-color: #2ECC71; /* Verde de sucesso */
	--error-color: #E74C3C; /* Vermelho de erro */
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Montserrat', sans-serif;
}


body {
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	min-height: 100vh;
	padding: 0;
	margin: 0;
	color: var(--dark-text);
	overflow-x: hidden;
}

/* Hero section for agency background */
.hero {
	width: 100%;
	height: 100vh;
	background: url('fundo.png') center/cover no-repeat;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: #ffffff;
	text-shadow: 0 2px 6px rgba(0,0,0,0.7);
	position: relative;
	z-index: 0;
}
.hero h1 {
	font-size: 3rem;
	margin-bottom: 10px;
}
.hero p {
	font-size: 1.2rem;
}



/* Chat widget flutuante */
.chat-container {
	position: fixed;
	bottom: 90px;
	right: 30px;
	width: 350px;
	height: 500px;
	background: var(--bot-bubble);
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--border-color);
	transform: scale(0.5) translateY(100%);
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	z-index: 1000;
}

.chat-container.open {
	transform: scale(1) translateY(0);
	opacity: 1;
	pointer-events: auto;
}



.chat-header {
	background: linear-gradient(to right, var(--primary-blue), var(--secondary-teal));
	color: var(--light-text);
	padding: 16px 15px;
	text-align: center;
	position: relative;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	border-bottom: 2px solid var(--accent-orange);
	border-radius: 20px 20px 0 0;
}

.chat-header h2 {
	font-family: 'Montserrat', sans-serif;
	font-size: 1.5rem;
	margin-bottom: 3px;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.chat-header h2 svg {
	margin-right: 10px;
	color: var(--accent-orange);
}


.status-container {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 8px;
	font-size: 0.85rem;
}


.status-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 8px;
	background-color: #4cc9a4;
}



.chat-messages {
	flex: 1;
	padding: 15px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background-color: var(--light-bg);
	border-bottom: 1px solid var(--border-color);
}


.message {
	max-width: 85%;
	padding: 10px 15px;
	border-radius: 18px;
	line-height: 1.5;
	position: relative;
	animation: slideIn 0.4s ease-out;
	font-size: 0.9rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Garantir que as quebras de linha sejam exibidas corretamente */
.message .message-text {
	white-space: pre-line; /* Preserva quebras de linha */
}

@keyframes slideIn {
	from { opacity: 0; transform: translateY(15px); }
	to { opacity: 1; transform: translateY(0); }
}


.user-message {
	align-self: flex-end;
	background-color: var(--user-bubble);
	color: var(--light-text);
	border-bottom-right-radius: 8px;
}

.bot-message {
	align-self: flex-start;
	background-color: var(--bot-bubble);
	color: var(--dark-text);
	border: 1px solid var(--border-color);
	border-bottom-left-radius: 8px;
	font-family: 'Montserrat', sans-serif;
}

/* Ajuste para dar espaço para listas dentro das mensagens */
.bot-message ul {
	margin-left: 20px;
	margin-top: 8px;
	margin-bottom: 8px;
}

.bot-message li {
	margin-bottom: 5px;
}

.bot-message.initial-message {
	background-color: var(--light-bg);
	border: none;
	color: var(--primary-blue);
	font-weight: 600;
	text-align: center;
	align-self: center;
	border-radius: 10px;
	box-shadow: none;
	padding: 10px 15px;
	font-size: 1rem;
}


.timestamp {
	font-size: 0.7rem;
	color: #8C9BAB;
	margin-top: 6px;
	text-align: right;
	opacity: 0.9;
}

.user-message .timestamp {
	color: rgba(255, 255, 255, 0.7);
}



.chat-input-container {
	padding: 15px;
	background: var(--bot-bubble);
	border-top: 1px solid var(--border-color);
}


.chat-input-form {
	display: flex;
	gap: 12px;
	align-items: center;
}


.chat-input {
	flex: 1;
	padding: 12px 18px;
	border: 1px solid var(--border-color);
	border-radius: 24px;
	outline: none;
	font-size: 0.95rem;
	transition: all 0.3s ease;
	background-color: var(--light-bg);
	color: var(--dark-text);
	box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-input:focus {
	border-color: var(--secondary-teal);
	box-shadow: 0 0 0 3px rgba(0, 126, 167, 0.15);
	background-color: white;
}

.chat-input::placeholder {
	color: #9BAAB8;
	font-style: italic;
}


.send-button {
	background: linear-gradient(to right, var(--secondary-teal), #00A8E8);
	color: white;
	border: none;
	border-radius: 50%;
	width: 45px;
	height: 45px;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 126, 167, 0.3);
	flex-shrink: 0;
}

.send-button:hover {
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 8px 20px rgba(0, 126, 167, 0.4);
}

.send-button:active {
	transform: translateY(0) scale(0.98);
	box-shadow: 0 2px 5px rgba(0, 126, 167, 0.2);
}

.send-button:disabled {
	background: #cbd5e1;
	cursor: not-allowed;
	box-shadow: none;
}


.typing-indicator {
	display: flex;
	align-items: center;
	align-self: flex-start;
	background-color: var(--bot-bubble);
	padding: 12px 18px;
	border-radius: 18px;
	margin-bottom: 8px;
	color: var(--dark-text);
	border: 1px solid var(--border-color);
	border-bottom-left-radius: 5px;
	opacity: 0;
	transition: opacity 0.3s ease;
	width: fit-content;
}

.typing-indicator span {
	margin-left: 8px;
	font-size: 0.9rem;
	color: var(--dark-text);
}

.typing-indicator.active {
	opacity: 1;
}

.typing-dots {
	display: flex;
	gap: 6px;
	align-items: center;
}

.typing-dot {
	width: 10px;
	height: 10px;
	background-color: var(--secondary-teal);
	border-radius: 50%;
	animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
	0%, 60%, 100% { transform: translateY(0); opacity: 1; }
	30% { transform: translateY(-7px); opacity: 0.5; }
}


.connection-info {
	background-color: #E6F7EF;
	border-left: 4px solid var(--success-color);
	padding: 15px 20px;
	border-radius: 10px;
	margin-top: 20px;
	font-size: 0.85rem;
	color: #0F5132;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-title {
	font-weight: 700;
	margin-bottom: 0;
	display: flex;
	align-items: center;
	color: var(--primary-blue);
}

.info-title svg {
	margin-right: 8px;
	color: var(--secondary-teal);
}

.connection-info p {
	margin: 0;
	font-family: 'Roboto Mono', monospace;
	font-size: 0.8rem;
	color: #3B5446;
}

.quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
	justify-content: center;
}

.quick-action-button {
	background-color: var(--light-bg);
	border: 1px solid var(--border-color);
	padding: 6px 12px;
	border-radius: 18px;
	font-size: 0.8rem;
	color: var(--dark-text);
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.quick-action-button:hover {
	background-color: var(--secondary-teal);
	color: var(--light-text);
	border-color: var(--secondary-teal);
	box-shadow: 0 3px 8px rgba(0, 126, 167, 0.2);
	transform: translateY(-2px);
}

/* Floating chat toggle button */
.chat-toggle-button {
	position: fixed;
	bottom: 20px;
	right: 30px;
	width: 65px;
	height: 65px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--secondary-teal), var(--primary-blue));
	border: none;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	z-index: 1001;
	transition: all 0.3s ease;
}

.chat-toggle-button:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.25);
	background: linear-gradient(135deg, var(--accent-orange), var(--secondary-teal));
}

.chat-toggle-button svg {
	width: 32px;
	height: 32px;
	color: white;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

@media (max-width: 600px) {
	.chat-container {
		width: 90vw;
		right: 5vw;
		height: 70vh;
		min-height: 300px;
		border-radius: 12px;
	}
	.chat-toggle-button {
		width: 50px;
		height: 50px;
		right: 20px;
		bottom: 20px;
	}
	.chat-toggle-button svg {
		width: 24px;
		height: 24px;
	}
}
