:root {
	--fbai-ink: #edf6ff;
	--fbai-muted: #c1d0e2;
	--fbai-line: rgba(149, 203, 255, 0.32);
	--fbai-panel: #071827;
	--fbai-panel-strong: #102a42;
	--fbai-cyan: #78e4ff;
	--fbai-violet: #b49aff;
	--fbai-success: #8cf0c1;
}

html.fbai-dialog-open {
	overflow: hidden;
}

/*
 * Temporary duplicate-widget guard for FriendBeacon's three known legacy
 * Botpress share URLs only. Remove those embeds and disable the old bots at
 * their source; this is visual cleanup, never an access-control boundary.
 */
iframe[src*="HXJE3RMV"],
iframe[src*="9Q4HWTJR"],
iframe[src*="WKQD58I1"] {
	display: none !important;
}

.fbai-launcher {
	align-items: center;
	background: linear-gradient(135deg, #103655, #17224a 65%, #472b79);
	border: 1px solid rgba(145, 230, 255, 0.7);
	border-radius: 999px;
	bottom: 22px;
	box-shadow: 0 14px 36px rgba(0, 7, 19, 0.42), 0 0 0 5px rgba(108, 223, 255, 0.08);
	color: #f5fbff;
	cursor: pointer;
	display: inline-flex;
	font: 700 14px/1.1 inherit;
	gap: 9px;
	letter-spacing: 0.01em;
	padding: 12px 17px;
	position: fixed;
	right: 22px;
	z-index: 2147483000;
}

.fbai-launcher:hover,
.fbai-launcher:focus-visible {
	background: linear-gradient(135deg, #16496e, #24306b 65%, #6038a0);
	box-shadow: 0 18px 42px rgba(0, 7, 19, 0.5), 0 0 0 5px rgba(108, 223, 255, 0.16);
	transform: translateY(-1px);
}

.fbai-launcher__orb {
	background: radial-gradient(circle at 30% 28%, #e5ffff 0 11%, var(--fbai-cyan) 31%, #3a87df 60%, #6d45b8 100%);
	border-radius: 50%;
	box-shadow: 0 0 14px rgba(117, 232, 255, 0.78);
	height: 19px;
	width: 19px;
}

.fbai-dialog {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 18px;
	position: fixed;
	z-index: 2147483001;
}

.fbai-dialog[hidden] {
	display: none;
}

.fbai-dialog__backdrop {
	background: rgba(2, 8, 19, 0.76);
	backdrop-filter: blur(8px);
	inset: 0;
	position: absolute;
}

.fbai-dialog__panel {
	background: linear-gradient(150deg, #102a42, #071827 62%);
	border: 1px solid var(--fbai-line);
	border-radius: 22px;
	box-shadow: 0 30px 100px rgba(0, 0, 0, 0.66);
	color: var(--fbai-ink);
	display: flex;
	flex-direction: column;
	max-height: min(760px, calc(100dvh - 36px));
	max-width: 760px;
	overflow: hidden;
	position: relative;
	width: min(100%, 760px);
}

#friendbeacon-native-chat,
#friendbeacon-native-chat button,
#friendbeacon-native-chat textarea,
#friendbeacon-native-chat select {
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-shadow: none;
}

#friendbeacon-native-chat button,
#friendbeacon-native-chat textarea,
#friendbeacon-native-chat select {
	-webkit-appearance: none;
	appearance: none;
}

.fbai-dialog__header {
	align-items: flex-start;
	border-bottom: 1px solid var(--fbai-line);
	display: flex;
	gap: 16px;
	justify-content: space-between;
	padding: 22px 24px 16px;
}

.fbai-eyebrow {
	color: var(--fbai-cyan);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.13em;
	margin: 0 0 5px;
	text-transform: uppercase;
}

.fbai-dialog h2 {
	color: #fff;
	font-size: clamp(25px, 3vw, 34px);
	letter-spacing: -0.035em;
	line-height: 1;
	margin: 0;
}

.fbai-dialog__tagline {
	color: var(--fbai-muted);
	font-size: 15px;
	line-height: 1.45;
	margin: 7px 0 0;
}

.fbai-icon-button,
.fbai-text-button,
.fbai-assistant-tab,
.fbai-quick-prompt,
.fbai-send,
.fbai-inline-launch {
	font: inherit;
}

#friendbeacon-native-chat .fbai-icon-button {
	background: #5334b5 !important;
	border: 1px solid rgba(255, 255, 255, 0.16) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	color: #fff !important;
	cursor: pointer;
	font-size: 29px;
	height: 44px;
	line-height: 35px;
	padding: 0;
	width: 44px;
}

#friendbeacon-native-chat .fbai-icon-button:hover,
#friendbeacon-native-chat .fbai-icon-button:focus-visible {
	background: #6945d1;
}

