/*
 * "Ask us a question" beside the JivoChat icon, bottom right on every page (footer.php,
 * assets/js/src/ask-chat.js). Jivo draws its icon in an 85px box flush with the bottom
 * right corner; the label sits to its left, centred on it.
 */
.ask-chat {
	position: fixed;
	z-index: 95;
	right: 6rem;
	bottom: 1.3rem;
	display: flex;
	align-items: flex-start;
	animation: ask-chat-in 0.35s var(--ease) both;
}

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

.ask-chat__open {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1rem;
	padding: 0.6rem 1.1rem;
	border-radius: 1.1rem;
	background: rgb(var(--color-primary));
	color: rgb(var(--color-primary-fg));
	box-shadow: var(--shadow-lg);
	font-family: var(--font-body);
	text-align: left;
	line-height: 1.25;
	cursor: pointer;
	transition: transform var(--dur-fast) var(--ease);
}

.ask-chat__open:hover {
	transform: translateY(-1px);
}

.ask-chat__open:focus-visible,
.ask-chat__close:focus-visible {
	outline: 2px solid rgb(var(--color-accent));
	outline-offset: 2px;
}

.ask-chat__title {
	font-size: 0.92rem;
	font-weight: 500;
}

.ask-chat__sub {
	font-size: 0.78rem;
	color: rgb(var(--color-primary-fg) / 0.75);
}

.ask-chat__close {
	position: absolute;
	top: -0.55rem;
	left: -0.55rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background: rgb(var(--color-primary-fg));
	color: rgb(var(--color-primary));
	box-shadow: var(--shadow-md), inset 0 0 0 1px rgb(var(--color-primary) / 0.15);
	cursor: pointer;
}

@media (max-width: 639px) {
	.ask-chat {
		right: 5.75rem;
		bottom: 1.1rem;
	}

	.ask-chat__open {
		padding: 0.5rem 0.9rem;
	}

	.ask-chat__title {
		font-size: 0.85rem;
	}

	.ask-chat__sub {
		font-size: 0.72rem;
	}
}

@keyframes ask-chat-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ask-chat {
		animation: none;
	}
}

.a11y-no-motion .ask-chat {
	animation: none;
}
