#rdcb-root {
	--rdcb-accent: #1f3a5f;
	position: fixed;
	bottom: 20px;
	z-index: 99998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: #1d2327;
}
#rdcb-root.rdcb-left { left: 20px; }
#rdcb-root.rdcb-right { right: 20px; }
#rdcb-root *, #rdcb-root *::before, #rdcb-root *::after { box-sizing: border-box; }

.rdcb-launcher {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 52px;
	padding: 0 20px 0 16px;
	border: 0;
	border-radius: 26px;
	background: var(--rdcb-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
.rdcb-launcher svg { width: 22px; height: 22px; flex: none; }
.rdcb-launcher:focus-visible, .rdcb-send:focus-visible, .rdcb-close:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }

.rdcb-panel {
	position: absolute;
	bottom: 66px;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 110px);
	display: none;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.rdcb-left .rdcb-panel { left: 0; }
.rdcb-right .rdcb-panel { right: 0; }
#rdcb-root.rdcb-open .rdcb-panel { display: flex; }

.rdcb-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--rdcb-accent);
	color: #fff;
}
.rdcb-title { font-weight: 700; }
.rdcb-sub { font-size: 12px; opacity: .85; }
.rdcb-sub a { color: #fff; }
.rdcb-close {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.rdcb-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f6f7f7;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.rdcb-msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 14px;
	white-space: normal;
	word-wrap: break-word;
}
.rdcb-msg p { margin: 0 0 .5em; }
.rdcb-msg p:last-child, .rdcb-msg ul:last-child { margin-bottom: 0; }
.rdcb-msg ul { margin: 0 0 .5em; padding-left: 1.2em; }
.rdcb-bot { align-self: flex-start; background: #fff; border: 1px solid #e2e4e7; border-bottom-left-radius: 4px; }
.rdcb-bot a { color: var(--rdcb-accent); text-decoration: underline; }
.rdcb-user { align-self: flex-end; background: var(--rdcb-accent); color: #fff; border-bottom-right-radius: 4px; }
.rdcb-error { align-self: flex-start; background: #fcf0f1; border: 1px solid #f1c4c8; color: #8a1f2b; }

.rdcb-typing { display: inline-flex; gap: 4px; }
.rdcb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8c8f94; animation: rdcb-bounce 1.2s infinite ease-in-out; }
.rdcb-typing span:nth-child(2) { animation-delay: .15s; }
.rdcb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rdcb-bounce { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.rdcb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rdcb-chip {
	padding: 6px 11px;
	border: 1px solid var(--rdcb-accent);
	border-radius: 16px;
	background: #fff;
	color: var(--rdcb-accent);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.rdcb-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e2e4e7; background: #fff; }
.rdcb-input {
	flex: 1;
	min-height: 42px;
	max-height: 110px;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 10px;
	font: inherit;
	resize: none;
}
.rdcb-input:focus { border-color: var(--rdcb-accent); outline: none; box-shadow: 0 0 0 2px rgba(0, 0, 0, .08); }
.rdcb-send {
	width: 44px;
	border: 0;
	border-radius: 10px;
	background: var(--rdcb-accent);
	color: #fff;
	cursor: pointer;
}
.rdcb-send:disabled { opacity: .5; cursor: default; }
.rdcb-send svg { width: 20px; height: 20px; }
.rdcb-foot { padding: 0 12px 8px; background: #fff; font-size: 11px; color: #646970; text-align: center; }

@media (max-width: 480px) {
	#rdcb-root.rdcb-left { left: 12px; }
	#rdcb-root.rdcb-right { right: 12px; }
	#rdcb-root { bottom: 12px; }
	.rdcb-launcher .rdcb-label { display: none; }
	.rdcb-launcher { width: 52px; padding: 0; justify-content: center; }
	.rdcb-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .rdcb-typing span { animation: none; } }
