/* Wolbi chat widget — site-wide, responsive */
.aw-chat-widget {
	position: relative;
	z-index: 9998;
}

.aw-chat-launcher {
	position: fixed;
	right: 24px;
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 58px;
	padding: 7px 18px 7px 7px;
	border: 0;
	border-radius: 999px;
	background: #0a6e5f;
	color: #fff;
	box-shadow: 0 12px 34px rgba(32, 40, 39, .22);
	cursor: pointer;
	font: inherit;
	transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.aw-chat-launcher:hover {
	background: #07594d;
	transform: translateY(-2px);
	box-shadow: 0 16px 38px rgba(32, 40, 39, .28);
}

.aw-chat-launcher:focus-visible,
.aw-chat-close:focus-visible,
.aw-chat-meta a:focus-visible {
	outline: 3px solid rgba(88, 191, 168, .55);
	outline-offset: 3px;
}

.aw-chat-launcher img {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	object-fit: cover;
	border-radius: 50%;
	background: #deeee9;
}

.aw-chat-launcher-copy {
	display: grid;
	gap: 1px;
	text-align: left;
	line-height: 1.05;
}

.aw-chat-launcher-copy strong {
	font-size: 15px;
	font-weight: 700;
}

.aw-chat-launcher-copy small {
	font-size: 11px;
	font-weight: 500;
	opacity: .82;
}

.aw-chat-dialog {
	position: fixed;
	inset: auto 24px 94px auto;
	width: min(430px, calc(100vw - 48px));
	height: min(720px, calc(100dvh - 126px));
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid rgba(10, 110, 95, .16);
	border-radius: 24px;
	background: #fff;
	color: #202827;
	box-shadow: 0 24px 70px rgba(32, 40, 39, .28);
}

.aw-chat-dialog[open] {
	display: flex;
	flex-direction: column;
}

/* The native modal backdrop needs its own animation: without it, the
 * page snaps sharply back into focus when dialog.close() removes the top layer.
 * Keep the closing blur fade synchronized with the 510ms mobile panel motion. */
.aw-chat-dialog::backdrop {
	background: rgba(20, 31, 29, .28);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	animation: aw-wolbi-backdrop-in .51s ease-out both;
}
.aw-chat-dialog.aw-chat-is-closing::backdrop {
	animation: aw-wolbi-backdrop-out .51s ease-in-out both;
}
@keyframes aw-wolbi-backdrop-in {
	from {
		background: rgba(20, 31, 29, 0);
		-webkit-backdrop-filter: blur(0);
		backdrop-filter: blur(0);
	}
	to {
		background: rgba(20, 31, 29, .28);
		-webkit-backdrop-filter: blur(2px);
		backdrop-filter: blur(2px);
	}
}
@keyframes aw-wolbi-backdrop-out {
	from {
		background: rgba(20, 31, 29, .28);
		-webkit-backdrop-filter: blur(2px);
		backdrop-filter: blur(2px);
	}
	to {
		background: rgba(20, 31, 29, 0);
		-webkit-backdrop-filter: blur(0);
		backdrop-filter: blur(0);
	}
}
@media (prefers-reduced-motion: reduce) {
	.aw-chat-dialog::backdrop,
	.aw-chat-dialog.aw-chat-is-closing::backdrop {
		animation: none !important;
	}
}

.aw-chat-heading {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 66px;
	padding: 10px 12px 10px 14px;
	border-bottom: 1px solid rgba(32, 40, 39, .09);
	background: #f7fbfa;
}

.aw-chat-heading-avatar {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	object-fit: cover;
	border-radius: 50%;
	background: #deeee9;
}

.aw-chat-heading > div {
	display: grid;
	gap: 2px;
	min-width: 0;
	margin-right: auto;
}

.aw-chat-heading strong {
	font-size: 16px;
	line-height: 1.1;
	color: #0a6e5f;
}

.aw-chat-heading span {
	font-size: 12px;
	line-height: 1.2;
	color: #66706e;
}

.aw-chat-close {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #202827;
	font: inherit;
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.aw-chat-close:hover {
	background: #deeee9;
}

.aw-chat-content {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: #fff;
}

.aw-chat-content iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

.aw-chat-loading[hidden] {
	display: none;
}

.aw-chat-loading {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	color: #66706e;
	font-size: 14px;
	text-align: center;
	background: #fff;
}

.aw-chat-loading::before {
	content: "";
	width: 34px;
	height: 34px;
	margin: 0 auto 12px;
	border: 3px solid #deeee9;
	border-top-color: #0a6e5f;
	border-radius: 50%;
	animation: aw-chat-spin .8s linear infinite;
}

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

.aw-chat-meta {
	flex: 0 0 auto;
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
	border-top: 1px solid rgba(32, 40, 39, .08);
	background: #fff;
	font-size: 11px;
	line-height: 1.35;
}

.aw-chat-meta a {
	color: #0a6e5f;
	text-decoration: none;
}

.aw-chat-meta a:hover {
	text-decoration: underline;
}

@media (max-width: 680px) {
	.aw-chat-launcher {
		right: 14px;
		bottom: max(14px, env(safe-area-inset-bottom));
		min-height: 54px;
		padding: 6px 15px 6px 6px;
		box-shadow: none;
	}

	.aw-chat-launcher img {
		width: 42px;
		height: 42px;
		flex-basis: 42px;
	}

	.aw-chat-launcher-copy small {
		display: none;
	}

	.aw-chat-dialog {
		inset: 0;
		width: 100vw;
		max-width: none;
		height: 100dvh;
		max-height: none;
		border: 0;
		border-radius: 0;
	}

	.aw-chat-heading {
		min-height: calc(64px + env(safe-area-inset-top));
		padding: calc(8px + env(safe-area-inset-top)) 10px 8px 12px;
	}

	.aw-chat-meta {
		padding-left: 12px;
		padding-right: 12px;
		font-size: 10.5px;
	}
}

/* Wolbi homepage primary CTA — align with the right-hand benefit column */
@media (min-width: 681px) {
	.aw-mock-wolbi-intro > .aw-open-wolbi {
		margin-left: 50% !important;
		margin-top: 18px !important;
	}
}

.aw-mock-wolbi-cta.aw-open-wolbi {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: fit-content;
	min-height: 52px;
	padding: 13px 24px;
	border: 0;
	border-radius: 999px;
	background: #0a6e5f;
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	text-align: center;
	box-shadow: 0 8px 24px rgba(10, 110, 95, .15);
}

.aw-mock-wolbi-cta.aw-open-wolbi:hover {
	background: #07594d;
	transform: translateY(-1px);
}

.aw-mock-wolbi-cta.aw-open-wolbi:focus-visible {
	outline: 3px solid #58bfa8;
	outline-offset: 3px;
}

@media (max-width: 680px) {
	.aw-mock-wolbi-cta.aw-open-wolbi {
		width: 100%;
		max-width: 320px;
	}
}

/* Light outlined Wolbi CTA: override existing theme button declarations. */
.aw-mock-wolbi-intro .aw-mock-wolbi-cta.aw-open-wolbi {
	background: #ffffff !important;
	color: #0a6e5f !important;
	border: 2px solid #0a6e5f !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-weight: 600 !important;
}
.aw-mock-wolbi-intro .aw-mock-wolbi-cta.aw-open-wolbi span {
	color: inherit !important;
}
.aw-mock-wolbi-intro .aw-mock-wolbi-cta.aw-open-wolbi:hover {
	background: #0a6e5f !important;
	color: #ffffff !important;
}
@media (max-width: 680px) {
	.aw-mock-wolbi-intro .aw-mock-wolbi-cta.aw-open-wolbi {
		margin-left: 0 !important;
	}
}

/* Wolbi mobile: gentle magnetic collapse into the circular avatar.
 * The trigger remains 5 seconds after page load; desktop is unchanged. */
@media (max-width: 680px) {
	.aw-chat-widget .aw-chat-launcher {
		box-sizing: border-box;
		width: 164px;
		min-width: 54px;
		max-width: 164px;
		overflow: hidden;
		white-space: nowrap;
		transform-origin: 100% 50%;
		transition:
			width 1.3s cubic-bezier(.22, 1, .36, 1),
			max-width 1.3s cubic-bezier(.22, 1, .36, 1),
			gap 1.1s cubic-bezier(.22, 1, .36, 1),
			padding 1.3s cubic-bezier(.22, 1, .36, 1),
			box-shadow .25s ease,
			transform .2s ease;
	}

	.aw-chat-widget .aw-chat-launcher .aw-chat-launcher-copy {
		min-width: 0;
		max-width: 100px;
		overflow: hidden;
		opacity: 1;
		filter: blur(0);
		transform: translateX(0);
		transition:
			max-width 1.15s cubic-bezier(.22, 1, .36, 1),
			opacity .65s ease,
			filter .7s ease,
			transform .85s cubic-bezier(.22, 1, .36, 1);
	}

	.aw-chat-widget .aw-chat-launcher.aw-chat-launcher-compact {
		width: 54px !important;
		min-width: 54px !important;
		max-width: 54px !important;
		padding: 6px !important;
		gap: 0 !important;
		box-shadow: none;
	}

	.aw-chat-widget .aw-chat-launcher.aw-chat-launcher-compact .aw-chat-launcher-copy {
		max-width: 0;
		opacity: 0;
		filter: blur(2px);
		transform: translateX(-16px);
		pointer-events: none;
	}

	/* A single, soft halo around the button after it finishes collapsing.
	   Do not animate the avatar image: it must remain continuously visible. */
	.aw-chat-widget .aw-chat-launcher.aw-chat-launcher-compact {
		animation: aw-wolbi-button-arrive .95s ease-out 1.3s 1;
	}

	@keyframes aw-wolbi-button-arrive {
		0% {
			box-shadow: 0 0 0 0 rgba(88, 191, 168, 0);
		}
		45% {
			box-shadow: 0 0 0 8px rgba(88, 191, 168, .42);
		}
		100% {
			box-shadow: 0 0 0 15px rgba(88, 191, 168, 0);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.aw-chat-widget .aw-chat-launcher,
	.aw-chat-widget .aw-chat-launcher .aw-chat-launcher-copy {
		transition: none !important;
	}
	.aw-chat-widget .aw-chat-launcher.aw-chat-launcher-compact {
		animation: none !important;
	}
	.aw-chat-loading::before {
		animation-duration: 1.6s;
	}
}
