/**
 * Zenix AI Chat — visitor widget.
 *
 * Everything is scoped under .zac-root and namespaced .zac-* so a host theme
 * cannot restyle the widget and the widget cannot leak into the theme. Inputs
 * carry !important on colour and background because themes routinely restyle
 * every input on the page, which is what turns a dark form white.
 */

.zac-root {
	--zac-brand: #7c3aed;
	--zac-accent: #fbbf24;
	--zac-on-brand: #ffffff;
	--zac-surface: #15111f;
	--zac-surface-2: #241d36;
	--zac-text: #f4f2fb;
	--zac-muted: #a89fc4;
	--zac-border: rgba(255, 255, 255, 0.1);
	--zac-bubble: #272036;
	--zac-online: #22c55e;
	--zac-radius: 20px;
	--zac-ease: 200ms ease;

	/* Lifted clear of a theme's sticky bottom bar. Both are set from settings. */
	--zac-offset-bottom: 90px;
	--zac-offset-mobile: 104px;

	position: fixed;
	bottom: var(--zac-offset-bottom);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Bengali", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--zac-text);

	/*
	 * No transform on the root, ever. Any transform other than none makes this
	 * element the containing block for position:fixed descendants, which on
	 * mobile collapsed the full-screen panel into this little corner and made
	 * tapping the launcher look like the widget simply vanished. The entrance
	 * animation lives on the launcher instead.
	 */
	opacity: 0;
	pointer-events: none;
	transition: opacity 320ms ease;
}

.zac-root.is-ready {
	opacity: 1;
	pointer-events: auto;
}

.zac-root.zac-light {
	--zac-surface: #ffffff;
	--zac-surface-2: #f2f0fa;
	--zac-text: #16121f;
	--zac-muted: #6b6382;
	--zac-border: rgba(16, 24, 40, 0.12);
	--zac-bubble: #f1effa;
}

.zac-root.zac-right {
	right: 24px;
	align-items: flex-end;
}

.zac-root.zac-left {
	left: 24px;
	align-items: flex-start;
}

.zac-root *,
.zac-root *::before,
.zac-root *::after {
	box-sizing: border-box;
}

/*
 * Themes style every button and input on the page, which turns these controls
 * into the theme's own shapes and colours. :where() is used so this reset
 * carries no specificity at all and every component rule below still wins.
 */
.zac-root :where(button, textarea, input) {
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	appearance: none;
}

.zac-root :where(button) {
	min-width: 0;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	text-decoration: none;
	text-shadow: none;
	transform: none;
}

.zac-root :where(svg) {
	display: block;
	max-width: none;
	vertical-align: middle;
}

/*
 * Themes set their own colour on headings and paragraphs, which beats anything
 * inherited from a parent. Without this the panel title is dark text on a dark
 * header and simply disappears.
 */
.zac-root :where(h1, h2, h3, h4, p, span, strong, small, li, dt, dd) {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

/*
 * The browser's own [hidden] rule is display:none, but any author display rule
 * beats it. Without this a "hidden" panel keeps its 640px of layout and
 * swallows clicks across the screen.
 */
.zac-root [hidden] {
	display: none !important;
}

.zac-root :focus-visible {
	outline: 2px solid var(--zac-accent);
	outline-offset: 2px;
}

.zac-icon {
	display: inline-flex;
}

/* ------------------------------------------------------------- launcher */

.zac-launcher {
	display: flex;
	align-items: center;
	gap: 10px;
	transform: translateY(12px);
	transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.zac-root.is-ready .zac-launcher {
	transform: translateY(0);
}

.zac-left .zac-launcher {
	flex-direction: row-reverse;
}

.zac-pill {
	padding: 9px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--zac-brand);
	color: var(--zac-on-brand);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
	transition: transform var(--zac-ease);
}

.zac-pill:hover {
	transform: translateY(-2px);
}

.zac-root.is-open .zac-pill {
	display: none;
}

.zac-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--zac-accent);
	color: #1b1330;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(251, 191, 36, 0.34), 0 6px 18px rgba(0, 0, 0, 0.2);
	transition: transform var(--zac-ease), background var(--zac-ease), color var(--zac-ease);
	-webkit-tap-highlight-color: transparent;
}

