/* ==========================================================================
   Floating contact button — printed once by ahan_print_style_once().
   A round toggle with a column of messenger links above it. Subtle motion only.
   ========================================================================== */

.ahan-fab {
	--fab-close: #ff3b30;
	--fab-item-bg: #333;
	position: fixed;
	right: 20px; /* physical: the button sits at the right edge, like the page's old version */
	bottom: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	pointer-events: none;
}

/* Above the mobile call bar (44px). */
@media (max-width: 767px) {
	.ahan-fab {
		/* bottom: 20px; */
	}
}

.ahan-fab__toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	border: 0;
	border-radius: 50%;
	background: var(--c-primary);
	color: var(--c-primary-contrast);
	box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
	cursor: pointer;
	pointer-events: auto;
	transition: background-color var(--dur) var(--ease);
}

.ahan-fab__toggle:not([aria-expanded="true"]) {
	animation: ahan-fab-pulse 2.4s 3;
}

.ahan-fab__toggle[aria-expanded="true"] {
	background: var(--fab-close);
}

.ahan-fab__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -5px;
}

.ahan-fab__icon {
	position: absolute;
	width: 34px;
	height: 34px;
	transition: opacity var(--dur) var(--ease), transform var(--dur-slow) var(--ease);
}

.ahan-fab__icon--close,
.ahan-fab__toggle[aria-expanded="true"] .ahan-fab__icon--open {
	opacity: 0;
	transform: scale(0.4) rotate(-90deg);
}

.ahan-fab__toggle[aria-expanded="true"] .ahan-fab__icon--close {
	opacity: 1;
	transform: none;
}

.ahan-fab__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	/* visibility waits so the items can fade out first */
	transition: visibility 0s linear 0.3s, opacity 0.25s ease;
}

.ahan-fab.is-open .ahan-fab__list {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transition-delay: 0s;
}

.ahan-fab__item {
	translate: 0 14px;
	scale: 0.85;
	transition: translate var(--dur) var(--ease), scale var(--dur) var(--ease);
}

.ahan-fab.is-open .ahan-fab__item {
	translate: none;
	scale: 1;
}

.ahan-fab__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--fab-item-bg);
	box-shadow: 0 3px 10px rgb(0 0 0 / 20%);
	transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.ahan-fab__link:hover,
.ahan-fab__link:focus-visible {
	background: #555;
	transform: scale(1.08);
}

.ahan-fab__link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ahan-fab__link img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

@keyframes ahan-fab-pulse {
	0% {
		box-shadow: 0 0 0 0 rgb(94 5 32 / 55%);
	}

	70%,
	100% {
		box-shadow: 0 0 0 14px rgb(94 5 32 / 0%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ahan-fab__toggle:not([aria-expanded="true"]) {
		animation: none;
	}

	.ahan-fab__icon,
	.ahan-fab__list,
	.ahan-fab__item,
	.ahan-fab__link {
		transition-duration: 0.01ms;
	}
}

@media print {
	.ahan-fab {
		display: none;
	}
}

/* hover-states: the round button lifts slightly. */
.ahan-fab__toggle {
	transition: background-color 0.3s ease, transform var(--dur-fast) var(--ease);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.ahan-fab__toggle:hover {
		transform: scale(1.05);
	}
}