/* ERA Find a Rebuilder Badge */

.era-frb {
	display: inline-block;
	vertical-align: middle;
	width: var(--era-frb-size, 140px);
	max-width: 100%;
	aspect-ratio: 1 / 1;
	line-height: 0;
	border-radius: 50%;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
	transition: transform .18s ease, filter .18s ease;
}

.era-frb .era-frb__img {
	display: block;
	width: 100%;
	height: 100%;
}

.era-frb:hover,
.era-frb:focus-visible {
	transform: translateY(-3px) scale(1.04);
}

.era-frb:focus-visible {
	outline: 3px solid #164927;
	outline-offset: 3px;
}

/* Inline badge from the [era_rebuilder_badge] shortcode */
.era-frb-wrap { line-height: 0; }
.era-frb-wrap--left { text-align: left; }
.era-frb-wrap--center { text-align: center; }
.era-frb-wrap--right { text-align: right; }

/* Floating corner badge */
.era-frb--floating {
	position: fixed;
	z-index: 990; /* below the admin bar, Elementor popups and site notices */
	bottom: 20px;
	right: 20px;
	width: var(--era-frb-size, 120px);
	filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .28));
	animation: era-frb-pop .55s cubic-bezier(.34, 1.56, .64, 1) .5s backwards;
}

.era-frb--floating:hover,
.era-frb--floating:focus-visible {
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .34));
}

.era-frb--bottom-left {
	right: auto;
	left: 20px;
}

@media (max-width: 767px) {
	.era-frb--floating {
		width: var(--era-frb-size-sm, 90px);
		bottom: 14px;
		right: 14px;
	}

	.era-frb--bottom-left {
		right: auto;
		left: 14px;
	}
}

/* Never twice on one screen, and never on top of the search form itself */
body:has(.era-frb--inline) .era-frb--floating,
body:has(.far-wrap) .era-frb--floating {
	display: none;
}

@keyframes era-frb-pop {
	from { opacity: 0; transform: scale(.5); }
	to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.era-frb { transition: none; animation: none; }
	.era-frb:hover,
	.era-frb:focus-visible { transform: none; }
}

@media print {
	.era-frb--floating { display: none !important; }
}
