/* Flawless Beauty Chatbot — everything is scoped to #fbc-root so the theme can't leak in (or out). */

#fbc-root {
	--fbc-color: #217a83;
	--fbc-accent: #e2739b;
	--fbc-ink: #1f2a30;
	--fbc-muted: #66757b;
	--fbc-line: #e2e9eb;
	--fbc-bg: #f5f8f9;
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 2147483000;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--fbc-ink);
	-webkit-font-smoothing: antialiased;
}
#fbc-root.fbc-left {
	right: auto;
	left: 20px;
}
#fbc-root *,
#fbc-root *::before,
#fbc-root *::after {
	box-sizing: border-box;
}
#fbc-root [hidden] {
	display: none !important;
}

/* Shared button reset — themes often style every <button>. */
#fbc-root button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.3;
	min-width: 0;
	min-height: 0;
	width: auto;
	height: auto;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
#fbc-root button:focus-visible,
#fbc-root a:focus-visible,
#fbc-root textarea:focus-visible {
	outline: 2px solid var(--fbc-accent);
	outline-offset: 2px;
}
#fbc-root svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* ---------- launcher ---------- */

#fbc-root .fbc-launcher {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--fbc-color);
	color: #fff;
	box-shadow: 0 8px 24px rgba(20, 40, 50, 0.28);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	margin-left: auto;
}
#fbc-root.fbc-left .fbc-launcher {
	margin-left: 0;
}
#fbc-root .fbc-launcher:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 28px rgba(20, 40, 50, 0.32);
}
#fbc-root .fbc-launcher span {
	width: 28px;
	height: 28px;
}
#fbc-root .fbc-ico-close,
#fbc-root.fbc-open .fbc-ico-open {
	display: none;
}
#fbc-root.fbc-open .fbc-ico-close {
	display: block;
	width: 24px;
	height: 24px;
}

/* ---------- teaser bubble ---------- */

#fbc-root .fbc-teaser {
	position: absolute;
	bottom: 74px;
	right: 0;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	width: max-content;
	max-width: 250px;
	padding: 12px 10px 12px 14px;
	background: #fff;
	border: 1px solid var(--fbc-line);
	border-radius: 14px 14px 4px 14px;
	box-shadow: 0 8px 24px rgba(20, 40, 50, 0.16);
	animation: fbc-pop 0.25s ease-out;
}
#fbc-root.fbc-left .fbc-teaser {
	right: auto;
	left: 0;
	border-radius: 14px 14px 14px 4px;
}
#fbc-root .fbc-teaser-text {
	text-align: left;
	font-size: 14px;
	color: var(--fbc-ink);
}
#fbc-root .fbc-teaser-close {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	color: var(--fbc-muted);
	opacity: 0.7;
}
#fbc-root .fbc-teaser-close:hover {
	opacity: 1;
}

/* ---------- panel ---------- */

#fbc-root .fbc-panel {
	position: absolute;
	bottom: 76px;
	right: 0;
	display: flex;
	flex-direction: column;
	width: 370px;
	height: min(600px, calc(100vh - 120px));
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 18px 48px rgba(20, 40, 50, 0.25);
	animation: fbc-pop 0.22s ease-out;
	transform-origin: bottom right;
}
#fbc-root.fbc-left .fbc-panel {
	right: auto;
	left: 0;
	transform-origin: bottom left;
}

#fbc-root .fbc-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 14px 16px;
	background: var(--fbc-color);
	color: #fff;
	border-bottom: 3px solid var(--fbc-accent);
	flex: 0 0 auto;
}
#fbc-root .fbc-avatar {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	padding: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}
#fbc-root .fbc-title {
	flex: 1 1 auto;
	min-width: 0;
}
#fbc-root .fbc-name {
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#fbc-root .fbc-status {
	font-size: 12px;
	opacity: 0.88;
}
#fbc-root .fbc-status::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: #7ee2a8;
	vertical-align: 1px;
}
#fbc-root .fbc-close {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	padding: 7px;
	border-radius: 50%;
	color: #fff;
}
#fbc-root .fbc-close:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* ---------- messages ---------- */

#fbc-root .fbc-log {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 14px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--fbc-bg);
}
#fbc-root .fbc-msg {
	max-width: 86%;
	padding: 10px 13px;
	font-size: 14.5px;
	line-height: 1.5;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	animation: fbc-in 0.18s ease-out;
}
#fbc-root .fbc-bot {
	align-self: flex-start;
	background: #fff;
	color: var(--fbc-ink);
	border: 1px solid var(--fbc-line);
	border-radius: 16px 16px 16px 4px;
}
#fbc-root .fbc-user {
	align-self: flex-end;
	background: var(--fbc-color);
	color: #fff;
	border-radius: 16px 16px 4px 16px;
	white-space: pre-wrap;
}
#fbc-root .fbc-msg p {
	margin: 0 0 8px;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}
