/* Lead Capture Chat — frontend */

.lcc-root {
	--lcc-pad: 18px;
	position: fixed;
	z-index: 10050;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	font-family: inherit;
	color: var(--lcc-text, #fff);
	pointer-events: none;
}

.lcc-root[data-side="left"],
.lcc-root {
	right: calc(18px + env(safe-area-inset-right, 0px));
	left: auto;
}

.lcc-root[style*="--lcc-side:left"],
.lcc-root.lcc-left {
	right: auto;
	left: calc(18px + env(safe-area-inset-left, 0px));
}

.lcc-root > *,
.lcc-launcher,
.lcc-panel,
.lcc-panel__close,
.lcc-send,
.lcc-pill {
	pointer-events: auto;
}

.lcc-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0 18px 0 6px;
	border: 0;
	border-radius: 999px;
	background: var(--lcc-accent, #8AB4F8);
	color: #0b0e13;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.lcc-launcher__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(11, 14, 19, 0.12);
}

.lcc-icon-close {
	position: absolute;
	opacity: 0;
	transform: scale(0.7);
}

.lcc-root.is-open .lcc-icon-chat {
	opacity: 0;
	transform: scale(0.7);
}

.lcc-root.is-open .lcc-icon-close {
	opacity: 1;
	transform: none;
}

.lcc-icon-chat,
.lcc-icon-close {
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.lcc-launcher__label {
	padding-right: 6px;
}

.lcc-panel {
	position: absolute;
	bottom: 64px;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(380px, calc(100vw - 28px));
	height: min(560px, calc(100vh - 120px));
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 18px;
	background: var(--lcc-bg, #0B0E13);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
	transform-origin: bottom right;
}

.lcc-root.lcc-left .lcc-panel {
	right: auto;
	left: 0;
	transform-origin: bottom left;
}

.lcc-panel[hidden] {
	display: none !important;
}

.lcc-root.is-open .lcc-panel {
	display: flex !important;
}

.lcc-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 16px var(--lcc-pad) 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(138, 180, 248, 0.08), transparent);
}

.lcc-panel__kicker {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.lcc-panel__status {
	margin: 0;
	color: var(--lcc-muted, #C8D0DA);
	font-size: 12px;
}

.lcc-panel__close {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	color: inherit;
	cursor: pointer;
}

.lcc-thread {
	flex: 1;
	overflow: auto;
	padding: 16px var(--lcc-pad) 8px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lcc-msg {
	max-width: 86%;
	padding: 10px 12px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.lcc-msg--bot {
	align-self: flex-start;
	background: rgba(255, 255, 255, 0.07);
	color: var(--lcc-text, #fff);
	border-bottom-left-radius: 4px;
}

.lcc-msg--user {
	align-self: flex-end;
	background: var(--lcc-accent, #8AB4F8);
	color: #0b0e13;
	border-bottom-right-radius: 4px;
}

.lcc-typing {
	display: inline-flex;
	gap: 5px;
	padding: 12px 14px;
}

.lcc-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--lcc-muted, #C8D0DA);
	animation: lcc-bounce 1.1s infinite;
}

.lcc-typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.lcc-typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes lcc-bounce {
	0%,
	80%,
	100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

.lcc-form {
	padding: 8px var(--lcc-pad) 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lcc-hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.lcc-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
}

.lcc-pill {
	margin: 0;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: transparent;
	color: var(--lcc-text, #fff);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
}

.lcc-pill:hover,
.lcc-pill.is-on {
	border-color: var(--lcc-accent, #8AB4F8);
	background: var(--lcc-accent, #8AB4F8);
	color: #0b0e13;
}

.lcc-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 6px 6px 6px 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.04);
}

.lcc-composer textarea {
	flex: 1;
	max-height: 96px;
	margin: 0;
	padding: 8px 0;
	border: 0;
	background: transparent;
	color: var(--lcc-text, #fff);
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	resize: none;
}

.lcc-composer textarea:focus {
	outline: none;
}

.lcc-composer textarea::placeholder {
	color: var(--lcc-muted, #C8D0DA);
	opacity: 0.8;
}

.lcc-send {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--lcc-accent, #8AB4F8);
	color: #0b0e13;
	cursor: pointer;
}

.lcc-send:disabled {
	opacity: 0.45;
	cursor: default;
}

.lcc-consent {
	margin: 8px 2px 0;
	color: var(--lcc-muted, #C8D0DA);
	font-size: 11px;
	line-height: 1.4;
}

.lcc-form.is-pills .lcc-composer {
	display: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

@media (max-width: 480px) {
	.lcc-launcher__label {
		display: none;
	}

	.lcc-launcher {
		padding: 0;
		border-radius: 50%;
	}

	.lcc-panel {
		bottom: 58px;
		height: min(72vh, 560px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lcc-typing span,
	.lcc-icon-chat,
	.lcc-icon-close {
		animation: none;
		transition: none;
	}
}
