/**
 * Floating phone + scroll-to-top (site-wide).
 */

.leo-floating-actions {
	position: fixed;
	right: 30px;
	bottom: 100px;
	z-index: 55;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	pointer-events: none;
}

@media (max-width: 1099px) {
	.leo-floating-actions {
		right: 16px;
		bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 16px));
		gap: 0.75rem;
		z-index: 60;
	}
}

.leo-floating-actions__scroll-top,
.leo-floating-actions__phone {
	pointer-events: auto;
	flex-shrink: 0;
}

/* Scroll to top — hidden until .active (JS) */
.leo-floating-actions__scroll-top {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	padding: 0;
	border: 2px solid #27ac5b;
	border-radius: 50%;
	background: rgba(15, 15, 15, 0.85);
	color: #fafafa;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px);
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease,
		transform 0.2s ease,
		background-color 0.15s ease,
		border-color 0.15s ease;
}

.leo-floating-actions__scroll-top.active,
.leo-floating-actions__scroll-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.leo-floating-actions__scroll-top:hover {
	background: rgba(39, 172, 91, 0.15);
	border-color: #3dd477;
}

.leo-floating-actions__scroll-top:focus-visible {
	outline: 2px solid #27ac5b;
	outline-offset: 3px;
}

.leo-floating-actions__scroll-icon {
	display: block;
	width: 20px;
	height: 20px;
}

/* Phone — green circle, white icon always visible */
.leo-floating-actions__phone {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background-color: #27ac5b;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.leo-floating-actions__phone::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 150%;
	height: 150%;
	margin-top: -75%;
	margin-left: -75%;
	border-radius: 50%;
	background: rgba(39, 172, 91, 0.3);
	pointer-events: none;
	animation: leocar-pulse-ring 1.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.leo-floating-actions__phone-icon {
	position: relative;
	z-index: 1;
	display: block;
	width: 24px;
	height: 24px;
	opacity: 1;
	visibility: visible;
}

.leo-floating-actions__phone-icon--hover {
	display: none;
}

.leo-floating-actions__phone:hover,
.leo-floating-actions__phone:focus-visible {
	background-color: #fafafa;
}

.leo-floating-actions__phone:hover .leo-floating-actions__phone-icon--default,
.leo-floating-actions__phone:focus-visible .leo-floating-actions__phone-icon--default {
	display: none;
}

.leo-floating-actions__phone:hover .leo-floating-actions__phone-icon--hover,
.leo-floating-actions__phone:focus-visible .leo-floating-actions__phone-icon--hover {
	display: block;
}

.leo-floating-actions__phone:focus-visible {
	outline: 2px solid #27ac5b;
	outline-offset: 3px;
}

@keyframes leocar-pulse-ring {
	0% {
		transform: scale(0.5);
		opacity: 1;
	}
	80%,
	100% {
		transform: scale(1);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.leo-floating-actions__scroll-top {
		transition: opacity 0.2s ease, visibility 0.2s ease;
	}

	.leo-floating-actions__phone::before {
		animation: none;
	}
}

/* Legacy hero markup (removed from partial; hide if cached HTML remains) */
.leo-floating-right .require-call.pulsating::after {
	background-color: #27ac5b !important;
	background-image: url('../images/theme/svg/call.svg') !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 24px !important;
}

.leo-floating-right .require-call.pulsating:hover::after {
	background-color: #fafafa !important;
	background-image: url('../images/theme/svg/call-accent.svg') !important;
}
