/*
 * Site assistant panel (session 5). Sizes, colours and texts from the approved prototype,
 * docs/assistant/prototype/ (boards 2 and 6 to 11). Loaded only for a visitor who sees the widget
 * (includes/assistant/widget.php). Every selector is prefixed .rfi-asst so nothing leaks into the
 * page. Touch targets are at least 44px.
 */
.rfi-asst-launch,
.rfi-asst,
.rfi-asst-block {
	--asst-navy: #17325C;
	--asst-blue: #1D5FD1;
	--asst-launch: #2A5DB0;
	--asst-ink: #1A1F29;
	--asst-ink-2: #3D4654;
	--asst-ink-3: #5A6372;
	--asst-line: #E3E7EE;
	--asst-line-2: #C9D2DE;
	--asst-ground: #FAFBFC;
	--asst-soft: #F5F7FA;
	--asst-ctx: #EEF2F8;
	--asst-ok-bg: #EAF3EC;
	--asst-ok-ink: #1E5B2E;
	--asst-warn-bg: #FBF0E4;
	--asst-warn-ink: #6B4410;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- corner button: variant C, a 52px circle (owner 2026-11-26) ------------------- */
/* Printed with [hidden] (cookie rule, assistant-panel.js reveals it); display:inline-flex below would
   beat the attribute, so [hidden] carries its own display:none. The label stays in the DOM, and the
   script keeps aria-label in sync with it, but it takes no width at rest; on a desktop with a fine
   pointer it slides out once per tab (.is-peek, 4 seconds). */
.rfi-asst-launch {
	position: fixed; right: 20px; bottom: 20px; z-index: 1000;
	min-width: 52px; height: 52px; padding: 0 17px; box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center; gap: 0;
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1;
	color: #FFFFFF; background: var(--asst-launch); border: 0; border-radius: 26px;
	box-shadow: 0 6px 18px rgba(42, 93, 176, .35); cursor: pointer;
	transition: gap .35s ease, padding .35s ease;
}
.rfi-asst-launch[hidden] { display: none !important; }
.rfi-asst-launch:hover { background: var(--asst-navy); }
.rfi-asst-launch:focus-visible { outline: 3px solid #FFB020; outline-offset: 3px; }
.rfi-asst-launch__icon { width: 18px; height: 18px; flex: none; }
.rfi-asst-launch__label {
	display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
	transition: max-width .45s ease, opacity .3s ease;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
	.rfi-asst-launch.is-peek { gap: 10px; padding: 0 22px 0 17px; }
	.rfi-asst-launch.is-peek .rfi-asst-launch__label { max-width: 220px; opacity: 1; }
}
/* "Continue chat": the green dot sits on the ring of the circle. */
.rfi-asst-launch__dot {
	position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 6px;
	background: #6FE3B8; box-shadow: 0 0 0 2px #FFFFFF;
}
.rfi-asst-launch__dot[hidden] { display: none; }
/* Open: the speech icon hides and the circle shows a close cross. */
.rfi-asst-launch[aria-expanded="true"] .rfi-asst-launch__icon { display: none; }
.rfi-asst-launch[aria-expanded="true"]::before {
	content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
body:has(.rfi-asst-launch:not([hidden])) { padding-bottom: 76px; }

/* ---- panel (board 6: 400 x 640, page stays visible) ------------------------------- */
.rfi-asst {
	position: fixed; right: 24px; bottom: 92px; z-index: 1001;
	width: 400px; height: 640px; max-height: calc(100vh - 116px); box-sizing: border-box;
	display: flex; flex-direction: column; overflow: hidden;
	background: #FFFFFF; color: var(--asst-ink);
	border-radius: 14px; box-shadow: 0 16px 48px rgba(15, 26, 45, .28);
	font-size: 14px; line-height: 1.5;
}
.rfi-asst[hidden] { display: none; }
.rfi-asst *, .rfi-asst *::before, .rfi-asst *::after { box-sizing: border-box; }
.rfi-asst a { color: var(--asst-blue); }
.rfi-asst a:hover { color: var(--asst-navy); }
.rfi-asst :focus-visible { outline: 3px solid #FFB020; outline-offset: 2px; }
.rfi-asst button { font: inherit; }

.rfi-asst__head {
	flex: none; padding: 12px 10px 12px 18px;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	background: var(--asst-navy); color: #FFFFFF;
}
.rfi-asst__title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
/* A 44px-tall target without making the header taller: the negative margin gives the height back. */
.rfi-asst__head a.rfi-asst__contact { font-size: 12px; color: #C9D6EA; display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0 -14px; }
.rfi-asst__head a.rfi-asst__contact:hover { color: #FFFFFF; }
.rfi-asst__tools { display: flex; align-items: center; gap: 4px; flex: none; }
.rfi-asst__new {
	min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center;
	font-size: 12px; font-weight: 600; color: #FFFFFF; background: transparent; border: 0; cursor: pointer;
}
.rfi-asst__new span { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; background: rgba(255, 255, 255, .16); border-radius: 6px; }
.rfi-asst__new:hover span { background: rgba(255, 255, 255, .28); }
.rfi-asst__new[hidden] { display: none; }
.rfi-asst__close {
	width: 44px; height: 44px; border: 0; background: transparent; color: #FFFFFF; cursor: pointer;
	display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.rfi-asst__close:hover { background: rgba(255, 255, 255, .12); }

.rfi-asst__body {
	flex: 1; min-height: 0; overflow-y: auto; padding: 16px;
	display: flex; flex-direction: column; gap: 12px; background: var(--asst-ground);
}
.rfi-asst__intro { margin: 0; color: var(--asst-ink-2); }
.rfi-asst__ctx { padding: 8px 10px; font-size: 12px; color: var(--asst-ink-3); background: var(--asst-ctx); border-radius: 6px; }
.rfi-asst__starters { display: flex; flex-direction: column; gap: 8px; }
.rfi-asst__starter {
	min-height: 44px; padding: 10px 12px; text-align: left; font-size: 14px; color: var(--asst-navy);
	background: #FFFFFF; border: 1px solid var(--asst-line-2); border-radius: 8px; cursor: pointer;
}
.rfi-asst__starter:hover { border-color: var(--asst-navy); }
.rfi-asst a.rfi-asst__team {
	min-height: 44px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between;
	font-size: 14px; font-weight: 600; color: #FFFFFF; background: var(--asst-launch); border-radius: 8px; text-decoration: none;
}
.rfi-asst a.rfi-asst__team:hover { background: var(--asst-navy); color: #FFFFFF; }

/* messages */
.rfi-asst__q {
	align-self: flex-end; max-width: 85%; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere;
	background: var(--asst-navy); color: #FFFFFF; border-radius: 12px 12px 4px 12px; line-height: 1.45;
}
.rfi-asst__a {
	padding: 12px 14px; background: #FFFFFF; border: 1px solid var(--asst-line); border-radius: 12px 12px 12px 4px;
	display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere;
}
.rfi-asst__text p { margin: 0 0 8px; }
.rfi-asst__text p:last-child { margin-bottom: 0; }
.rfi-asst__note { font-size: 12px; color: var(--asst-ink-3); }
.rfi-asst a.rfi-asst__link {
	display: flex; flex-direction: column; justify-content: center; min-height: 44px;
	padding: 8px 10px; border: 1px solid var(--asst-line); border-radius: 8px; text-decoration: none;
}
.rfi-asst a.rfi-asst__link:hover { border-color: var(--asst-line-2); }
.rfi-asst__link-t { display: block; font-size: 14px; font-weight: 600; }
.rfi-asst__link-s, .rfi-asst__co-s { display: block; font-size: 12px; color: var(--asst-ink-3); }
.rfi-asst__co {
	padding: 8px 10px; border: 1px solid var(--asst-line); border-radius: 8px;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rfi-asst__co a { text-decoration: none; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.rfi-asst__ok:focus, .rfi-asst__warn:focus, .rfi-asst__thanks:focus { outline: none; }
.rfi-asst__co-t { display: block; font-size: 14px; font-weight: 600; }
/* "Partner" label (owner, 2026-11-25): Silver and higher, plan active today. */
.rfi-asst__partner {
	display: inline-block; margin-left: 6px; padding: 1px 6px; vertical-align: 1px;
	font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: .02em;
	color: #6B4410; background: #FBF0E4; border: 1px solid #EBCB9E; border-radius: 4px;
}
.rfi-asst__btn-o {
	flex: none; min-height: 44px; padding: 0 12px; font-size: 13px; font-weight: 600;
	color: var(--asst-blue); background: #FFFFFF; border: 1px solid var(--asst-blue); border-radius: 6px; cursor: pointer;
}
.rfi-asst__btn-o[aria-expanded="true"] { color: #FFFFFF; background: var(--asst-blue); }
.rfi-asst__btn, .rfi-asst a.rfi-asst__btn {
	align-self: flex-start; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center;
	font-size: 14px; font-weight: 600; color: #FFFFFF; background: var(--asst-launch); border: 0; border-radius: 6px;
	cursor: pointer; text-decoration: none;
}
.rfi-asst__btn:hover, .rfi-asst a.rfi-asst__btn:hover { background: var(--asst-navy); color: #FFFFFF; }

/* forms (boards 9, 10) */
.rfi-asst__form { padding: 10px; background: var(--asst-soft); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.rfi-asst__form-t { margin: 0; font-size: 13px; font-weight: 600; color: var(--asst-navy); }
.rfi-asst__field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--asst-ink-2); }
.rfi-asst__field input, .rfi-asst__field textarea, .rfi-asst__fb textarea {
	width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--asst-ink);
	background: #FFFFFF; border: 1px solid var(--asst-line-2); border-radius: 6px;
}
.rfi-asst__field textarea, .rfi-asst__fb textarea { min-height: 64px; resize: vertical; }
.rfi-asst__field input[aria-invalid="true"], .rfi-asst__field textarea[aria-invalid="true"] { border-color: #B32D2E; }
.rfi-asst__submit {
	min-height: 44px; font-size: 14px; font-weight: 600; color: #FFFFFF; background: var(--asst-blue);
	border: 0; border-radius: 6px; cursor: pointer;
}
.rfi-asst__submit[disabled] { opacity: .6; cursor: progress; }
.rfi-asst__legal { margin: 0; font-size: 11px; color: var(--asst-ink-3); }
.rfi-asst__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.rfi-asst__ok { padding: 10px; background: var(--asst-ok-bg); border-radius: 8px; font-size: 13px; color: var(--asst-ok-ink); }
.rfi-asst__ok strong { display: block; }
.rfi-asst__warn { padding: 10px; background: var(--asst-warn-bg); border-radius: 8px; font-size: 13px; color: var(--asst-warn-ink); }

/* rating (board 11) */
.rfi-asst__rate { padding-top: 8px; border-top: 1px solid #EEF1F5; display: flex; flex-direction: column; gap: 8px; }
.rfi-asst__rate-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--asst-ink-3); }
.rfi-asst__thumb {
	width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	color: var(--asst-ink-2); background: #FFFFFF; border: 1px solid var(--asst-line-2); border-radius: 8px; cursor: pointer;
}
.rfi-asst__thumb[aria-pressed="true"] { color: var(--asst-blue); border-color: var(--asst-blue); background: #EEF4FF; }
.rfi-asst__thumb[disabled] { cursor: default; }
.rfi-asst__fb { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--asst-ink-2); }
.rfi-asst__fb-send {
	align-self: flex-start; min-height: 44px; padding: 0 14px; font-size: 13px; font-weight: 600;
	color: var(--asst-blue); background: #FFFFFF; border: 1px solid var(--asst-blue); border-radius: 6px; cursor: pointer;
}
.rfi-asst__thanks { font-size: 12px; color: var(--asst-ok-ink); }

/* typing, counter, limit, error */
.rfi-asst__typing { display: flex; gap: 4px; padding: 6px 2px; }
.rfi-asst__typing span { width: 8px; height: 8px; border-radius: 4px; background: #A9B6C9; animation: rfi-asst-blink 1.2s infinite ease-in-out; }
.rfi-asst__typing span:nth-child(2) { animation-delay: .2s; }
.rfi-asst__typing span:nth-child(3) { animation-delay: .4s; }
@keyframes rfi-asst-blink { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rfi-asst__typing span { animation: none; } }
.rfi-asst__left { font-size: 12px; color: var(--asst-ink-3); }
.rfi-asst__limit { padding: 16px; background: #FFFFFF; border: 1px solid var(--asst-line-2); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.rfi-asst__limit-t { margin: 0; font-size: 16px; font-weight: 600; color: var(--asst-navy); }
.rfi-asst__limit p { margin: 0; color: var(--asst-ink-2); }
.rfi-asst a.rfi-asst__limit-reg {
	min-height: 48px; display: flex; align-items: center; justify-content: center;
	font-size: 15px; font-weight: 600; color: #FFFFFF; background: var(--asst-blue); border-radius: 8px; text-decoration: none;
}
.rfi-asst a.rfi-asst__limit-in { text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.rfi-asst__err { padding: 10px 12px; background: var(--asst-warn-bg); border-radius: 8px; color: var(--asst-warn-ink); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* input */
.rfi-asst__foot { flex: none; padding: 10px 12px; border-top: 1px solid var(--asst-line); display: flex; gap: 8px; background: #FFFFFF; }
.rfi-asst__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.rfi-asst__input {
	flex: 1; min-width: 0; height: 44px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--asst-ink);
	background: #FFFFFF; border: 1px solid var(--asst-line-2); border-radius: 8px;
}
.rfi-asst__input[disabled] { color: var(--asst-ink-3); background: var(--asst-soft); border-color: #D5DCE6; }
.rfi-asst__send {
	flex: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: var(--asst-blue); color: #FFFFFF;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.rfi-asst__send[disabled] { background: #A9B6C9; cursor: default; }
.rfi-asst__ts:empty { display: none; }
.rfi-asst__ts { padding: 0 12px 8px; background: #FFFFFF; }
/* privacy line under the input (2026-11-25); the link never splits across lines */
.rfi-asst__foot:has(+ .rfi-asst__privacy) { padding-bottom: 6px; }
.rfi-asst__privacy { flex: none; margin: 0; padding: 0 12px 10px; font-size: 11px; line-height: 1.4; color: var(--asst-ink-3); background: #FFFFFF; }
.rfi-asst__privacy a { white-space: nowrap; }

/* ---- mobile (board 2): full screen, white header ------------------------------------ */
@media (max-width: 767px) {
	.rfi-asst { inset: 0; right: 0; bottom: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; font-size: 15px; }
	.rfi-asst__head { min-height: 60px; padding: 0 8px 0 16px; background: #FFFFFF; color: var(--asst-navy); border-bottom: 1px solid var(--asst-line); }
	.rfi-asst__head a.rfi-asst__contact { color: var(--asst-blue); }
	.rfi-asst__new span { color: var(--asst-navy); background: var(--asst-ctx); }
	.rfi-asst__new:hover span { background: #DDE5F1; }
	.rfi-asst__close { color: var(--asst-ink-2); }
	.rfi-asst__close:hover { background: var(--asst-soft); }
	.rfi-asst__body { gap: 14px; }
	.rfi-asst__q { padding: 10px 14px; border-radius: 14px 14px 4px 14px; }
	.rfi-asst__a { padding: 14px 16px; border-radius: 14px 14px 14px 4px; }
	.rfi-asst__foot { padding: 12px 16px 24px; }
	.rfi-asst__foot:has(+ .rfi-asst__privacy) { padding-bottom: 6px; }
	.rfi-asst__privacy { padding: 0 16px 20px; font-size: 12px; }
	.rfi-asst__input, .rfi-asst__send { height: 48px; font-size: 15px; }
	.rfi-asst__send { width: 48px; }
	html.rfi-asst-lock, html.rfi-asst-lock body { overflow: hidden; }
	.rfi-asst-launch { right: 16px; bottom: 16px; }
	html.rfi-asst-lock .rfi-asst-launch { display: none; }
}

/* ---- "Ask about this topic" (board 7) ------------------------------------------------ */
/* Same reading measure and centring as its neighbours (.rfi-article__source, .rfi-tagrow in the
   theme's article.css); 720px if the theme token is missing. */
.rfi-asst-block { box-sizing: border-box; max-width: var(--rfi-measure, 720px); margin: 28px auto; padding: 22px 24px; border: 1px solid #D5DCE6; border-radius: 12px; background: var(--asst-soft); }
.rfi-asst-block__title { margin: 0; font-size: 18px; font-weight: 600; color: var(--asst-navy); line-height: 1.3; }
.rfi-asst-block__list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rfi-asst-block__q {
	min-height: 44px; padding: 11px 16px; text-align: left; font: inherit; font-size: 15px; line-height: 1.4;
	color: var(--asst-navy); background: #FFFFFF; border: 1px solid var(--asst-line-2); border-radius: 8px; cursor: pointer;
}
.rfi-asst-block__q:hover { border-color: var(--asst-navy); }
.rfi-asst-block__q[aria-pressed="true"] { color: #FFFFFF; background: var(--asst-navy); border-color: var(--asst-navy); }
.rfi-asst-block__q:focus-visible { outline: 3px solid #FFB020; outline-offset: 2px; }
@media (max-width: 767px) { .rfi-asst-block { max-width: 100%; padding: 18px 16px; } }
