#fc-widget-root {
	position: fixed;
	/* The Wostin theme's scroll-to-top button is fixed at bottom:40px
	   right:40px and is 45px square, so it occupies up to 85px from the
	   bottom. Sitting the chat bubble at 96px clears it completely
	   instead of overlapping it. */
	bottom: 96px;
	right: 28px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#fc-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #e8712a;
	border: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.15s ease;
}

#fc-bubble:hover {
	transform: scale(1.05);
}

#fc-unread-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #b03a3a;
	border: 2px solid #fff;
	animation: fc-badge-pulse 1.6s infinite;
}

@keyframes fc-badge-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.15); }
}

.fc-bubble-icon {
	font-size: 26px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fc-bubble-icon svg {
	width: 28px;
	height: 28px;
}

.fc-header-logo {
	width: 18px;
	height: 18px;
	color: #e8712a;
	flex-shrink: 0;
}

.fc-hidden {
	display: none !important;
}

#fc-window {
	position: absolute;
	bottom: 74px;
	right: 0;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 480px;
	max-height: calc(100vh - 200px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.fc-header {
	background: #2f3b2f;
	color: #fff;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
}

.fc-header-title {
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 7px;
}

#fc-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}

.fc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #f7f2ea;
}

#fc-chat-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

#fc-chat-body.fc-hidden {
	display: none;
}

/* ---------- Lead gate ---------- */

.fc-lead-gate {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px;
	background: #f7f2ea;
}

.fc-lead-gate.fc-hidden {
	display: none;
}

.fc-lead-intro {
	font-size: 13.5px;
	color: #4a4a45;
	margin: 0 0 14px;
	line-height: 1.5;
}

#fc-lead-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

#fc-lead-form input,
#fc-lead-form select {
	padding: 11px 12px;
	border: 1px solid #e5e1d8;
	border-radius: 6px;
	font-size: 13.5px;
	font-family: inherit;
}

.fc-lead-note {
	font-size: 11px;
	color: #9a9a90;
	margin: -4px 0 2px;
}

.fc-lead-error {
	background: #fbeaea;
	color: #b03a3a;
	font-size: 12px;
	padding: 8px 10px;
	border-radius: 6px;
	margin: 0;
}

.fc-lead-submit {
	background: #e8712a;
	color: #fff;
	border: none;
	padding: 11px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}

.fc-lead-skip {
	background: none;
	border: none;
	color: #8a8a80;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px;
}

.fc-msg {
	max-width: 80%;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.fc-msg--bot {
	background: #fff;
	color: #2f3b2f;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.fc-msg--visitor {
	background: #e8712a;
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

.fc-msg--system {
	background: transparent;
	color: #8a8a80;
	align-self: center;
	font-size: 11.5px;
	font-style: italic;
	text-align: center;
	max-width: 100%;
	padding: 4px 8px;
}

.fc-typing {
	padding: 0 14px 8px;
	display: flex;
	gap: 4px;
	background: #f7f2ea;
}

.fc-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #b5b0a2;
	animation: fc-bounce 1.2s infinite ease-in-out;
}

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

@keyframes fc-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.fc-form {
	display: flex;
	border-top: 1px solid #f0ece2;
	flex-shrink: 0;
}

#fc-input {
	flex: 1;
	border: none;
	padding: 13px 14px;
	font-size: 14px;
	outline: none;
}

.fc-send-btn {
	background: #e8712a;
	color: #fff;
	border: none;
	width: 50px;
	font-size: 16px;
	cursor: pointer;
}

@media (max-width: 420px) {
	#fc-window {
		right: -8px;
	}
}
