.frq-chatbot {
	--frq-chat-dark: #00384e;
	--frq-chat-blue: #6aa5c8;
	--frq-chat-soft: #eef5f9;
	--frq-chat-text: #263044;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 9998;
	font-family: inherit;
	color: var(--frq-chat-text);
}

.frq-chatbot__launcher {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 24px;
	background: transparent;
	color: #fff;
	box-shadow: none;
	cursor: pointer;
	font-weight: 700;
	padding: 0;
	transition: transform 0.18s ease;
}

/* Keep theme button styles from drawing a panel behind the launcher. */
.frq-chatbot__launcher,
.frq-chatbot__launcher:hover,
.frq-chatbot__launcher:focus,
.frq-chatbot__launcher:focus-visible,
.frq-chatbot__launcher:active {
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

.frq-chatbot__launcher::before,
.frq-chatbot__launcher::after {
	content: none !important;
	display: none !important;
}

.frq-chatbot__launcher-avatar {
	width: 82px;
	height: 82px;
	border: 4px solid #fff;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 24%;
	background: #fff;
	box-shadow: 0 18px 42px rgba(0, 28, 42, 0.24);
}

.frq-chatbot__launcher-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	border-radius: 999px;
	background: var(--frq-chat-dark);
	box-shadow: 0 12px 32px rgba(0, 28, 42, 0.22);
	padding: 8px 17px;
}

.frq-chatbot__launcher:hover,
.frq-chatbot__launcher:focus-visible {
	color: #061826;
	transform: translateY(-3px);
}

.frq-chatbot__launcher:hover .frq-chatbot__launcher-label,
.frq-chatbot__launcher:focus-visible .frq-chatbot__launcher-label {
	background: var(--frq-chat-blue);
}

.frq-chatbot__launcher-icon {
	position: relative;
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.frq-chatbot__launcher-icon::after {
	content: "";
	position: absolute;
	right: -3px;
	bottom: -4px;
	width: 7px;
	height: 7px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-18deg);
}

.frq-chatbot__panel {
	position: absolute;
	right: 0;
	bottom: 138px;
	display: grid;
	grid-template-rows: auto 1fr auto;
	width: min(390px, calc(100vw - 32px));
	/*
	 * The panel sits 160px above the viewport bottom (widget offset plus
	 * launcher clearance). Keep an additional 16px free at the top so that
	 * product results can never push the header outside the viewport.
	 */
	max-height: min(680px, calc(100vh - 176px));
	max-height: min(680px, calc(100dvh - 176px));
	overflow: hidden;
	border: 1px solid rgba(106, 165, 200, 0.3);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 22px 70px rgba(0, 28, 42, 0.28);
	opacity: 0;
	pointer-events: none;
	transform: translateY(14px) scale(0.96);
	transform-origin: right bottom;
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
	visibility: hidden;
}

/* Leave room for the WordPress toolbar while an employee is signed in. */
body.admin-bar .frq-chatbot__panel {
	max-height: min(680px, calc(100vh - 208px));
	max-height: min(680px, calc(100dvh - 208px));
}

.frq-chatbot.is-open .frq-chatbot__panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
	visibility: visible;
}

.frq-chatbot__header {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--frq-chat-dark);
	color: #fff;
	padding: 12px 14px;
}

.frq-chatbot__header-avatar {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border: 2px solid rgba(255, 255, 255, 0.72);
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 24%;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 28, 42, 0.22);
}

.frq-chatbot__header-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.frq-chatbot__header strong,
.frq-chatbot__header span {
	display: block;
}

.frq-chatbot__header strong {
	font-size: 16px;
	line-height: 1.2;
}

.frq-chatbot__header span {
	color: #bcd7e7;
	font-size: 12px;
	margin-top: 2px;
}

.frq-chatbot__close {
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
}

.frq-chatbot__messages {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 260px;
	overflow-y: auto;
	background: #f7fafc;
	padding: 14px;
}

.frq-chatbot__message {
	display: grid;
	gap: 10px;
	max-width: 100%;
}

.frq-chatbot__message--user {
	justify-items: end;
}

.frq-chatbot__message--bot {
	grid-template-columns: 38px minmax(0, 1fr);
	align-items: start;
}

.frq-chatbot__message-avatar {
	width: 38px;
	height: 38px;
	border: 1px solid #d6e5ee;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 24%;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 28, 42, 0.12);
}

.frq-chatbot__bubble {
	max-width: 86%;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-line;
}

.frq-chatbot__message--user .frq-chatbot__bubble {
	background: var(--frq-chat-dark);
	color: #fff;
}

.frq-chatbot__message--bot .frq-chatbot__bubble {
	background: #fff;
	border: 1px solid #e0e8ee;
	color: var(--frq-chat-text);
	grid-column: 2;
}

