#dca-chat-root, #dca-chat-root * {
	box-sizing: border-box;
}

#dca-chat-bubble {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--dca-color, #1a56ff);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0,0,0,0.25);
	z-index: 999999;
	transition: transform .15s ease;
	border: none;
}
#dca-chat-bubble:hover {
	transform: scale(1.06);
}
#dca-chat-bubble svg {
	width: 28px;
	height: 28px;
}

#dca-chat-window {
	position: fixed;
	bottom: 96px;
	right: 24px;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
#dca-chat-window.dca-open {
	display: flex;
}

#dca-chat-header {
	background: var(--dca-color, #1a56ff);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#dca-chat-header .dca-title {
	font-weight: 600;
	font-size: 15px;
}
#dca-chat-header .dca-sub {
	font-size: 11px;
	opacity: .85;
}
#dca-chat-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}

#dca-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f5f6f8;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dca-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.dca-msg-user {
	align-self: flex-end;
	background: var(--dca-color, #1a56ff);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.dca-msg-assistant {
	align-self: flex-start;
	background: #fff;
	color: #222;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}
.dca-msg-typing {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e5e7eb;
	padding: 10px 14px;
	border-radius: 14px;
}
.dca-typing-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #999;
	margin: 0 2px;
	animation: dca-blink 1.2s infinite;
}
.dca-typing-dot:nth-child(2) { animation-delay: .2s; }
.dca-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dca-blink {
	0%, 80%, 100% { opacity: .3; }
	40% { opacity: 1; }
}

#dca-chat-form {
	display: flex;
	border-top: 1px solid #e5e7eb;
	padding: 10px;
	gap: 8px;
	background: #fff;
}
#dca-chat-input {
	flex: 1;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 13.5px;
	resize: none;
	max-height: 80px;
	font-family: inherit;
}
#dca-chat-input:focus {
	outline: none;
	border-color: var(--dca-color, #1a56ff);
}
#dca-chat-send {
	background: var(--dca-color, #1a56ff);
	border: none;
	color: #fff;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
#dca-chat-send:disabled {
	opacity: .5;
	cursor: default;
}
#dca-chat-send svg {
	width: 17px;
	height: 17px;
}

#dca-chat-footer-note {
	font-size: 10px;
	color: #9aa0a6;
	text-align: center;
	padding: 4px 0 8px;
	background: #fff;
}

@media (max-width: 480px) {
	#dca-chat-window {
		right: 16px;
		bottom: 88px;
		width: calc(100vw - 32px);
	}
	#dca-chat-bubble {
		right: 16px;
		bottom: 16px;
	}
}