.fbai-tier-row {
	align-items: center;
	border-bottom: 1px solid var(--fbai-line);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 11px 24px;
}

.fbai-tier-badge,
.fbai-engine-badge {
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.02em;
	padding: 5px 9px;
}

.fbai-tier-badge {
	background: rgba(121, 226, 255, 0.13);
	border: 1px solid rgba(121, 226, 255, 0.28);
	color: var(--fbai-cyan);
}

.fbai-engine-badge {
	background: rgba(180, 154, 255, 0.11);
	border: 1px solid rgba(180, 154, 255, 0.25);
	color: #d6c7ff;
}

.fbai-assistant-tabs {
	border-bottom: 1px solid var(--fbai-line);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	overflow-x: auto;
	padding: 9px 12px;
}

#friendbeacon-native-chat .fbai-assistant-tab {
	background: #0d2540 !important;
	border: 1px solid rgba(149, 203, 255, 0.25) !important;
	border-radius: 11px !important;
	box-shadow: none !important;
	color: #d9e6f4 !important;
	cursor: pointer;
	display: grid;
	font-size: 13px;
	gap: 3px;
	padding: 8px 7px;
	text-align: left;
}

.fbai-assistant-tab span {
	font-weight: 800;
}

.fbai-assistant-tab small {
	font-size: 10px;
	line-height: 1.15;
}

#friendbeacon-native-chat .fbai-assistant-tab:hover,
#friendbeacon-native-chat .fbai-assistant-tab:focus-visible {
	background: #173857 !important;
	border-color: rgba(129, 222, 255, 0.7) !important;
	color: #fff !important;
}

#friendbeacon-native-chat .fbai-assistant-tab.is-active {
	background: linear-gradient(140deg, #174866, #3f3976) !important;
	border-color: #91deff !important;
	color: #fff !important;
}

.fbai-assistant-tab.is-locked::after {
	color: #d3b9ff;
	content: "Locked";
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.fbai-profile-note {
	background: #0b2339;
	border-bottom: 1px solid var(--fbai-line);
	color: var(--fbai-ink);
}

.fbai-profile-note__summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	list-style: none;
	padding: 12px 24px;
}

.fbai-profile-note__summary::-webkit-details-marker {
	display: none;
}

.fbai-profile-note__summary strong {
	color: #effaff;
	display: block;
	font-size: 13px;
}

.fbai-profile-note__summary small {
	color: var(--fbai-muted);
	display: block;
	font-size: 12px;
	line-height: 1.35;
	margin-top: 2px;
}

.fbai-profile-note__chevron {
	color: var(--fbai-cyan);
	font-size: 20px;
	line-height: 1;
	transition: transform 160ms ease;
}

.fbai-profile-note[open] .fbai-profile-note__chevron {
	transform: rotate(180deg);
}

.fbai-profile-note__content {
	border-top: 1px solid rgba(149, 203, 255, 0.22);
	padding: 12px 24px 14px;
}

.fbai-profile-note__content > p {
	color: var(--fbai-muted);
	font-size: 13px;
	line-height: 1.5;
	margin: 0;
	max-width: 560px;
}

.fbai-profile-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 10px;
}

.fbai-profile-controls {
	border-top: 1px dashed rgba(149, 203, 255, 0.22);
	color: #d3dfed;
	font-size: 12px;
	margin-top: 10px;
	padding-top: 9px;
}

.fbai-profile-summary {
	border-top: 1px dashed rgba(149, 203, 255, 0.22);
	flex: 1 0 100%;
	padding-top: 9px;
}

.fbai-profile-controls summary {
	cursor: pointer;
	font-weight: 700;
	list-style-position: inside;
}

.fbai-profile-controls[open] {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 13px;
}

.fbai-profile-controls label {
	display: grid;
	font-size: 11px;
	gap: 3px;
}

