/* Uniali Chat IA — widget */
#uca-root,
#uca-root * {
	box-sizing: border-box !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

#uca-root {
	position: fixed;
	bottom: 20px;
	z-index: 999990;
	line-height: 1.45;
}
#uca-root.uca-right { right: 20px; }
#uca-root.uca-left  { left: 20px; }

/* Botão flutuante */
#uca-root .uca-launcher {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 13px 20px 13px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--uca-color, #F26B21);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
	transition: transform .18s ease, box-shadow .18s ease;
}
#uca-root .uca-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .26); }
#uca-root .uca-launcher:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
#uca-root .uca-launcher-icon { display: flex; }
#uca-root.uca-open .uca-launcher { display: none; }

/* Painel */
#uca-root .uca-panel {
	display: flex;
	flex-direction: column;
	width: 372px;
	max-width: calc(100vw - 32px);
	height: 552px;
	max-height: calc(100vh - 110px);
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
	animation: uca-in .22s ease;
}
#uca-root .uca-panel[hidden] { display: none; }
@keyframes uca-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	#uca-root .uca-panel { animation: none; }
	#uca-root .uca-launcher { transition: none; }
}

#uca-root .uca-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--uca-color, #F26B21);
	color: #fff;
}
#uca-root .uca-head strong { display: block; font-size: 15px; }
#uca-root .uca-head span { font-size: 12px; opacity: .85; }
#uca-root .uca-close {
	background: none; border: 0; color: #fff;
	font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}

/* Log */
#uca-root .uca-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #fafafa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
#uca-root .uca-msg {
	max-width: 86%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14.5px;
	color: #1d1d1f;
	white-space: normal;
	word-wrap: break-word;
}
#uca-root .uca-bot  { align-self: flex-start; background: #fff; border: 1px solid #ececec; border-bottom-left-radius: 4px; }
#uca-root .uca-user { align-self: flex-end; background: var(--uca-color, #F26B21); color: #fff; border-bottom-right-radius: 4px; }
#uca-root .uca-msg a { color: inherit; text-decoration: underline; }
#uca-root .uca-bot a { color: var(--uca-color, #F26B21); font-weight: 600; }
#uca-root .uca-err { align-self: center; background: #fff3f3; border: 1px solid #f3c9c9; color: #8a1f1f; font-size: 13px; }

#uca-root .uca-typing { display: flex; gap: 4px; align-self: flex-start; padding: 14px; }
#uca-root .uca-typing i {
	width: 7px; height: 7px; border-radius: 50%;
	background: #c4c4c4; animation: uca-bounce 1.1s infinite;
}
#uca-root .uca-typing i:nth-child(2) { animation-delay: .15s; }
#uca-root .uca-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes uca-bounce { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }

/* Atalhos */
#uca-root .uca-quick {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 10px 12px 0;
	background: #fff;
}
#uca-root .uca-quick button {
	padding: 7px 12px;
	border: 1px solid #e2e2e2;
	border-radius: 999px;
	background: #fff;
	font-size: 12.5px;
	color: #444;
	cursor: pointer;
}
#uca-root .uca-quick button:hover { border-color: var(--uca-color, #F26B21); color: var(--uca-color, #F26B21); }
#uca-root .uca-quick.uca-hide { display: none; }

/* Entrada */
#uca-root .uca-form {
	display: flex; align-items: flex-end; gap: 8px;
	padding: 12px;
	background: #fff;
	border-top: 1px solid #f0f0f0;
}
#uca-root .uca-form textarea {
	flex: 1;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 14.5px;
	resize: none;
	max-height: 110px;
	background: #fff;
	color: #1d1d1f;
}
#uca-root .uca-form textarea:focus { outline: none; border-color: var(--uca-color, #F26B21); }
#uca-root .uca-send {
	width: 42px; height: 42px; flex: 0 0 42px;
	display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 12px;
	background: var(--uca-color, #F26B21); color: #fff; cursor: pointer;
}
#uca-root .uca-send[disabled] { opacity: .45; cursor: default; }

#uca-root .uca-foot {
	margin: 0; padding: 0 14px 12px;
	background: #fff;
	font-size: 11px; color: #9a9a9a; text-align: center;
}

@media (max-width: 480px) {
	#uca-root { bottom: 12px; right: 12px; left: 12px; }
	#uca-root .uca-launcher { margin-left: auto; }
	#uca-root .uca-launcher-label { display: none; }
	#uca-root .uca-launcher { padding: 15px; }
	#uca-root .uca-panel { width: 100%; height: calc(100vh - 90px); }
}
