/* Sash – Banbury Windows chat assistant */
#bw-sash {
	--bw-blue: #1e2a40;
	--bw-cta: #8cc5cf;
	--bw-red: #e14d42;
	--bw-black: #000;
	--bw-white: #fff;
	--bw-tint: #eaf5f7;
	--bw-line: #d3e7ec;
	--bw-glass: #f5fafb;
	--bw-offset-x: 20px;
	--bw-offset-y: 20px;
	position: fixed;
	left: var(--bw-offset-x);
	bottom: var(--bw-offset-y);
	z-index: 99990;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--bw-black);
	text-align: left;
}
#bw-sash *,
#bw-sash *::before,
#bw-sash *::after { box-sizing: border-box; }
#bw-sash [hidden] { display: none !important; }

/* Neutralise theme button/input styles */
#bw-sash button,
#bw-sash input,
#bw-sash select,
#bw-sash textarea {
	font: inherit;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	min-height: 0;
	line-height: 1.3;
}
#bw-sash button { cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }
#bw-sash svg { display: block; }
#bw-sash :focus { outline: none; }
#bw-sash :focus-visible { outline: 3px solid var(--bw-cta); outline-offset: 2px; }
.bw-sash__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Dock: launcher + speech bubble ---------- */
.bw-sash__dock { position: relative; display: flex; align-items: center; }

#bw-sash .bw-sash__launcher {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	box-shadow: 0 8px 22px rgba(30, 42, 64, .32);
	transition: transform .18s ease;
}
#bw-sash .bw-sash__launcher:hover { transform: translateY(-2px); }
.bw-sash__launcher-avatar { width: 64px; height: 64px; }

.bw-sash__badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--bw-red);
	color: var(--bw-white);
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	border: 2px solid var(--bw-white);
}
#bw-sash[data-opened="1"] .bw-sash__badge { display: none; }

.bw-sash__nudge {
	position: absolute;
	left: 78px;
	bottom: 10px;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 4px 4px 0;
	background: var(--bw-white);
	border: 2px solid var(--bw-blue);
	border-radius: 14px 14px 14px 4px;
	box-shadow: 0 6px 18px rgba(30, 42, 64, .18);
	white-space: nowrap;
	animation: bw-sash-pop .28s ease-out both;
}
.bw-sash__nudge::before {
	content: "";
	position: absolute;
	left: -9px;
	bottom: 8px;
	border-width: 7px 9px 7px 0;
	border-style: solid;
	border-color: transparent var(--bw-blue) transparent transparent;
}
.bw-sash__nudge::after {
	content: "";
	position: absolute;
	left: -5px;
	bottom: 10px;
	border-width: 5px 6px 5px 0;
	border-style: solid;
	border-color: transparent var(--bw-white) transparent transparent;
}
#bw-sash .bw-sash__nudge-text {
	padding: 7px 4px 7px 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--bw-blue);
}
#bw-sash .bw-sash__nudge-close {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--bw-blue);
}
#bw-sash .bw-sash__nudge-close:hover { background: var(--bw-tint); }
.bw-sash__nudge-close svg { width: 10px; height: 10px; }

@keyframes bw-sash-pop {
	from { opacity: 0; transform: translateX(-6px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Panel ---------- */
.bw-sash__panel {
	position: absolute;
	left: 0;
	bottom: 80px;
	width: 372px;
	height: min(620px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: var(--bw-white);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 18px 50px rgba(30, 42, 64, .28);
	transform-origin: bottom left;
	animation: bw-sash-open .2s ease-out both;
}
@keyframes bw-sash-open {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to { opacity: 1; transform: none; }
}

.bw-sash__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 12px 14px 16px;
	background: var(--bw-blue);
	color: var(--bw-white);
	border-bottom: 4px solid var(--bw-cta);
}
.bw-sash__head-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--bw-cta); }
.bw-sash__head-text { flex: 1; min-width: 0; }
#bw-sash .bw-sash__title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--bw-white);
	text-transform: none;
	letter-spacing: normal;
}
#bw-sash .bw-sash__subtitle {
	margin: 2px 0 0;
	font-size: 12.5px;
	line-height: 1.3;
	color: #cfe7ec;
}
#bw-sash .bw-sash__head-call {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--bw-cta);
	color: var(--bw-blue);
	flex: none;
	text-decoration: none;
}
.bw-sash__head-call svg { width: 18px; height: 18px; }
#bw-sash .bw-sash__close {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--bw-white);
	flex: none;
}
#bw-sash .bw-sash__close:hover { background: rgba(255, 255, 255, .12); }
.bw-sash__close svg { width: 13px; height: 13px; }