.fbai-profile-controls select {
	background: #061321;
	border: 1px solid rgba(149, 203, 255, 0.42);
	border-radius: 7px;
	color: var(--fbai-ink);
	font: inherit;
	min-width: 118px;
	padding: 5px 7px;
}

.fbai-profile-controls .fbai-text-button {
	align-self: end;
	padding-bottom: 6px;
}

#friendbeacon-native-chat .fbai-text-button {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #aeeeff !important;
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	min-height: 32px;
	padding: 4px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#friendbeacon-native-chat .fbai-text-button:hover,
#friendbeacon-native-chat .fbai-text-button:focus-visible {
	color: #fff !important;
}

.fbai-chat {
	background: #081929;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	overflow-y: auto;
	padding: 18px 24px;
	scroll-behavior: smooth;
}

.fbai-message {
	border: 1px solid var(--fbai-line);
	border-radius: 14px;
	max-width: 92%;
	padding: 11px 13px;
}

.fbai-message--assistant {
	align-self: flex-start;
	background: #10314a;
	border-color: #5d99c3;
}

.fbai-message--member {
	align-self: flex-end;
	background: #29265c;
	border-color: #a69bfa;
}

.fbai-message__label {
	color: var(--fbai-cyan);
	display: block;
	font-size: 11px;
	letter-spacing: 0.05em;
	margin-bottom: 5px;
	text-transform: uppercase;
}

.fbai-message--member .fbai-message__label {
	color: #d5c8ff;
}

.fbai-message__body {
	color: #f7fbff;
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	white-space: pre-wrap;
}

.fbai-feedback {
	align-items: center;
	border-top: 1px solid rgba(149, 203, 255, 0.16);
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
	padding-top: 9px;
}

.fbai-feedback__copy,
.fbai-feedback__thanks {
	color: var(--fbai-muted);
	flex: 1 0 100%;
	font-size: 11px;
	line-height: 1.35;
}

.fbai-feedback__button,
.fbai-feedback__reason {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(148, 205, 255, 0.22);
	border-radius: 999px;
	color: #d9efff;
	cursor: pointer;
	font: inherit;
	font-size: 11px;
	padding: 5px 8px;
}

.fbai-feedback__button:hover,
.fbai-feedback__button:focus-visible,
.fbai-feedback__reason:hover,
.fbai-feedback__reason:focus-visible {
	background: rgba(113, 223, 255, 0.15);
	border-color: rgba(133, 232, 255, 0.58);
	color: #fff;
}

.fbai-feedback__button:disabled,
.fbai-feedback__reason:disabled {
	cursor: wait;
	opacity: 0.55;
}

.fbai-feedback__reasons {
	display: flex;
	flex-basis: 100%;
	flex-wrap: wrap;
	gap: 6px;
}

.fbai-quick-prompts {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding: 0 24px 12px;
}

#friendbeacon-native-chat .fbai-quick-prompt {
	background: #14334f !important;
	border: 1px solid #6ea5ce !important;
	border-radius: 999px;
	box-shadow: none !important;
	color: #f7fbff !important;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	min-height: 38px;
	padding: 8px 12px;
}

#friendbeacon-native-chat .fbai-quick-prompt:hover,
#friendbeacon-native-chat .fbai-quick-prompt:focus-visible {
	background: #1c4669 !important;
	border-color: #9be6ff !important;
	color: #fff !important;
}

.fbai-composer {
	border-top: 1px solid var(--fbai-line);
	padding: 15px 24px 18px;
}

.fbai-composer textarea {
	background: #020b15;
	border: 2px solid #6ea5ce;
	border-radius: 12px;
	box-sizing: border-box;
	color: #fff;
	font: inherit;
	line-height: 1.45;
	min-height: 78px;
	padding: 11px 12px;
	resize: vertical;
	width: 100%;
}

.fbai-composer textarea:focus {
	border-color: var(--fbai-cyan);
	box-shadow: 0 0 0 3px rgba(109, 224, 255, 0.13);
	outline: 0;
}

.fbai-composer textarea::placeholder {
	color: #c6d2df;
	opacity: 1;
}

.fbai-composer__footer {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-top: 9px;
}

.fbai-composer__footer p {
	color: var(--fbai-muted);
	font-size: 12px;
	margin: 0;
}

.fbai-composer__footer p.is-error {
	color: #ffb6bd;
}

