/**
 * Site UI: back-to-top control, and button hover states.
 *
 * BUTTON HOVER lives here because Elementor would not generate it. Both native
 * routes were tried and both wrote without error while producing no CSS at all:
 * per-element `hover` on the e-button, and a `hover` block on the global
 * btn-primary / btn-outline classes. Verified by enumerating every stylesheet
 * and finding zero :hover rules matching the buttons. Until that is understood,
 * the hover is defined here so it actually works.
 *
 * Colours follow the site's own button system: #05D16E fill, #24F08D on hover
 * for the solid variant, and the hollow variant filling green with ink text.
 */

/* ── Button hover ─────────────────────────────────────────────────────────── */

.elementor .btn-primary,
.elementor .btn-outline {
	transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.elementor .btn-primary:hover,
.elementor .btn-primary:focus-visible {
	background-color: #24F08D;
	border-color: #24F08D;
	color: #30303C;
}

/* Hollow: the border must travel with the fill, or it reads as a stray outline. */
.elementor .btn-outline:hover,
.elementor .btn-outline:focus-visible {
	background-color: #05D16E;
	border-color: #05D16E;
	color: #30303C;
}

/* ── Back to top ──────────────────────────────────────────────────────────── */

/* Hidden until the page has been scrolled; back-to-top.js toggles is-visible.
   Kept out of the tab order and hidden from assistive tech while invisible, so
   it is not a phantom stop for keyboard and screen-reader users.

   Styled to mirror the WPConsent cookie settings button (fixed, 20px from the
   corner, #1b4f8f, white icon, 5px radius, soft shadow) so the two form a
   matching pair. It sits bottom-RIGHT, opposite the cookie button's bottom-left,
   so they never overlap. */
.back-to-top {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-end: 20px;
	z-index: 900;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;

	border: 0;
	border-radius: 5px;
	background-color: #1b4f8f;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .1);

	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease,
		visibility .25s ease, background-color .3s ease;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
	background-color: #163f72;
}

.back-to-top:focus-visible {
	outline: 2px solid #1b4f8f;
	outline-offset: 2px;
}

.back-to-top svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* A touch smaller on small screens; the 20px inset matches the cookie button. */
@media (max-width: 767px) {
	.back-to-top {
		width: 40px;
		height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.back-to-top { transition: opacity .25s ease, visibility .25s ease; transform: none; }
	.back-to-top.is-visible { transform: none; }
}

@media print {
	.back-to-top { display: none; }
}