.zac-button:hover {
	transform: translateY(-2px);
}

.zac-root.is-open .zac-button {
	background: var(--zac-brand);
	color: var(--zac-on-brand);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.zac-button__icon {
	display: inline-flex;
	transition: opacity var(--zac-ease), transform var(--zac-ease);
}

.zac-button__icon--close {
	position: absolute;
	opacity: 0;
	transform: rotate(-90deg);
}

.zac-root.is-open .zac-button__icon--open {
	opacity: 0;
	transform: rotate(90deg);
}

.zac-root.is-open .zac-button__icon--close {
	opacity: 1;
	transform: rotate(0deg);
}

/* Draws the eye when something is waiting. */
.zac-root.has-unread:not(.is-open) .zac-button::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--zac-accent);
	animation: zac-pulse 1.8s ease-out infinite;
	pointer-events: none;
}

@keyframes zac-pulse {
	0% {
		opacity: 0.7;
		transform: scale(0.86);
	}
	70%,
	100% {
		opacity: 0;
		transform: scale(1.4);
	}
}

.zac-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	border: 2px solid var(--zac-surface);
	background: #e41e3f;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

/* -------------------------------------------------------------- greeting */

.zac-greeting {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 280px;
	padding: 14px 40px 14px 16px;
	border: 1px solid var(--zac-border);
	border-radius: var(--zac-radius);
	background: var(--zac-surface);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity var(--zac-ease), transform var(--zac-ease);
}

.zac-greeting.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.zac-greeting__text {
	margin: 0;
	font-size: 14px;
}

.zac-greeting__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--zac-muted);
	cursor: pointer;
}

.zac-greeting__close:hover {
	background: var(--zac-surface-2);
	color: var(--zac-text);
}

/* ----------------------------------------------------------------- panel */

.zac-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 420px;
	height: 640px;
	max-height: calc(100vh - var(--zac-offset-bottom) - 96px);
	overflow: hidden;
	border: 1px solid var(--zac-border);
	border-radius: var(--zac-radius);
	background: var(--zac-surface);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	opacity: 0;
	transform: translateY(8px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity var(--zac-ease), transform var(--zac-ease);
}

.zac-left .zac-panel {
	transform-origin: bottom left;
}

.zac-panel.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

/* Big welcome header before the conversation starts. */
.zac-header {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 40px 28px 30px;
	background: var(--zac-brand);
	color: var(--zac-on-brand);
	transition: padding var(--zac-ease), background var(--zac-ease);
}

.zac-identity {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.zac-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.86);
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	overflow: hidden;
	transition: width var(--zac-ease), height var(--zac-ease);
}

.zac-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.zac-dot {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	border: 2px solid var(--zac-brand);
	background: var(--zac-online);
}

.zac-root .zac-title {
	margin: 0;
	color: var(--zac-on-brand) !important;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	transition: font-size var(--zac-ease);
}

.zac-root .zac-subtitle {
	margin: 4px 0 0;
	color: var(--zac-on-brand) !important;
	font-size: 15px;
	font-weight: 600;
	opacity: 0.9;
}

.zac-header__actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.zac-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	cursor: pointer;
	transition: background var(--zac-ease);
}

.zac-ghost:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Once chatting, the header shrinks to a compact bar. */
.zac-root.is-chat .zac-header {
	align-items: center;
	padding: 14px 16px;
	background: var(--zac-surface);
	color: var(--zac-text);
	border-bottom: 1px solid var(--zac-border);
}

.zac-root.is-chat .zac-identity {
	flex-direction: row;
	align-items: center;
	gap: 10px;
}

.zac-root.is-chat .zac-avatar {
	width: 40px;
	height: 40px;
	border-width: 2px;
	font-size: 14px;
}

.zac-root.is-chat .zac-dot {
	border-color: var(--zac-surface);
}

