/* Fiery Studio website assistant. Colours come from the theme tokens, with fallbacks. */
.bnas {
	--bnas-navy: var(--navy, #0B1F3A);
	--bnas-cobalt: var(--cobalt, #1E63D6);
	--bnas-mist: var(--mist, #EEF5FC);
	--bnas-slate: var(--slate, #4A5F7A);
	--bnas-sky: var(--sky, #7CC6FF);
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9990;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.45;
	color: var(--bnas-navy);
}
.bnas *,
.bnas *::before,
.bnas *::after { box-sizing: border-box; }
.bnas [hidden] { display: none !important; }

.bnas-launch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--bnas-cobalt);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 0 0 2px #fff, 0 8px 24px rgba(11, 31, 58, .35);
	transition: transform .15s ease, box-shadow .15s ease;
}
/* Concept pages carry their own button resets; keep the launcher readable on every page. */
html body .bnas .bnas-launch { background: #1E63D6 !important; color: #fff !important; }
html body .bnas .bnas-launch span,
html body .bnas .bnas-launch svg { color: #fff !important; }
.bnas-launch:hover { transform: translateY(-1px); }
.bnas-launch:focus-visible,
.bnas-x:focus-visible,
.bnas-chip:focus-visible,
.bnas-send:focus-visible,
.bnas-input:focus-visible,
.bnas-log:focus-visible {
	outline: 3px solid var(--bnas-sky);
	outline-offset: 2px;
}

.bnas-panel {
	display: flex;
	flex-direction: column;
	width: min(380px, calc(100vw - 32px));
	height: min(600px, calc(100dvh - 32px));
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(11, 31, 58, .12), 0 20px 60px rgba(11, 31, 58, .35);
}

.bnas-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--bnas-navy);
	color: #fff;
}
.bnas-title { margin: 0; font-weight: 700; }
.bnas-sub { margin: 2px 0 0; font-size: .85rem; color: #D6E4F5; }
.bnas-x {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: -6px -8px 0 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
.bnas-x:hover { background: rgba(255, 255, 255, .14); }

.bnas-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: var(--bnas-mist);
	display: flex;
	flex-direction: column;
	gap: 10px;
	overscroll-behavior: contain;
}
.bnas-msg { display: flex; }
.bnas-user { justify-content: flex-end; }
.bnas-bubble {
	max-width: 88%;
	padding: 10px 14px;
	border-radius: 16px;
	overflow-wrap: anywhere;
}
.bnas-bot .bnas-bubble { background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 0 0 1px rgba(11, 31, 58, .08); }
.bnas-user .bnas-bubble { background: var(--bnas-cobalt); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.bnas-bubble p { margin: 0 0 .6em; }
.bnas-bubble p:last-child,
.bnas-bubble ul:last-child { margin-bottom: 0; }
.bnas-bubble ul { margin: 0 0 .6em; padding-left: 1.2em; list-style: disc; }
.bnas-bubble li { margin: .2em 0; }
.bnas-bubble a { color: var(--bnas-cobalt); text-decoration: underline; text-underline-offset: 3px; }

.bnas-typing .bnas-bubble { display: flex; gap: 5px; padding: 14px 16px; }
.bnas-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bnas-slate);
	animation: bnas-bounce 1.2s infinite ease-in-out;
}
.bnas-dot:nth-child(2) { animation-delay: .15s; }
.bnas-dot:nth-child(3) { animation-delay: .3s; }
@keyframes bnas-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: .5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.bnas-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 12px;
	background: var(--bnas-mist);
}
.bnas-chip {
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--bnas-cobalt);
	border-radius: 999px;
	background: #fff;
	color: var(--bnas-cobalt);
	font: inherit;
	font-size: .92rem;
	font-weight: 600;
	cursor: pointer;
}
.bnas-chip:hover { background: var(--bnas-cobalt); color: #fff; }

.bnas-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid rgba(11, 31, 58, .12);
	background: #fff;
}
.bnas-input {
	flex: 1;
	min-width: 0;
	max-height: 120px;
	padding: 10px 12px;
	border: 1px solid #5d7189;
	border-radius: 12px;
	background: #fff;
	color: var(--bnas-navy);
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming the page on focus */
	resize: none;
}
.bnas-input:disabled { background: var(--bnas-mist); }
.bnas-send {
	flex: none;
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--bnas-cobalt);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.bnas-send:disabled { opacity: .55; cursor: default; }
.bnas-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.bnas-note {
	margin: 0;
	padding: 0 14px 10px;
	background: #fff;
	color: var(--bnas-slate);
	font-size: .78rem;
	line-height: 1.35;
}
.bnas-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 520px) {
	.bnas { right: 0; bottom: 0; left: 0; padding: 0 12px 12px; display: flex; justify-content: flex-end; }
	.bnas:has(.bnas-panel:not([hidden])) { padding: 0; }
	.bnas-panel { width: 100%; height: min(640px, 100dvh); border-radius: 18px 18px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
	.bnas-launch { transition: none; }
	.bnas-dot { animation: none; opacity: .8; }
}