/* ---------- Conversation ---------- */
.bw-sash__log {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 14px 8px;
	background: var(--bw-glass);
}
.bw-sash__msg {
	max-width: 88%;
	margin: 0 0 10px;
	padding: 10px 13px;
	font-size: 14.5px;
	line-height: 1.5;
	word-wrap: break-word;
}
.bw-sash__msg p { margin: 0 0 6px; }
.bw-sash__msg p:last-child { margin-bottom: 0; }
.bw-sash__msg strong { font-weight: 700; }
.bw-sash__msg ul { margin: 6px 0 0; padding-left: 18px; }
.bw-sash__msg li { margin: 0 0 3px; }
.bw-sash__msg--bot {
	background: var(--bw-white);
	border: 1px solid var(--bw-line);
	border-radius: 4px 14px 14px 14px;
	color: var(--bw-black);
}
.bw-sash__msg--user {
	margin-left: auto;
	background: var(--bw-blue);
	color: var(--bw-white);
	border-radius: 14px 4px 14px 14px;
}
.bw-sash__msg a { color: var(--bw-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.bw-sash__links { margin-top: 8px; display: grid; gap: 6px; }
#bw-sash .bw-sash__link {
	display: block;
	padding: 8px 11px;
	border-radius: 8px;
	background: var(--bw-tint);
	border-left: 3px solid var(--bw-cta);
	color: var(--bw-blue);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background .15s ease;
}
#bw-sash .bw-sash__link:hover { background: var(--bw-cta); }

.bw-sash__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
#bw-sash .bw-sash__chip {
	padding: 7px 12px;
	border: 1.5px solid var(--bw-cta);
	border-radius: 999px;
	background: var(--bw-white);
	color: var(--bw-blue);
	font-size: 13.5px;
	font-weight: 600;
	transition: background .15s ease;
}
#bw-sash .bw-sash__chip:hover { background: var(--bw-tint); }
#bw-sash .bw-sash__chip--primary { background: var(--bw-cta); }
#bw-sash .bw-sash__chip--primary:hover { background: #7ab8c3; }

.bw-sash__typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bw-sash__typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bw-cta);
	animation: bw-sash-blink 1s infinite ease-in-out;
}
.bw-sash__typing span:nth-child(2) { animation-delay: .15s; }
.bw-sash__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bw-sash-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ---------- Callback form ---------- */
.bw-sash__msg--form { max-width: 100%; width: 100%; }
.bw-sash__form { display: grid; gap: 9px; margin-top: 8px; }
.bw-sash__field label { display: block; font-size: 13px; font-weight: 700; color: var(--bw-blue); margin-bottom: 3px; }
.bw-sash__field label .req { color: var(--bw-red); }
#bw-sash .bw-sash__field input,
#bw-sash .bw-sash__field select,
#bw-sash .bw-sash__field textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1.5px solid var(--bw-line);
	border-radius: 8px;
	background: var(--bw-white);
	color: var(--bw-black);
	font-size: 14.5px;
}
#bw-sash .bw-sash__field textarea { resize: vertical; min-height: 64px; }
#bw-sash .bw-sash__field input:focus,
#bw-sash .bw-sash__field select:focus,
#bw-sash .bw-sash__field textarea:focus { border-color: var(--bw-blue); }
.bw-sash__row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.bw-sash__field.is-error input,
.bw-sash__field.is-error select { border-color: var(--bw-red) !important; }
.bw-sash__err { display: none; margin-top: 3px; font-size: 12.5px; color: #b3261e; }
.bw-sash__field.is-error .bw-sash__err { display: block; }
.bw-sash__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
#bw-sash .bw-sash__consent input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--bw-blue); }
.bw-sash__consent.is-error { color: #b3261e; }
.bw-sash__hp { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }
#bw-sash .bw-sash__submit {
	padding: 11px 14px;
	border-radius: 10px;
	background: var(--bw-cta);
	color: var(--bw-blue);
	font-weight: 700;
	font-size: 15px;
	text-align: center;
}
#bw-sash .bw-sash__submit:hover { background: #7ab8c3; }
#bw-sash .bw-sash__submit[disabled] { opacity: .6; cursor: progress; }
.bw-sash__form-note {
	margin: 0;
	padding: 8px 10px;
	border-left: 3px solid var(--bw-red);
	background: #fdf0ef;
	font-size: 13px;
}

/* ---------- Compose ---------- */
.bw-sash__compose {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--bw-line);
	background: var(--bw-white);
	margin: 0;
}
#bw-sash .bw-sash__text {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1.5px solid var(--bw-line);
	border-radius: 10px;
	background: var(--bw-white);
	color: var(--bw-black);
	font-size: 15px;
}
#bw-sash .bw-sash__text:focus { border-color: var(--bw-blue); }
#bw-sash .bw-sash__send {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: var(--bw-cta);
	color: var(--bw-blue);
	flex: none;
}
#bw-sash .bw-sash__send:hover { background: #7ab8c3; }
.bw-sash__send svg { width: 20px; height: 20px; }
#bw-sash .bw-sash__foot {
	margin: 0;
	padding: 0 12px 10px;
	background: var(--bw-white);
	font-size: 12.5px;
	color: #3c4658;
	text-align: center;
}
.bw-sash__foot a { color: var(--bw-blue); font-weight: 700; text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	/* Lifted to clear the site's sticky Call / Quote / Directions bar. */
	#bw-sash { --bw-offset-x: 12px; --bw-offset-y: 84px; }
	#bw-sash .bw-sash__launcher,
	.bw-sash__launcher-avatar { width: 56px; height: 56px; }
	.bw-sash__nudge { left: 68px; bottom: 6px; }
	.bw-sash__panel {
		position: fixed;
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		height: auto;
		top: 8px;
		max-height: none;
		border-radius: 14px;
	}
	#bw-sash[data-state="open"] .bw-sash__dock { display: none; }
	#bw-sash .bw-sash__text { font-size: 16px; } /* stops iOS zoom */
}

@media (prefers-reduced-motion: reduce) {
	.bw-sash__panel,
	.bw-sash__nudge,
	.bw-sash__typing span { animation: none !important; }
	#bw-sash .bw-sash__launcher { transition: none; }
}