#friendbeacon-native-chat .fbai-send,
#friendbeacon-native-chat .fbai-inline-launch {
	background: linear-gradient(135deg, #5e5bd8, #923fe7) !important;
	border: 1px solid #c8b2ff !important;
	border-radius: 10px;
	box-shadow: none !important;
	color: #fff !important;
	cursor: pointer;
	font-size: 14px;
	font-weight: 900;
	min-height: 42px;
	padding: 10px 15px;
}

#friendbeacon-native-chat .fbai-send:hover,
#friendbeacon-native-chat .fbai-send:focus-visible,
#friendbeacon-native-chat .fbai-inline-launch:hover,
#friendbeacon-native-chat .fbai-inline-launch:focus-visible {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

.fbai-send:disabled,
.fbai-text-button:disabled {
	cursor: wait;
	opacity: 0.55;
}

.fbai-inline-launch {
	align-items: center;
	display: inline-flex;
	text-decoration: none;
}

@media (max-width: 640px) {
	.fbai-launcher {
		bottom: max(14px, env(safe-area-inset-bottom));
		right: 14px;
	}

	.fbai-dialog {
		align-items: stretch;
		padding: 0;
	}

	.fbai-dialog__panel {
		border: 0;
		border-radius: 0;
		height: 100vh;
		height: 100dvh;
		max-height: 100vh;
		max-height: 100dvh;
		width: 100%;
	}

	.fbai-dialog__header,
	.fbai-tier-row,
	.fbai-profile-note__summary,
	.fbai-profile-note__content,
	.fbai-chat,
	.fbai-quick-prompts,
	.fbai-composer {
		padding-left: 16px;
		padding-right: 16px;
	}

	.fbai-dialog__header {
		gap: 12px;
		padding-bottom: 13px;
		padding-top: max(16px, env(safe-area-inset-top));
	}

	.fbai-eyebrow {
		font-size: 10px;
	}

	.fbai-dialog h2 {
		font-size: 31px;
	}

	.fbai-dialog__tagline {
		font-size: 14px;
	}

	.fbai-tier-row {
		padding-bottom: 10px;
		padding-top: 10px;
	}

	.fbai-assistant-tabs {
		display: flex;
		gap: 8px;
		-ms-overflow-style: none;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		padding: 10px 16px;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.fbai-assistant-tabs::-webkit-scrollbar,
	.fbai-quick-prompts::-webkit-scrollbar {
		display: none;
		height: 0;
		width: 0;
	}

	.fbai-assistant-tab {
		flex: 0 0 138px;
		font-size: 14px;
		min-height: 66px;
		padding: 9px 10px;
		scroll-snap-align: start;
	}

	.fbai-assistant-tab small {
		font-size: 11px;
		line-height: 1.25;
	}

	.fbai-profile-note {
		flex: 0 0 auto;
	}

	.fbai-profile-note__summary {
		min-height: 56px;
	}

	.fbai-profile-note__content > p {
		font-size: 14px;
		line-height: 1.5;
	}

	.fbai-profile-actions {
		gap: 8px 16px;
	}

	.fbai-profile-actions .fbai-text-button,
	.fbai-profile-controls .fbai-text-button {
		font-size: 13px;
		min-height: 40px;
	}

	.fbai-chat {
		flex: 1 1 auto;
		font-size: 16px;
		min-height: 0;
		padding-bottom: 14px;
		padding-top: 14px;
	}

	.fbai-message {
		max-width: 96%;
		padding: 12px 14px;
	}

	.fbai-message__body {
		font-size: 16px;
		line-height: 1.62;
	}

	.fbai-quick-prompts {
		flex: 0 0 auto;
		flex-wrap: nowrap;
		-ms-overflow-style: none;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		padding-bottom: 12px;
		padding-top: 10px;
		scrollbar-width: none;
	}

	.fbai-quick-prompt {
		flex: 0 0 auto;
		font-size: 14px;
		min-height: 44px;
		padding: 10px 13px;
		white-space: nowrap;
	}

	.fbai-composer {
		flex: 0 0 auto;
		padding-bottom: max(16px, env(safe-area-inset-bottom));
		padding-top: 12px;
	}

	.fbai-composer textarea {
		font-size: 16px;
		min-height: 92px;
		padding: 12px 13px;
	}

	.fbai-composer__footer {
		margin-top: 10px;
	}

	.fbai-send {
		font-size: 16px;
		min-height: 46px;
		padding-left: 20px;
		padding-right: 20px;
	}
}
