/**
 * Shared Flow Assist chat chrome (frontend widget + admin demo).
 * Gemini-style empty state, starters, and composer.
 */

/* Readable font: 16px (1rem) Lato base, em children (immune to html { font-size: 62.5% }). */
.fai-sidebar-root,
.flowbie-chat-widget {
	font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
}

.fai-sidebar-root .fcw-card__body,
.fai-sidebar-root .fcw-card__body p,
.flowbie-chat-widget .fcw-card__body,
.flowbie-chat-widget .fcw-card__body p,
.fai-sidebar-root .fcw-user-bubble,
.flowbie-chat-widget .fcw-user-bubble,
.fai-sidebar-root .fcw-textarea,
.flowbie-chat-widget .fcw-textarea,
.fai-sidebar-root .fcw-starter,
.flowbie-chat-widget .fcw-starter,
.fai-sidebar-root .fcw-topic-chip,
.flowbie-chat-widget .fcw-topic-chip {
	font-size: 1em !important;
	font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	line-height: 1.6 !important;
}

/* Theme isolation (Elementor / WP form styles) */
#flowbie-chat-widget-root.flowbie-chat-widget button,
#flowbie-chat-widget-root.flowbie-chat-widget textarea,
#flowbie-chat-widget-root.flowbie-chat-widget form,
.flowbie-chat-widget button,
.flowbie-chat-widget textarea,
.flowbie-chat-widget form {
	box-sizing: border-box;
	font-family: inherit;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-starter,
.flowbie-chat-widget .fcw-starter,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-demo-starter,
.flowbie-chat-widget .fcw-demo-starter,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-topic-chip,
.flowbie-chat-widget .fcw-topic-chip {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	text-align: left !important;
	white-space: normal !important;
	overflow: visible !important;
	overflow-wrap: break-word !important;
	word-break: break-word !important;
	padding: 14px 16px !important;
	border-radius: 14px !important;
	border: 1px solid #e2e8f0 !important;
	background: #f8fafc !important;
	color: #334155 !important;
	font-size: 1em !important;
	font-family: inherit !important;
	line-height: 1.45 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fai-sidebar-launcher.fcw-launcher,
.flowbie-chat-widget .fai-sidebar-launcher.fcw-launcher {
	appearance: none !important;
	-webkit-appearance: none !important;
	padding: 0 !important;
	line-height: 0 !important;
	flex-shrink: 0 !important;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	position: fixed !important;
	z-index: 999900 !important;
	bottom: 20px !important;
	top: auto !important;
	transform: none !important;
	width: 56px !important;
	height: 56px !important;
	min-width: 56px !important;
	min-height: 56px !important;
	border-radius: 50% !important;
	border: none !important;
	cursor: pointer !important;
	background: var(--fcw-launcher-bg, #3b82f6) !important;
	color: var(--fcw-accent-text, #ffffff) !important;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget.fai-sidebar-root--right .fcw-launcher,
.flowbie-chat-widget.fai-sidebar-root--right .fcw-launcher {
	right: 20px !important;
	left: auto !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget.fai-sidebar-root--left .fcw-launcher,
.flowbie-chat-widget.fai-sidebar-root--left .fcw-launcher {
	left: 20px !important;
	right: auto !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget.fai-sidebar-root--open .fai-sidebar-launcher.fcw-launcher,
.flowbie-chat-widget.fai-sidebar-root--open .fai-sidebar-launcher.fcw-launcher {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

#flowbie-chat-mobile-launcher,
.flowbie-chat-widget .fai-sidebar-launcher.fcw-launcher,
.flowbie-chat-widget .fcw-launcher,
.flowbie-chat-widget .fcw-mobile-launcher {
	z-index: 999900 !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget.fai-sidebar-root--open,
#flowbie-chat-widget-root.flowbie-chat-widget {
	z-index: 999950 !important;
}

.flowbie-chat-widget .fai-sidebar-backdrop:not([hidden]) {
	z-index: 999955 !important;
}

.flowbie-chat-widget .fai-sidebar-panel.fcw-panel--sidebar:not([hidden]),
#flowbie-chat-widget-root.flowbie-chat-widget .fai-sidebar-panel.fcw-panel--sidebar:not([hidden]) {
	z-index: 999960 !important;
}

.fcw-contact-human__overlay:not([hidden]) {
	z-index: 999999 !important;
}

.fcw-contact-human__overlay:not([hidden]) .fcw-contact-human__card {
	z-index: 1 !important;
	position: relative !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fai-sidebar-clear,
.flowbie-chat-widget .fai-sidebar-clear {
	appearance: none !important;
	-webkit-appearance: none !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #64748b !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-composer textarea.fcw-textarea,
.flowbie-chat-widget .fcw-composer textarea.fcw-textarea,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-demo-composer textarea.fcw-textarea,
.flowbie-chat-widget .fcw-demo-composer textarea.fcw-textarea {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: block !important;
	width: 100% !important;
	min-height: 72px !important;
	max-height: 160px !important;
	border: none !important;
	background: #ffffff !important;
	color: #1e293b !important;
	-webkit-text-fill-color: #1e293b !important;
	box-shadow: none !important;
	resize: none !important;
	overflow: auto !important;
}

.flowbie-chat-widget .fcw-empty,
.flowbie-chat-widget .fcw-demo-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding: 16px 8px 20px;
	gap: 20px;
	min-height: 0;
	overflow-y: auto;
}

.flowbie-chat-widget .fcw-empty[hidden],
.flowbie-chat-widget .fcw-demo-empty[hidden] {
	display: none !important;
}

.flowbie-chat-widget .fcw-greeting,
.flowbie-chat-widget .fcw-demo-greeting {
	margin: 0;
	font-size: 1em;
	font-weight: 400;
	line-height: 1.25;
	background: linear-gradient(90deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.flowbie-chat-widget .fcw-sub,
.flowbie-chat-widget .fcw-demo-sub {
	margin: 0;
	font-size: 1em;
	font-weight: 400;
	line-height: 1.35;
	color: #1e293b;
}

.flowbie-chat-widget .fcw-starters,
.flowbie-chat-widget .fcw-demo-starters {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.flowbie-chat-widget .fcw-starter,
.flowbie-chat-widget .fcw-demo-starter {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: auto;
	text-align: left;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #334155;
	font-size: 1em;
	font-family: inherit;
	line-height: 1.45;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.flowbie-chat-widget .fcw-starter:hover,
.flowbie-chat-widget .fcw-demo-starter:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #0f172a;
}

.flowbie-chat-widget .fcw-messages[hidden] {
	display: none !important;
}

.flowbie-chat-widget .fcw-input-row.fcw-composer,
.flowbie-chat-widget .fcw-input-row.fcw-demo-composer {
	margin-top: auto;
	padding: 0;
	border: none;
	background: transparent;
	align-items: stretch;
}

.flowbie-chat-widget .fcw-composer-shell,
.flowbie-chat-widget .fcw-demo-composer-shell {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	border-radius: 20px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}

.flowbie-chat-widget .fcw-composer .fcw-textarea,
.flowbie-chat-widget .fcw-demo-composer .fcw-textarea {
	display: block;
	width: 100%;
	flex: 1 1 auto;
	border: none;
	background: #ffffff !important;
	color: #1e293b !important;
	-webkit-text-fill-color: #1e293b !important;
	padding: 4px 0;
	min-height: 72px;
	max-height: 160px;
	font-size: 1em;
	line-height: 1.5;
	resize: none;
	box-shadow: none;
	outline: none;
	caret-color: #1e293b;
}

.flowbie-chat-widget .fcw-composer .fcw-textarea::placeholder,
.flowbie-chat-widget .fcw-demo-composer .fcw-textarea::placeholder {
	color: #94a3b8 !important;
	-webkit-text-fill-color: #94a3b8 !important;
	opacity: 1;
}

.flowbie-chat-widget .fcw-composer .fcw-textarea:focus,
.flowbie-chat-widget .fcw-demo-composer .fcw-textarea:focus {
	border: none;
	outline: none;
	background: #ffffff !important;
	box-shadow: none;
}

.flowbie-chat-widget .fcw-composer-actions,
.flowbie-chat-widget .fcw-demo-composer-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.flowbie-chat-widget .fcw-composer-actions.fcw-composer-actions--with-human {
	justify-content: flex-end;
	gap: 10px;
}

.flowbie-chat-widget .fcw-composer .fcw-composer-human-cta,
.flowbie-chat-widget .fcw-composer .fcw-contact-human__cta {
	flex: 0 0 auto;
	width: auto;
	max-width: calc(100% - 52px);
	min-height: 40px;
	padding: 8px 14px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff !important;
	background: #0f0f0f !important;
	background-color: #0f0f0f !important;
	border: none !important;
	border-radius: 999px;
	box-shadow: none !important;
	cursor: pointer;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	appearance: none;
	-webkit-appearance: none;
}

.flowbie-chat-widget .fcw-composer .fcw-composer-human-cta:hover,
.flowbie-chat-widget .fcw-composer .fcw-composer-human-cta:focus,
.flowbie-chat-widget .fcw-composer .fcw-composer-human-cta:active,
.flowbie-chat-widget .fcw-composer .fcw-composer-human-cta--open,
.flowbie-chat-widget .fcw-composer .fcw-contact-human__cta:hover,
.flowbie-chat-widget .fcw-composer .fcw-contact-human__cta:focus,
.flowbie-chat-widget .fcw-composer .fcw-contact-human__cta:active,
.flowbie-chat-widget .fcw-composer .fcw-contact-human__cta--open {
	color: #ffffff !important;
	background: #000000 !important;
	background-color: #000000 !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-composer .fcw-send,
.flowbie-chat-widget .fcw-composer .fcw-send,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-demo-composer .fcw-send,
.flowbie-chat-widget .fcw-demo-composer .fcw-send {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 999px;
	border: none !important;
	outline: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	box-shadow: none !important;
	background: linear-gradient(135deg, #4285f4, #9b72cb);
	color: #ffffff !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-composer .fcw-send svg,
.flowbie-chat-widget .fcw-composer .fcw-send svg,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-composer .flowbie-voice__svg,
.flowbie-chat-widget .fcw-composer .flowbie-voice__svg {
	color: #ffffff !important;
	stroke: currentColor;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-composer .fcw-send:focus,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-composer .fcw-send:focus-visible,
.flowbie-chat-widget .fcw-composer .fcw-send:focus,
.flowbie-chat-widget .fcw-composer .fcw-send:focus-visible {
	outline: none !important;
	border: none !important;
	box-shadow: none !important;
}

.flowbie-chat-widget .fcw-composer .fcw-send:hover,
.flowbie-chat-widget .fcw-demo-composer .fcw-send:hover {
	background: linear-gradient(135deg, #3367d6, #8b5cf6);
}

.flowbie-chat-widget .fcw-card__type-badge {
	font-size: 1em;
	color: #64748b;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
}

.flowbie-chat-widget .fcw-card__topics {
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	min-width: 0;
}

.flowbie-chat-widget .fcw-topic-chip {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: auto;
	text-align: left;
	white-space: normal;
	overflow: visible;
	overflow-wrap: break-word;
	word-break: break-word;
	padding: 14px 16px;
	border-radius: 14px;
	font-size: 1em;
	color: #334155;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	line-height: 1.45;
}

.flowbie-chat-widget .fcw-topic-chip:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #0f172a;
}

.flowbie-chat-widget .fcw-card__confidence {
	font-size: 1em;
}

.flowbie-chat-widget .fcw-link-pill {
	font-size: 1em;
	background: #f8fafc;
}

.flowbie-chat-widget .fcw-messages::-webkit-scrollbar-thumb {
	background: #cbd5e1;
}

.flowbie-chat-widget .flowbie-voice-toast {
	margin: 8px 0;
	padding: 10px 14px;
	border-radius: 12px;
	background: #fef2f2;
	color: #991b1b;
	font-size: 1em;
}

/* Blue action buttons: force high-contrast white label text */
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-cta-btn,
.flowbie-chat-widget .fcw-cta-btn,
#flowbie-chat-widget-root.flowbie-chat-widget button.fcw-cta-btn,
.flowbie-chat-widget button.fcw-cta-btn {
	background: var(--fcw-button-bg, #3b82f6) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	border: none !important;
	box-shadow: none !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-cta-btn:hover,
.flowbie-chat-widget .fcw-cta-btn:hover,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-cta-btn:focus,
.flowbie-chat-widget .fcw-cta-btn:focus,
#flowbie-chat-widget-root.flowbie-chat-widget .fcw-cta-btn:visited,
.flowbie-chat-widget .fcw-cta-btn:visited,
#flowbie-chat-widget-root.flowbie-chat-widget button.fcw-cta-btn:hover,
.flowbie-chat-widget button.fcw-cta-btn:hover,
#flowbie-chat-widget-root.flowbie-chat-widget button.fcw-cta-btn:focus,
.flowbie-chat-widget button.fcw-cta-btn:focus {
	background: var(--fcw-button-hover, #2563eb) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	text-decoration: none !important;
}

#flowbie-chat-widget-root.flowbie-chat-widget .fcw-user-bubble,
.flowbie-chat-widget .fcw-user-bubble {
	background: var(--fcw-user-bubble-bg, #3b82f6) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

.flowbie-chat-widget.flowbie-chat--sidebar .fai-sidebar-panel__toolbar {
	padding: 10px 14px;
	min-height: 44px;
	border-bottom: 1px solid #f1f5f9;
	flex-shrink: 0;
}

/* Mobile only: forced launcher + toolbar inset (loads after shell CSS). */
@media (max-width: 767px) {
	#flowbie-chat-widget-root.flowbie-chat-widget.flowbie-chat--standalone-launcher.fai-sidebar-root,
	.flowbie-chat-widget.flowbie-chat--standalone-launcher.fai-sidebar-root {
		position: fixed !important;
		top: auto !important;
		bottom: 0 !important;
		left: auto !important;
		right: 0 !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
	}

	.flowbie-chat-widget.flowbie-chat--sidebar.fai-sidebar-root--transition-slide:not(.fai-sidebar-root--open) .fai-sidebar-panel {
		transform: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	#flowbie-chat-widget-root.flowbie-chat-widget .fai-sidebar-launcher.fcw-launcher,
	.flowbie-chat-widget .fai-sidebar-launcher.fcw-launcher {
		position: fixed !important;
		top: auto !important;
		transform: none !important;
		bottom: 16px !important;
	}

	#flowbie-chat-widget-root.flowbie-chat-widget.fai-sidebar-root--right .fcw-launcher,
	.flowbie-chat-widget.fai-sidebar-root--right .fcw-launcher {
		right: 16px !important;
		left: auto !important;
	}

	#flowbie-chat-widget-root.flowbie-chat-widget.fai-sidebar-root--left .fcw-launcher,
	.flowbie-chat-widget.fai-sidebar-root--left .fcw-launcher {
		left: 16px !important;
		right: auto !important;
	}

	.flowbie-chat-widget.flowbie-chat--sidebar.fai-sidebar-root--right .fai-sidebar-panel__toolbar {
		padding-right: 16px !important;
	}

	.flowbie-chat-widget.flowbie-chat--sidebar.fai-sidebar-root--left .fai-sidebar-panel__toolbar {
		padding-left: 16px !important;
	}
}