.zac-root.is-chat .zac-title {
	color: var(--zac-text) !important;
	font-size: 17px;
	font-weight: 700;
}

.zac-root.is-chat .zac-subtitle {
	color: var(--zac-muted) !important;
	font-size: 12.5px;
	opacity: 1;
}

.zac-root.is-chat .zac-ghost {
	background: transparent;
	color: var(--zac-muted);
}

.zac-root.is-chat .zac-ghost:hover {
	background: var(--zac-surface-2);
	color: var(--zac-text);
}

/* ------------------------------------------------------------------ body */

.zac-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.zac-nudge {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 14px 14px 0;
	padding: 12px 34px 12px 12px;
	border: 1px solid rgba(251, 191, 36, 0.3);
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(124, 58, 237, 0.14));
	cursor: pointer;
	transition: border-color var(--zac-ease);
}

.zac-nudge:hover {
	border-color: rgba(251, 191, 36, 0.5);
}

.zac-nudge__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: var(--zac-accent);
	color: #1b1330;
}

.zac-nudge__copy {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.zac-nudge__label {
	color: var(--zac-accent);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.zac-nudge__title {
	font-size: 14px;
	font-weight: 650;
}

.zac-nudge__text {
	color: var(--zac-muted);
	font-size: 12.5px;
}

.zac-nudge__arrow {
	margin-left: auto;
	color: var(--zac-accent);
}

.zac-nudge__close {
	position: absolute;
	top: 6px;
	right: 6px;
	display: inline-flex;
	padding: 4px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--zac-muted);
	cursor: pointer;
}

/* Start card shown before the first message. */
.zac-start {
	display: flex;
	align-items: center;
	gap: 14px;
	width: calc(100% - 28px);
	margin: auto 14px 14px;
	padding: 18px;
	border: 1px solid var(--zac-border);
	border-radius: 16px;
	background: var(--zac-surface-2);
	color: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color var(--zac-ease), transform var(--zac-ease);
}

.zac-start:hover {
	border-color: var(--zac-brand);
	transform: translateY(-1px);
}

.zac-start__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.zac-start__copy strong {
	font-size: 16px;
	font-weight: 700;
}

.zac-start__copy span {
	color: var(--zac-muted);
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zac-start__send {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-left: auto;
	border-radius: 50%;
	background: var(--zac-brand);
	color: var(--zac-accent);
	box-shadow: 0 8px 20px rgba(124, 58, 237, 0.34);
}

.zac-log {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.zac-log::-webkit-scrollbar {
	width: 8px;
}

.zac-log::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
}

/* --------------------------------------------------------------- messages */

.zac-msg {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 86%;
	animation: zac-pop 200ms ease-out;
}

@keyframes zac-pop {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.zac-msg--in {
	align-self: flex-start;
}

.zac-msg--out {
	align-self: flex-end;
	align-items: flex-end;
}

.zac-msg__bubble {
	padding: 11px 15px;
	border-radius: 16px 16px 16px 6px;
	background: var(--zac-bubble);
	white-space: pre-wrap;
	word-break: break-word;
}

.zac-msg--out .zac-msg__bubble {
	border-radius: 16px 16px 6px 16px;
	background: var(--zac-brand);
	color: var(--zac-on-brand);
}

.zac-msg__meta {
	color: var(--zac-muted);
	font-size: 11.5px;
}

.zac-msg__image {
	display: block;
	max-width: 100%;
	margin-top: 8px;
	border-radius: 12px;
}

/* Blinking cursor while a reply is written out. */
.zac-msg__text.is-typing::after {
	content: "";
	display: inline-block;
	width: 2px;
	height: 1em;
	margin-left: 2px;
	vertical-align: text-bottom;
	background: var(--zac-accent);
	animation: zac-caret 900ms steps(1) infinite;
}

@keyframes zac-caret {
	0%,
	50% {
		opacity: 1;
	}
	51%,
	100% {
		opacity: 0;
	}
}

.zac-typing {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: var(--zac-muted);
	font-size: 13px;
}

.zac-typing__dots {
	display: inline-flex;
	gap: 4px;
}

.zac-typing__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--zac-accent);
	animation: zac-bounce 1.1s infinite ease-in-out;
}

.zac-typing__dot:nth-child(2) {
	animation-delay: 0.14s;
}

.zac-typing__dot:nth-child(3) {
	animation-delay: 0.28s;
}

@keyframes zac-bounce {
	0%,
	65%,
	100% {
		transform: translateY(0);
		opacity: 0.45;
	}
	30% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

/* ----------------------------------------------------------------- audit */

.zac-progress {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 240px;
}

.zac-progress__title {
	font-size: 13.5px;
	font-weight: 650;
}

.zac-progress__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.zac-progress__list li {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--zac-muted);
	font-size: 12.5px;
	opacity: 0.5;
	transition: opacity var(--zac-ease), color var(--zac-ease);
}

.zac-progress__list li.is-active {
	color: var(--zac-text);
	opacity: 1;
}

.zac-progress__list li.is-done {
	opacity: 1;
}

.zac-progress__mark {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--zac-online);
	font-size: 11px;
}

