/*
 * CQI Engage front-end styles.
 *
 * Deliberately kept as a compact floating pill at every viewport size,
 * never a full-width docked bar. That is the mechanism by which this
 * plugin satisfies "must never cover or obstruct mobile content": a
 * bar spanning the viewport width will inevitably sit over content or
 * collide with a theme's own sticky elements, so the CTA is sized to
 * its content and anchored to a corner or bottom-center at all sizes.
 */

.cqi-engage {
	position: fixed;
	z-index: 99990;
	bottom: calc(16px + var(--cqi-engage-offset-y, 0px));
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: calc(100vw - 32px);

	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	pointer-events: none;

	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.cqi-engage.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.cqi-engage--bottom-right {
	right: calc(16px + var(--cqi-engage-offset-x, 0px));
}

.cqi-engage--bottom-left {
	left: calc(16px + var(--cqi-engage-offset-x, 0px));
}

.cqi-engage--bottom-center {
	left: 50%;
	transform: translate(calc(-50% + var(--cqi-engage-offset-x, 0px)), 12px);
}

.cqi-engage--bottom-center.is-visible {
	transform: translate(calc(-50% + var(--cqi-engage-offset-x, 0px)), 0);
}

.cqi-engage__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 999px;
	background-color: var(--cqi-engage-bg, #0FC5B8);
	color: var(--cqi-engage-text, #FFFFFF);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cqi-engage__button--box {
	border-radius: 10px;
	white-space: normal;
	max-width: 260px;
}

.cqi-engage__button:hover,
.cqi-engage__button:focus {
	color: var(--cqi-engage-text, #FFFFFF);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.cqi-engage__button:focus-visible {
	outline: 3px solid var(--cqi-engage-text, #FFFFFF);
	outline-offset: 3px;
}

.cqi-engage__arrow {
	display: inline-block;
	transition: transform 0.15s ease;
}

.cqi-engage__button:hover .cqi-engage__arrow {
	transform: translateX(3px);
}

.cqi-engage__dismiss {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	border: none;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.35);
	color: #FFFFFF;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.cqi-engage__dismiss:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 2px;
}

.cqi-engage__sr-announce {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 480px) {
	.cqi-engage__button {
		font-size: 14px;
		padding: 11px 16px;
	}

	.cqi-engage {
		bottom: calc(16px + var(--cqi-engage-offset-y, 0px) + var(--cqi-engage-mobile-offset-y, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.cqi-engage,
	.cqi-engage__button,
	.cqi-engage__arrow {
		transition: none;
	}
}
