.rs-chat {
	--rsc-ink: #103d3d;
	--rsc-ink-soft: #3f6262;
	--rsc-teal: #0f7f91;
	--rsc-teal-dark: #083e46;
	--rsc-green: #71bf4f;
	--rsc-mint: #f1faf7;
	--rsc-border: rgba(8, 69, 84, 0.14);
	--rsc-shadow: 0 24px 70px rgba(8, 69, 84, 0.22);
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--rsc-ink);
}

.rs-chat-launcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--rsc-teal);
	color: #fff;
	font: inherit;
	font-weight: 600;
	box-shadow: var(--rsc-shadow);
	cursor: pointer;
}
.rs-chat-launcher:hover { background: var(--rsc-teal-dark); }
.rs-chat-launcher:focus-visible,
.rs-chat-close:focus-visible,
.rs-chat-send:focus-visible { outline: 3px solid var(--rsc-green); outline-offset: 2px; }
.rs-chat.is-open .rs-chat-launcher { display: none; }

.rs-chat-panel {
	display: flex;
	flex-direction: column;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 40px);
	background: #fff;
	border: 1px solid var(--rsc-border);
	border-radius: 16px;
	box-shadow: var(--rsc-shadow);
	overflow: hidden;
}
.rs-chat-panel[hidden] { display: none; }

.rs-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--rsc-teal);
	color: #fff;
}
.rs-chat-title { font-weight: 700; }
.rs-chat-subtitle { font-size: 12px; opacity: 0.85; }
.rs-chat-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 6px;
}

.rs-chat-disclaimer {
	margin: 0;
	padding: 8px 16px;
	font-size: 12px;
	color: var(--rsc-ink-soft);
	background: var(--rsc-mint);
	border-bottom: 1px solid var(--rsc-border);
}

.rs-chat-log {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fbfaf5;
}

.rs-chat-msg {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 14px;
	white-space: normal;
	overflow-wrap: anywhere;
}
.rs-chat-assistant {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--rsc-border);
	border-bottom-left-radius: 4px;
}
.rs-chat-user {
	align-self: flex-end;
	background: var(--rsc-teal);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.rs-chat-user a { color: #fff; }
.rs-chat-assistant a { color: var(--rsc-teal); }
.rs-chat-typing { color: var(--rsc-ink-soft); font-style: italic; }

.rs-chat-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid var(--rsc-border);
	background: #fff;
}
.rs-chat-input {
	flex: 1;
	resize: none;
	border: 1px solid var(--rsc-border);
	border-radius: 10px;
	padding: 9px 11px;
	font: inherit;
	color: var(--rsc-ink);
	min-height: 40px;
	max-height: 120px;
}
.rs-chat-input:focus { outline: 2px solid var(--rsc-teal); outline-offset: 0; }
.rs-chat-send {
	width: 42px;
	border: 0;
	border-radius: 10px;
	background: var(--rsc-teal);
	color: #fff;
	font-size: 16px;
	cursor: pointer;
}
.rs-chat-send:disabled { opacity: 0.5; cursor: default; }
.rs-chat-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.rs-chat-footer {
	padding: 6px 12px 10px;
	font-size: 12px;
	text-align: center;
	color: var(--rsc-ink-soft);
	background: #fff;
}
.rs-chat-footer a { color: var(--rsc-teal); }

@media (max-width: 480px) {
	.rs-chat { left: 12px; bottom: 12px; }
	.rs-chat.is-open { right: 12px; top: 12px; }
	.rs-chat-panel { width: 100%; height: 100%; max-height: none; }
	.rs-chat-launcher-label { display: none; }
	.rs-chat-launcher { padding: 14px; font-size: 20px; }
}