.zac-spinner {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-top-color: var(--zac-accent);
	animation: zac-spin 700ms linear infinite;
}

@keyframes zac-spin {
	to {
		transform: rotate(360deg);
	}
}

.zac-report {
	margin-top: 10px;
	padding: 12px;
	border: 1px solid var(--zac-border);
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.2);
}

.zac-light .zac-report {
	background: rgba(16, 24, 40, 0.04);
}

.zac-report__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--zac-border);
}

/* Score dial drawn with a conic gradient — no images, no chart library. */
.zac-report__ring {
	--zac-ring: 0%;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	position: relative;
	background: conic-gradient(var(--zac-accent) var(--zac-ring), rgba(255, 255, 255, 0.12) 0);
}

.zac-report__ring-value {
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--zac-surface);
	color: var(--zac-text);
	font-size: 14px;
	font-weight: 700;
}

.zac-light .zac-report__ring-value {
	background: var(--zac-surface-2);
}

.zac-report__headcopy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.zac-report__headcopy strong {
	font-size: 14px;
	font-weight: 700;
}

.zac-report__url {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--zac-accent);
	font-size: 12.5px;
}

.zac-report__label {
	color: var(--zac-muted);
	font-size: 12px;
}

.zac-report__group + .zac-report__group {
	margin-top: 12px;
}

.zac-report__group-title {
	display: block;
	margin-bottom: 8px;
	color: var(--zac-muted);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.zac-report__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
	padding: 5px 10px !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, 0.06) !important;
	color: var(--zac-muted) !important;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
}

.zac-light .zac-report__toggle {
	background: rgba(16, 24, 40, 0.05) !important;
}

.zac-report__toggle::after {
	content: "›";
	transition: transform var(--zac-ease);
}

.zac-report__toggle.is-open::after {
	transform: rotate(90deg);
}

.zac-report__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.zac-report__list li {
	display: flex;
	gap: 9px;
	font-size: 12.5px;
}

.zac-report__mark {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
}

.is-pass .zac-report__mark {
	background: rgba(34, 197, 94, 0.18);
	color: var(--zac-online);
}

.is-warn .zac-report__mark {
	background: rgba(251, 191, 36, 0.18);
	color: var(--zac-accent);
}

.zac-report__copy {
	display: flex;
	flex-direction: column;
}

.zac-report__copy > span {
	color: var(--zac-muted);
}

.zac-report__ring-grade {
	position: absolute;
	right: -2px;
	bottom: -2px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--zac-surface);
	background: var(--zac-accent);
	color: #10131f;
	font-size: 11px;
	font-weight: 800;
}

