/* Custom Button [custom_button] */

.custom-btn {
	position: relative;
	isolation: isolate;
}

/* Content above the hover-effect layer. */
.custom-btn > i,
.custom-btn > span:not(.uaf-cb-fx) {
	position: relative;
	z-index: 1;
}

/* Hover-effect layer: its own element, because Flatsome's Gloss/Bevel/Shade styles already
   use the button's ::after. !important beats Flatsome's .reveal-icon span transform/opacity. */
.custom-btn .uaf-cb-fx {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block !important;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
	opacity: 1 !important;
	transform: none !important;
}
.uaf-cb-fx::before,
.uaf-cb-fx::after {
	content: "";
	position: absolute;
	box-sizing: border-box;
}

/* 1. Shine Sweep: a light streak crosses the button. */
.uaf-cb--shine .uaf-cb-fx::before {
	top: -10%;
	bottom: -10%;
	left: -80%;
	width: 45%;
	background: linear-gradient(100deg, transparent, var(--uaf-cb-fx, rgba(255, 255, 255, 0.45)), transparent);
	transform: skewX(-20deg);
	transition: left 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.uaf-cb--shine:hover .uaf-cb-fx::before,
.uaf-cb--shine:focus-visible .uaf-cb-fx::before {
	left: 135%;
}

/* 2. Neon Glow: a soft glow in the button's color that breathes while hovered. */
.custom-btn.uaf-cb--glow {
	transition: box-shadow 0.35s ease;
}
.custom-btn.uaf-cb--glow:hover,
.custom-btn.uaf-cb--glow:focus-visible {
	box-shadow: 0 0 0 1px var(--uaf-cb-fx), 0 0 16px color-mix(in srgb, var(--uaf-cb-fx) 70%, transparent), 0 0 38px color-mix(in srgb, var(--uaf-cb-fx) 40%, transparent);
	animation: uaf-cb-glow 1.8s ease-in-out 0.35s infinite;
}
@keyframes uaf-cb-glow {
	50% {
		box-shadow: 0 0 0 1px var(--uaf-cb-fx), 0 0 24px color-mix(in srgb, var(--uaf-cb-fx) 80%, transparent), 0 0 58px color-mix(in srgb, var(--uaf-cb-fx) 50%, transparent);
	}
}

/* 3. Border Draw: a line traces the edge, top-right first, then bottom-left. */
.uaf-cb--border .uaf-cb-fx::before,
.uaf-cb--border .uaf-cb-fx::after {
	width: 0;
	height: 0;
	border: 2px solid transparent;
	border-radius: inherit;
	transition: width 0.2s ease, height 0.2s ease, border-color 0s 0.2s;
}
.uaf-cb--border .uaf-cb-fx::before {
	top: 0;
	left: 0;
}
.uaf-cb--border .uaf-cb-fx::after {
	right: 0;
	bottom: 0;
}
.uaf-cb--border:hover .uaf-cb-fx::before,
.uaf-cb--border:focus-visible .uaf-cb-fx::before {
	width: 100%;
	height: 100%;
	border-top-color: var(--uaf-cb-fx, #fff);
	border-right-color: var(--uaf-cb-fx, #fff);
	transition: width 0.25s ease-out, height 0.25s ease-out 0.25s;
}
.uaf-cb--border:hover .uaf-cb-fx::after,
.uaf-cb--border:focus-visible .uaf-cb-fx::after {
	width: 100%;
	height: 100%;
	border-bottom-color: var(--uaf-cb-fx, #fff);
	border-left-color: var(--uaf-cb-fx, #fff);
	transition: border-color 0s 0.5s, width 0.25s ease-out 0.5s, height 0.25s ease-out 0.75s;
}

/* 4. Fill Wipe: a second color slides in from the left and leaves to the right. */
.uaf-cb--fill .uaf-cb-fx::before {
	inset: 0;
	background: var(--uaf-cb-fx, rgba(0, 0, 0, 0.28));
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
}
.uaf-cb--fill:hover .uaf-cb-fx::before,
.uaf-cb--fill:focus-visible .uaf-cb-fx::before {
	transform: scaleX(1);
	transform-origin: left;
}

/* 5. Gradient Flow: the gradient slides across. !important because the inline background
   shorthand resets size and position. */
.custom-btn.uaf-cb--flow {
	background-size: 250% 100% !important;
	background-position: 0 50% !important;
	transition: background-position 0.9s ease;
}
.custom-btn.uaf-cb--flow:hover,
.custom-btn.uaf-cb--flow:focus-visible {
	background-position: 100% 50% !important;
}

/* Respect visitors who turn off motion in their system settings. */
@media (prefers-reduced-motion: reduce) {
	.custom-btn,
	.custom-btn .uaf-cb-fx::before,
	.custom-btn .uaf-cb-fx::after {
		transition: none !important;
		animation: none !important;
	}
}
