/* Website assistant (public/assistant.js). Every colour is set on the widget's own elements, so the page's light and
   dark themes cannot change it. Sits above the contextual CTA panel (z-index 60) and below the cookie banner (10000). */
#tha-assistant { position: static; }
.tha-asst-launcher {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 70;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 52px;
	padding: 0 20px 0 16px;
	border: 0;
	border-radius: 26px;
	background: #087d78;
	color: #ffffff;
	font: 600 1rem/1 inherit;
	font-family: inherit;
	box-shadow: 0 10px 28px rgba(7, 21, 34, .32);
	cursor: pointer;
}
.tha-asst-launcher:hover { background: #056964; }
.tha-asst-launcher:focus-visible,
.tha-asst-close:focus-visible,
.tha-asst-chip:focus-visible,
.tha-asst-send:focus-visible,
.tha-asst-link:focus-visible,
.tha-asst-input:focus-visible,
.tha-asst-log:focus-visible { outline: 3px solid #c7a363; outline-offset: 2px; }

.tha-asst-panel {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 70;
	display: flex;
	flex-direction: column;
	width: min(390px, calc(100vw - 32px));
	height: min(620px, calc(100vh - 32px));
	height: min(620px, calc(100dvh - 32px));
	overflow: hidden;
	border: 1px solid #d7e4ea;
	border-radius: 16px;
	background: #ffffff;
	color: #173449;
	font-family: inherit;
	font-size: .95rem;
	line-height: 1.5;
	box-shadow: 0 18px 48px rgba(7, 21, 34, .32);
}
.tha-asst-panel[hidden] { display: none; }
.tha-asst-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 18px; background: #102b40; color: #ffffff; }
.tha-asst-title { margin: 0; color: #ffffff; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.tha-asst-sub { margin: 2px 0 0; color: #e3c78d; font-size: .8rem; line-height: 1.3; }
.tha-asst-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #ffffff; cursor: pointer; }
.tha-asst-close:hover { background: rgba(255, 255, 255, .14); }

.tha-asst-log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 8px; overflow-y: auto; overscroll-behavior: contain; background: #f4f9fc; }
.tha-asst-msg { max-width: 92%; padding: 11px 14px; border-radius: 14px; }
.tha-asst-msg p { margin: 0 0 8px; color: inherit; }
.tha-asst-msg p:last-child { margin-bottom: 0; }
.tha-asst-bot { align-self: flex-start; border: 1px solid #d7e4ea; border-top-left-radius: 4px; background: #ffffff; color: #173449; }
.tha-asst-user { align-self: flex-end; border-top-right-radius: 4px; background: #087d78; color: #ffffff; }
.tha-asst-lines { white-space: pre-line; }
.tha-asst-links { display: grid; gap: 8px; margin-top: 10px; }
.tha-asst-link { display: block; padding: 10px 14px; border: 1px solid #087d78; border-radius: 10px; background: #ffffff; color: #056964; font-weight: 600; text-decoration: none; }
.tha-asst-link:hover { background: #e3f1f2; }

.tha-asst-chips { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; max-height: 176px; padding: 8px 16px 12px; overflow-y: auto; background: #f4f9fc; }
.tha-asst-chips:empty { display: none; }
.tha-asst-chip { min-height: 44px; padding: 8px 14px; border: 1px solid #b9ccd6; border-radius: 22px; background: #ffffff; color: #173449; font: 600 .88rem/1.25 inherit; font-family: inherit; cursor: pointer; }
.tha-asst-chip:hover { border-color: #087d78; background: #e3f1f2; }

.tha-asst-form { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #d7e4ea; background: #ffffff; }
.tha-asst-input { flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid #9fb6c3; border-radius: 23px; background: #ffffff; color: #173449; font: inherit; font-size: 1rem; }
.tha-asst-input::placeholder { color: #5b7282; }
.tha-asst-send { min-height: 46px; padding: 0 18px; border: 0; border-radius: 23px; background: #087d78; color: #ffffff; font: 600 .95rem/1 inherit; font-family: inherit; cursor: pointer; }
.tha-asst-send:hover { background: #056964; }
.tha-asst-foot { margin: 0; padding: 0 16px 12px; background: #ffffff; color: #4a6272; font-size: .76rem; line-height: 1.4; }

/* The launcher and the contextual CTA panel share the corner: the CTA panel moves up, and hides while the assistant is open. */
html.tha-asst-on .tha-cta-panel { bottom: 84px; }
html.tha-asst-open .tha-cta-panel,
html.tha-asst-open .tha-asst-launcher { display: none; }

@media (max-width: 560px) {
	.tha-asst-launcher { right: 12px; bottom: 12px; padding: 0 16px 0 14px; }
	.tha-asst-panel { right: 8px; bottom: 8px; left: 8px; width: auto; height: min(640px, calc(100vh - 16px)); height: min(640px, calc(100dvh - 16px)); }
	html.tha-asst-on .tha-cta-panel { bottom: 76px; }
}
@media (prefers-reduced-motion: no-preference) {
	.tha-asst-panel:not([hidden]) { animation: tha-asst-in .16s ease-out; }
	@keyframes tha-asst-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media print { #tha-assistant { display: none; } }