.zac-report__ring.is-grade-d,
.zac-report__ring.is-grade-f {
	background: conic-gradient(#f87171 var(--zac-ring), rgba(255, 255, 255, 0.12) 0);
}

.zac-report__ring.is-grade-d .zac-report__ring-grade,
.zac-report__ring.is-grade-f .zac-report__ring-grade {
	background: #f87171;
	color: #2a0b0b;
}

.zac-report__ring.is-grade-a {
	background: conic-gradient(var(--zac-online) var(--zac-ring), rgba(255, 255, 255, 0.12) 0);
}

.zac-report__ring.is-grade-a .zac-report__ring-grade {
	background: var(--zac-online);
	color: #052e16;
}

.zac-report__verdict {
	margin-top: 4px;
	color: var(--zac-text);
	font-size: 12px;
	line-height: 1.45;
}

/* Category bars: the shape of the problem before any of the detail. */

.zac-report__cats {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 12px 0;
	padding: 10px 0;
	border-top: 1px solid var(--zac-line);
	border-bottom: 1px solid var(--zac-line);
}

.zac-report__cat {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 72px auto;
	align-items: center;
	gap: 8px;
}

.zac-report__cat-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--zac-muted);
	font-size: 11.5px;
}

.zac-report__cat-track {
	height: 5px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	overflow: hidden;
}

.zac-light .zac-report__cat-track {
	background: rgba(16, 24, 40, 0.08);
}

.zac-report__cat-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--zac-accent);
}

.zac-report__cat-fill.is-good {
	background: var(--zac-online);
}

.zac-report__cat-fill.is-poor {
	background: #f87171;
}

.zac-report__cat-count {
	color: var(--zac-muted);
	font-size: 11px;
	font-variant-numeric: tabular-nums;
}