.frq-chatbot__products {
	display: grid;
	gap: 10px;
	grid-column: 2;
	min-width: 0;
	width: 100%;
}

.frq-chatbot__call-link {
	display: inline-flex;
	grid-column: 2;
	align-items: center;
	justify-content: center;
	justify-self: start;
	min-height: 38px;
	border-radius: 9px;
	background: var(--frq-chat-blue);
	color: #061826;
	font-weight: 800;
	padding: 9px 14px;
	text-decoration: none;
}

.frq-chatbot__call-link:hover,
.frq-chatbot__call-link:focus-visible {
	background: var(--frq-chat-dark);
	color: #fff;
}

.frq-chatbot__product-track {
	display: grid;
	min-width: 0;
}

.frq-chatbot__product[hidden] {
	display: none;
}

.frq-chatbot__product-navigation {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) 38px;
	align-items: center;
	gap: 9px;
}

.frq-chatbot__product-navigation button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid #c9dce8;
	border-radius: 50%;
	background: #fff;
	color: var(--frq-chat-dark);
	cursor: pointer;
	font-family: Arial, sans-serif;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	padding: 0 0 3px;
}

.frq-chatbot__product-navigation button:hover,
.frq-chatbot__product-navigation button:focus-visible {
	border-color: var(--frq-chat-dark);
	background: var(--frq-chat-dark);
	color: #fff;
}

.frq-chatbot__product-status {
	color: #5f6d7a;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.frq-chatbot__all-results {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	border-radius: 9px;
	background: var(--frq-chat-dark);
	color: #fff;
	font-weight: 800;
	padding: 9px 14px;
	text-align: center;
	text-decoration: none;
}

.frq-chatbot__all-results:hover,
.frq-chatbot__all-results:focus-visible {
	background: var(--frq-chat-blue);
	color: #061826;
}

.frq-chatbot__product {
	display: grid;
	border: 1px solid #dfe9f0;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.frq-chatbot__product img {
	display: block;
	width: 100%;
	height: 138px;
	object-fit: contain;
	object-position: center;
	box-sizing: border-box;
	padding: 6px;
	background: #fff;
	border-bottom: 1px solid #edf3f7;
}

.frq-chatbot__product-body {
	display: grid;
	gap: 7px;
	min-width: 0;
	padding: 11px;
}

.frq-chatbot__product-title {
	color: #10364d;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}

.frq-chatbot__product-title:hover {
	color: var(--frq-chat-blue);
}

.frq-chatbot__product-meta {
	color: #6a7684;
	font-size: 12px;
}

.frq-chatbot__product-price {
	color: #061826;
	font-weight: 800;
}

.frq-chatbot__product-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 42px;
	gap: 8px;
	margin-top: 4px;
}

.frq-chatbot__product-actions > :only-child {
	grid-column: 1 / -1;
}

.frq-chatbot__product-link,
.frq-chatbot__cart-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	min-height: 38px;
	padding: 8px 10px;
	text-decoration: none;
}

.frq-chatbot__product-link {
	background: #eef3f6;
	color: #10364d;
}

.frq-chatbot__cart-link {
	background: var(--frq-chat-blue);
	color: #061826;
	padding: 0;
	width: 42px;
}

.frq-chatbot__product-link:hover,
.frq-chatbot__cart-link:hover {
	background: var(--frq-chat-dark);
	color: #fff;
}

.frq-chatbot__cart-icon {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.frq-chatbot__screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.frq-chatbot__form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	border-top: 1px solid #dfe9f0;
	background: #fff;
	padding: 12px;
}

.frq-chatbot__input {
	min-width: 0;
	border: 1px solid #cddbe5;
	border-radius: 9px;
	padding: 10px 11px;
}

.frq-chatbot__form button {
	border: 0;
	border-radius: 9px;
	background: var(--frq-chat-blue);
	color: #061826;
	cursor: pointer;
	font-weight: 800;
	padding: 10px 13px;
}

.frq-chatbot__form button:hover {
	background: var(--frq-chat-dark);
	color: #fff;
}

@media (max-width: 600px) {
	.frq-chatbot {
		right: 12px;
		bottom: 12px;
	}

	.frq-chatbot__launcher-avatar {
		width: 72px;
		height: 72px;
	}

	.frq-chatbot__launcher-label {
		min-height: 34px;
		padding: 7px 15px;
	}

	.frq-chatbot__panel {
		position: fixed;
		right: 12px;
		bottom: 126px;
		left: 12px;
		width: auto;
		max-height: calc(100vh - 146px);
	}

	body.admin-bar .frq-chatbot__panel {
		max-height: calc(100vh - 192px);
		max-height: calc(100dvh - 192px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.frq-chatbot__launcher,
	.frq-chatbot__panel {
		transition: none;
	}
}
