#rlly-chatbot-root {
	--rlly-cb-primary: #014840;
	--rlly-cb-secondary: #f25831;
	--rlly-cb-radius: 14px;
	--rlly-cb-font: inherit;
	font-family: var(--rlly-cb-font, inherit);
}

#rlly-chatbot-root * {
	box-sizing: border-box;
}

.rlly-cb-launcher {
	position: fixed;
	bottom: 22px;
	right: 22px;
	z-index: 99998;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--rlly-cb-primary);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
.rlly-cb-launcher:hover {
	transform: scale(1.06);
}
#rlly-chatbot-root.rlly-cb-pos-bottom-left .rlly-cb-launcher,
#rlly-chatbot-root.rlly-cb-pos-bottom-left .rlly-cb-panel,
#rlly-chatbot-root.rlly-cb-pos-bottom-left .rlly-cb-teaser {
	right: auto;
	left: 22px;
}

.rlly-cb-teaser {
	position: fixed;
	bottom: 96px;
	right: 22px;
	z-index: 99997;
	width: 270px;
	max-width: calc(100vw - 44px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	padding: 16px 16px 14px 32px;
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.rlly-cb-teaser.rlly-cb-teaser-visible {
	opacity: 1;
	transform: translateY(0);
}
.rlly-cb-teaser.rlly-cb-teaser-has-avatar {
	padding-right: 46px;
}
.rlly-cb-teaser-name {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 4px;
}
.rlly-cb-teaser-text {
	font-size: 14px;
	line-height: 1.4;
	color: #1a1a1a;
}
.rlly-cb-teaser-close {
	position: absolute;
	top: 6px;
	left: 8px;
	background: transparent;
	border: none;
	color: #999;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
	z-index: 1;
}
.rlly-cb-teaser-close:hover {
	color: #333;
}
.rlly-cb-teaser-avatar {
	position: absolute;
	top: -14px;
	right: 14px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rlly-cb-launcher svg {
	width: 26px;
	height: 26px;
}

.rlly-cb-launcher-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.rlly-cb-head-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.rlly-cb-head-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rlly-cb-panel {
	position: fixed;
	bottom: 96px;
	right: 22px;
	z-index: 99999;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: var(--rlly-cb-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
.rlly-cb-panel.rlly-cb-open {
	display: flex;
}
#rlly-chatbot-root[data-inline="1"] .rlly-cb-panel {
	position: static;
	display: flex;
	width: 100%;
	max-width: 480px;
	height: 560px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
#rlly-chatbot-root[data-inline="1"] .rlly-cb-launcher {
	display: none;
}

.rlly-cb-head {
	background: var(--rlly-cb-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.rlly-cb-head-title-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.rlly-cb-head h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.rlly-cb-head button {
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 4px;
	opacity: 0.85;
}
.rlly-cb-head button:hover {
	opacity: 1;
}

.rlly-cb-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f7f5;
}

.rlly-cb-msg {
	max-width: 84%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.rlly-cb-msg-bot {
	background: #fff;
	color: #1a1a1a;
	align-self: flex-start;
	border: 1px solid #e6e6e2;
	border-bottom-left-radius: 3px;
}
.rlly-cb-msg-user {
	background: var(--rlly-cb-primary);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 3px;
}
.rlly-cb-msg-error {
	background: #fdecea;
	color: #7a1f14;
	align-self: flex-start;
	border: 1px solid #f3c3bd;
}
.rlly-cb-msg-thinking {
	background: #fff;
	color: #888;
	align-self: flex-start;
	border: 1px solid #e6e6e2;
	font-style: italic;
}

.rlly-cb-msg-cta {
	background: transparent;
	border: none;
	padding: 0;
	align-self: flex-start;
	max-width: 100%;
}
.rlly-cb-menu-cta {
	display: inline-block;
	background: var(--rlly-cb-secondary);
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 16px;
	border-radius: 10px;
}

.rlly-cb-menu {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.rlly-cb-menu-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.rlly-cb-menu-btn {
	background: #fff;
	border: 1px solid #d8d5cf;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	text-align: left;
	color: var(--rlly-cb-primary);
	cursor: pointer;
	font-family: inherit;
}
.rlly-cb-menu-btn:hover {
	border-color: var(--rlly-cb-primary);
	background: #f7f7f5;
}
.rlly-cb-menu-back {
	align-self: flex-start;
	background: transparent;
	border: none;
	color: #888;
	font-size: 13px;
	cursor: pointer;
	padding: 2px 0 4px;
	font-family: inherit;
}
.rlly-cb-menu-back:hover {
	color: var(--rlly-cb-primary);
}

.rlly-cb-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #ece9e4;
	flex-shrink: 0;
	background: #fff;
}
.rlly-cb-form.rlly-cb-form-hidden {
	display: none;
}
.rlly-cb-form textarea {
	flex: 1;
	resize: none;
	border: 1px solid #d8d5cf;
	border-radius: 10px;
	padding: 9px 11px;
	font-size: 14px;
	font-family: inherit;
	max-height: 90px;
}
.rlly-cb-form textarea:focus {
	outline: 2px solid var(--rlly-cb-secondary);
	outline-offset: 1px;
}
.rlly-cb-form button {
	background: var(--rlly-cb-secondary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 0 16px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}
.rlly-cb-form button:disabled {
	opacity: 0.5;
	cursor: default;
}