.zac-report__row {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.zac-report__sev {
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.zac-report__sev.is-critical {
	background: rgba(248, 113, 113, 0.18);
	color: #fca5a5;
}

.zac-report__sev.is-major {
	background: rgba(251, 191, 36, 0.18);
	color: var(--zac-accent);
}

.zac-report__sev.is-minor {
	background: rgba(255, 255, 255, 0.08);
	color: var(--zac-muted);
}

.zac-light .zac-report__sev.is-critical {
	color: #b91c1c;
}

.zac-light .zac-report__sev.is-minor {
	background: rgba(16, 24, 40, 0.06);
}

.zac-report__detail {
	margin-top: 1px;
	line-height: 1.45;
}

.zac-report__expand {
	align-self: flex-start;
	margin-top: 4px;
	padding: 0 !important;
	background: none !important;
	color: var(--zac-accent) !important;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.zac-report__more {
	margin-top: 6px;
	padding: 8px 10px;
	border-radius: 10px;
	border-left: 2px solid var(--zac-accent);
	background: rgba(255, 255, 255, 0.05);
}

.zac-light .zac-report__more {
	background: rgba(16, 24, 40, 0.04);
}

.zac-report__more p {
	margin: 0;
	color: var(--zac-muted);
	font-size: 12px;
	line-height: 1.5;
}

.zac-report__more p + p {
	margin-top: 6px;
}

.zac-report__more strong {
	color: var(--zac-text);
}

.is-critical > .zac-report__mark {
	background: rgba(248, 113, 113, 0.2);
	color: #fca5a5;
}

/* --------------------------------------------------------------- prechat */

.zac-prechat {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px 22px 24px;
	border-top: 1px solid var(--zac-border);
	border-radius: 24px 24px 0 0;
	background: var(--zac-surface);
	box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.4);
	animation: zac-sheet 200ms ease-out;
}

@keyframes zac-sheet {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.zac-prechat__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.zac-prechat__lead {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
}

/*
 * Themes restyle every input on the page, which is what turns this form white.
 * Colour, background and the iOS text fill are forced back.
 */
.zac-root .zac-field,
.zac-root input.zac-field {
	width: 100%;
	min-height: 50px;
	padding: 13px 16px !important;
	border: 1px solid var(--zac-border) !important;
	border-radius: 12px !important;
	background-color: var(--zac-surface-2) !important;
	background-image: none !important;
	background: var(--zac-surface-2) !important;
	color: var(--zac-text) !important;
	font-size: 15px;
	box-shadow: none !important;
	outline: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-webkit-text-fill-color: var(--zac-text) !important;
}

.zac-root .zac-field::placeholder {
	color: var(--zac-muted) !important;
	opacity: 1;
	-webkit-text-fill-color: var(--zac-muted) !important;
}

.zac-root .zac-field:focus {
	border-color: var(--zac-brand) !important;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}

.zac-field:-webkit-autofill,
.zac-field:-webkit-autofill:hover,
.zac-field:-webkit-autofill:focus {
	box-shadow: 0 0 0 1000px var(--zac-surface-2) inset !important;
	-webkit-text-fill-color: var(--zac-text) !important;
}

.zac-prechat__actions {
	display: flex;
	gap: 8px;
}

.zac-prechat__save {
	flex: 1;
	min-height: 48px;
	border: 0;
	border-radius: 12px;
	background: var(--zac-brand);
	color: var(--zac-on-brand);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.zac-prechat__skip {
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid var(--zac-border);
	border-radius: 12px;
	background: transparent;
	color: var(--zac-muted);
	font-size: 14px;
	cursor: pointer;
}

/* -------------------------------------------------------------- composer */

.zac-notice {
	flex: 0 0 auto;
	padding: 8px 16px;
	background: var(--zac-surface-2);
	color: var(--zac-muted);
	font-size: 13px;
}

.zac-tray {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-top: 1px solid var(--zac-border);
}

.zac-tray__thumb {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	object-fit: cover;
}

.zac-tray__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--zac-muted);
	font-size: 13px;
}

.zac-tray__remove {
	display: inline-flex;
	padding: 5px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--zac-muted);
	cursor: pointer;
}

.zac-audit-form {
	display: flex;
	gap: 8px;
	width: 100%;
}

.zac-audit-form .zac-field {
	flex: 1;
	min-height: 44px;
	font-size: 14px;
}

.zac-audit-form button {
	padding: 0 16px;
	border: 0;
	border-radius: 12px;
	background: var(--zac-accent);
	color: #1b1330;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

/* ------------------------------------------------------------ booking form */

.zac-booking-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	max-height: 70vh;
	overflow-y: auto;
}

.zac-booking-form__intro {
	margin: 0 0 2px;
	color: var(--zac-muted);
	font-size: 13px;
	line-height: 1.4;
}

.zac-booking-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.zac-booking-form .zac-field {
	min-height: 44px;
	font-size: 14px;
}

.zac-booking-form textarea.zac-field {
	min-height: 60px;
	resize: vertical;
}

.zac-booking-form button {
	padding: 0 16px;
	min-height: 44px;
	border: 0;
	border-radius: 12px;
	background: var(--zac-accent);
	color: #1b1330;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.zac-booking-form button:disabled {
	opacity: 0.6;
	cursor: default;
}

.zac-booking-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 10px;
	padding: 12px 14px;
	border: 1px solid var(--zac-border);
	border-radius: 12px;
	background: var(--zac-surface-2);
}

.zac-booking-card__title {
	font-size: 13.5px;
	font-weight: 700;
}

.zac-booking-card__when {
	color: var(--zac-brand);
	font-size: 13px;
	font-weight: 600;
}

.zac-booking-card__contact,
.zac-booking-card__status {
	color: var(--zac-muted);
	font-size: 12.5px;
}

/*
 * Grid rather than flex: the middle column is minmax(0, 1fr), so the message
 * field keeps every pixel the tools and send button do not use. A theme that
 * widens buttons can no longer squeeze the field down to nothing.
 */
.zac-composer {
	display: grid !important;
	grid-template-columns: auto minmax(0, 1fr) auto;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	min-height: 66px;
	margin: 8px 14px 12px;
	padding: 7px 8px;
	border: 1px solid var(--zac-border);
	border-radius: 16px;
	background-color: var(--zac-surface-2) !important;
	transition: border-color var(--zac-ease), box-shadow var(--zac-ease);
}

.zac-composer.has-no-tools {
	grid-template-columns: minmax(0, 1fr) auto;
}

.zac-composer__tools {
	display: flex;
	gap: 6px;
	align-items: center;
}

.zac-composer:focus-within {
	border-color: var(--zac-brand);
	box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.18);
}