#fbc-root .fbc-msg p:last-child,
#fbc-root .fbc-msg ul:last-child {
	margin-bottom: 0;
}
#fbc-root .fbc-msg ul {
	margin: 0 0 8px;
	padding: 0 0 0 18px;
	list-style: disc;
}
#fbc-root .fbc-msg li {
	margin: 2px 0;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	list-style: inherit;
}
#fbc-root .fbc-msg strong {
	font-weight: 700;
}
#fbc-root .fbc-msg a {
	color: var(--fbc-color);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
#fbc-root .fbc-msg a:hover {
	color: var(--fbc-accent);
}

#fbc-root .fbc-error {
	border-color: #f1c4c4;
}
#fbc-root .fbc-retry {
	display: inline-block;
	margin-top: 8px;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--fbc-color);
	color: var(--fbc-color);
	font-size: 13px;
	font-weight: 600;
}
#fbc-root .fbc-retry:hover {
	background: var(--fbc-color);
	color: #fff;
}

#fbc-root .fbc-typing {
	display: flex;
	gap: 4px;
	padding: 14px 16px;
}
#fbc-root .fbc-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--fbc-muted);
	opacity: 0.4;
	animation: fbc-blink 1.2s infinite ease-in-out;
}
#fbc-root .fbc-typing span:nth-child(2) {
	animation-delay: 0.15s;
}
#fbc-root .fbc-typing span:nth-child(3) {
	animation-delay: 0.3s;
}

/* ---------- quick replies ---------- */

#fbc-root .fbc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 14px 12px;
	background: var(--fbc-bg);
	flex: 0 0 auto;
}
#fbc-root .fbc-chip {
	padding: 6px 12px;
	border: 1px solid var(--fbc-color);
	border-radius: 999px;
	background: #fff;
	color: var(--fbc-color);
	font-size: 13px;
	font-weight: 600;
	transition: background 0.15s, color 0.15s;
}
#fbc-root .fbc-chip:hover {
	background: var(--fbc-color);
	color: #fff;
}

/* ---------- input ---------- */

#fbc-root .fbc-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	border-top: 1px solid var(--fbc-line);
	background: #fff;
	flex: 0 0 auto;
}
#fbc-root .fbc-input {
	flex: 1 1 auto;
	display: block;
	width: auto;
	height: 42px;
	min-height: 42px;
	max-height: 110px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #d3dde0;
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	color: var(--fbc-ink);
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	resize: none;
	overflow-y: hidden;
}
#fbc-root .fbc-input:focus {
	border-color: var(--fbc-color);
	outline: none;
	box-shadow: 0 0 0 3px rgba(33, 122, 131, 0.15);
}
#fbc-root .fbc-send {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	padding: 10px;
	border-radius: 50%;
	background: var(--fbc-color);
	color: #fff;
}
#fbc-root .fbc-send:disabled {
	opacity: 0.5;
	cursor: default;
}

#fbc-root .fbc-footer {
	padding: 0 12px 10px;
	background: #fff;
	color: var(--fbc-muted);
	font-size: 11.5px;
	line-height: 1.4;
	text-align: center;
	flex: 0 0 auto;
}
#fbc-root .fbc-footer a {
	color: var(--fbc-color);
	font-weight: 600;
	text-decoration: underline;
}

/* ---------- small screens: full-screen chat ---------- */

@media (max-width: 480px) {
	#fbc-root {
		bottom: 16px;
		right: 16px;
	}
	#fbc-root.fbc-left {
		left: 16px;
	}
	#fbc-root .fbc-panel {
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100%;
		height: 100dvh;
		border-radius: 0;
	}
	#fbc-root.fbc-open .fbc-launcher,
	#fbc-root.fbc-open .fbc-teaser {
		display: none;
	}
	#fbc-root .fbc-input {
		font-size: 16px; /* stops iOS zooming in */
	}
}

@media print {
	#fbc-root {
		display: none !important;
	}
}

@keyframes fbc-pop {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@keyframes fbc-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@keyframes fbc-blink {
	0%, 80%, 100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-3px);
	}
}
@media (prefers-reduced-motion: reduce) {
	#fbc-root *,
	#fbc-root .fbc-panel {
		animation: none !important;
		transition: none !important;
	}
}
