/*
 * Floating call FAB — bottom-left phone action replacing Buttonizer.
 */

.afc-floating-call {
	position: fixed;
	inset-block-end: calc(var(--afc-space-lg) + env(safe-area-inset-bottom, 0px));
	inset-inline-start: calc(var(--afc-space-lg) + env(safe-area-inset-left, 0px));
	z-index: var(--afc-z-floating-fab);
	inline-size: var(--afc-floating-fab-size);
	block-size: var(--afc-floating-fab-size);
	pointer-events: none;
}

.afc-floating-call__button,
.afc-floating-call__ring {
	pointer-events: auto;
}

.afc-floating-call__button {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: var(--afc-floating-fab-size);
	block-size: var(--afc-floating-fab-size);
	border-radius: 50%;
	background: var(--afc-color-brand-red);
	color: var(--afc-white);
	box-shadow:
		0 10px 24px rgba(7, 13, 32, 0.28),
		0 2px 6px rgba(7, 13, 32, 0.16);
	text-decoration: none;
	transform: scale(1);
	transition:
		background-color var(--afc-duration-fast) var(--afc-ease-standard),
		transform var(--afc-duration-fast) var(--afc-ease-standard),
		box-shadow var(--afc-duration-fast) var(--afc-ease-standard);
}

.afc-floating-call__button:hover {
	background: var(--afc-color-brand-red-dark);
	color: var(--afc-white);
	transform: scale(1.04);
	box-shadow:
		0 14px 28px rgba(7, 13, 32, 0.32),
		0 4px 10px rgba(7, 13, 32, 0.18);
}

.afc-floating-call__button:active {
	transform: scale(0.98);
}

.afc-floating-call__button:focus-visible {
	outline: var(--afc-focus-ring-width) solid var(--afc-white);
	outline-offset: 3px;
	box-shadow:
		0 0 0 3px var(--afc-color-brand-navy),
		0 10px 24px rgba(7, 13, 32, 0.28);
}

.afc-floating-call__ring {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 50%;
	background: var(--afc-color-brand-red);
	opacity: 0.42;
	animation: afc-floating-call-pulse 2.4s var(--afc-ease-standard) infinite;
}

html:not(.afc-js) .afc-floating-call__ring {
	display: none;
}

html.afc-js .afc-floating-call {
	animation: afc-floating-call-enter 640ms var(--afc-ease-entrance) both;
}

@keyframes afc-floating-call-enter {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.82);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes afc-floating-call-pulse {
	0% {
		transform: scale(1);
		opacity: 0.42;
	}

	70% {
		transform: scale(1.55);
		opacity: 0;
	}

	100% {
		transform: scale(1.55);
		opacity: 0;
	}
}

@media (max-width: 899px) {
	.afc-floating-call {
		inset-block-end: calc(var(--afc-call-bar-height) + var(--afc-space-md) + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.afc-floating-call,
	.afc-floating-call__ring {
		animation: none;
	}

	.afc-floating-call__button {
		transition: background-color var(--afc-duration-fast) var(--afc-ease-standard);
	}
}