/*
 * Sizes are forced. A theme that sets its own button width or padding would
 * otherwise widen these and squeeze the message field down to nothing, which is
 * exactly what happened before.
 */
.zac-composer__tool {
	flex: 0 0 auto !important;
	display: inline-grid;
	place-items: center;
	width: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	height: 40px !important;
	min-height: 40px !important;
	padding: 0 !important;
	border: 0;
	border-radius: 10px !important;
	background-color: rgba(255, 255, 255, 0.06) !important;
	color: var(--zac-muted);
	cursor: pointer;
	transition: color var(--zac-ease), background var(--zac-ease);
}

.zac-light .zac-composer__tool {
	background-color: rgba(16, 24, 40, 0.05) !important;
}

.zac-composer__tool:hover {
	color: var(--zac-accent);
}

.zac-composer__input {
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	min-height: 46px;
	max-height: 112px;
	padding: 11px 10px !important;
	overflow-y: auto;
	scrollbar-width: thin;
	border: 0 !important;
	border-radius: 0;
	background-color: transparent !important;
	background-image: none !important;
	color: var(--zac-text) !important;
	font-size: 15px;
	line-height: 24px;
	resize: none;
	appearance: none;
	box-shadow: none !important;
	outline: none !important;
	-webkit-text-fill-color: var(--zac-text);
}

/* Keeps the chunky native scrollbar out of a 46px tall field. */
.zac-composer__input::-webkit-scrollbar {
	width: 6px;
}

.zac-composer__input::-webkit-scrollbar-button {
	display: none;
}

.zac-composer__input::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
}

.zac-composer__input::placeholder {
	color: var(--zac-muted) !important;
	opacity: 1;
	-webkit-text-fill-color: var(--zac-muted);
}

.zac-composer__send {
	flex: 0 0 auto !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px !important;
	min-width: 46px !important;
	max-width: 46px !important;
	height: 46px !important;
	min-height: 46px !important;
	padding: 0 !important;
	border: 1px solid transparent !important;
	border-radius: 50% !important;
	background-color: var(--zac-brand) !important;
	background-image: none !important;
	color: var(--zac-accent) !important;
	cursor: pointer;
	box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
	transition: transform var(--zac-ease), box-shadow var(--zac-ease), border-color var(--zac-ease);
}

.zac-composer__send:hover:not(:disabled) {
	border-color: rgba(251, 191, 36, 0.7) !important;
	box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14), 0 10px 24px rgba(251, 191, 36, 0.2);
	transform: translateY(-2px);
}

.zac-composer__send:active:not(:disabled) {
	transform: scale(0.92);
}

.zac-composer__send:disabled {
	cursor: default;
	opacity: 0.55;
}

.zac-hidden-file {
	display: none;
}

.zac-footer {
	flex: 0 0 auto;
	padding: 0 16px 12px;
	color: var(--zac-muted);
	font-size: 10.5px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 560px) {
	.zac-root {
		bottom: var(--zac-offset-mobile);
	}

	.zac-root.zac-right {
		right: 16px;
	}

	.zac-root.zac-left {
		left: 16px;
	}

	.zac-greeting {
		max-width: calc(100vw - 32px);
	}

	/* The pill costs width a phone does not have to spare. */
	.zac-pill {
		display: none;
	}

	.zac-root .zac-panel {
		position: fixed !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		z-index: 1000000 !important;
		width: 100% !important;
		height: 100% !important;
		max-height: none !important;
		margin: 0 !important;
		border: 0;
		border-radius: 0;
		transform: translateY(14px);
	}

	.zac-root .zac-panel.is-visible {
		transform: translateY(0);
	}

	.zac-panel.is-visible {
		transform: translateY(0);
	}

	/* The header close button is the only way out, so the floating launcher is
	   hidden rather than left hovering over a full-screen panel. */
	.zac-root.is-open .zac-launcher,
	.zac-root.is-open .zac-greeting {
		display: none;
	}

	.zac-header {
		padding: 34px 20px 24px;
	}

	.zac-title {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zac-root *,
	.zac-root *::before,
	.zac-root *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
