/* ==========================================================================
   Site UI: scroll-to-top button + FAQ accordions
   (includes/site-settings.php, includes/accordions.php)
   ========================================================================== */

/* ---- Scroll to top ----------------------------------------------------- */
.hs-top {
	--hs-gold: #f9e796;
	position: fixed;
	right: max(20px, env(safe-area-inset-right, 0px));
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: grid;
	place-items: center;
	width: 50px; height: 50px;
	border-radius: 12px;
	background: rgba(5, 15, 27, .82);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .7);
	color: var(--hs-gold) !important;
	text-decoration: none !important;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px) scale(.92);
	transition: opacity .3s ease, transform .4s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .4s, background .3s ease, color .3s ease;
}
.hs-top.is-shown {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}
.hs-top__ring {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	fill: none;
	stroke-width: 1.6;
	overflow: visible;
}
.hs-top__ring rect {
	stroke: var(--hs-gold);
	stroke-dasharray: 100 100;
	stroke-dashoffset: calc(100 - var(--hs-progress, 0));
	stroke-linecap: round;
	transition: stroke-dashoffset .15s linear;
	filter: drop-shadow(0 0 3px rgba(249, 231, 150, .55));
}
.hs-top::before { /* faint track behind the progress ring */
	content: "";
	position: absolute; inset: 1px;
	border: 1px solid rgba(249, 231, 150, .2);
	border-radius: 11px;
}
.hs-top__arrow { position: relative; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.hs-top:hover,
.hs-top:focus-visible {
	background: linear-gradient(180deg, #fdf6d6 0%, #f9e796 46%, #ecca5f 100%);
	color: #0a1630 !important;
	outline: none;
}
.hs-top:hover .hs-top__arrow,
.hs-top:focus-visible .hs-top__arrow { transform: translateY(-2px); }
.hs-top:focus-visible { box-shadow: 0 0 0 3px rgba(249, 231, 150, .5); }

/* Sit above the phone/quote bar on location pages (phones) */
@media (max-width: 767px) {
	.hl-location-page .hs-top { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- FAQ accordions ------------------------------------------------------ */
.hacc {
	--hacc-gold: #f9e796;
	display: grid;
	gap: 12px;
	margin: 28px 0;
	interpolate-size: allow-keywords; /* lets browsers that support it animate to height:auto */
}
.hacc__item {
	border: 1px solid rgba(249, 231, 150, .18);
	border-radius: 12px;
	background: rgba(255, 255, 255, .025);
	transition: border-color .35s ease, background .35s ease, box-shadow .35s ease;
}
.hacc__item:hover { border-color: rgba(249, 231, 150, .35); }
.hacc__item[open] {
	border-color: rgba(249, 231, 150, .45);
	background: linear-gradient(180deg, rgba(249, 231, 150, .07), rgba(255, 255, 255, .02));
	box-shadow: 0 22px 44px -32px rgba(249, 231, 150, .45);
}
.hacc__sum {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 20px 22px;
	cursor: pointer;
	list-style: none;
	border-radius: 12px;
}
.hacc__sum::-webkit-details-marker { display: none; }
.hacc__sum::marker { content: ""; }
.hacc__sum:focus-visible { outline: 2px solid var(--hacc-gold); outline-offset: 2px; }

.hacc .hacc__q {
	margin: 0 !important; /* theme adds 50px above any h2/h3 that follows another element */
	font-family: "Raleway", sans-serif;
	font-size: clamp(17px, 1.6vw, 20px) !important;
	font-weight: 500;
	line-height: 1.35;
	color: var(--hacc-gold);
}
.hacc__icon {
	position: relative;
	flex: none;
	width: 34px; height: 34px;
	border: 1px solid rgba(249, 231, 150, .4);
	border-radius: 9px;
	transition: background .3s ease, border-color .3s ease, transform .4s cubic-bezier(.2, .7, .2, 1);
}
.hacc__icon::before,
.hacc__icon::after {
	content: "";
	position: absolute; left: 50%; top: 50%;
	width: 12px; height: 1.6px;
	margin: -0.8px 0 0 -6px;
	border-radius: 2px;
	background: var(--hacc-gold);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .3s ease;
}
.hacc__icon::after { transform: rotate(90deg); }
.hacc__item[open] .hacc__icon {
	background: linear-gradient(180deg, #fdf6d6 0%, #f9e796 46%, #ecca5f 100%);
	border-color: transparent;
	transform: rotate(180deg);
}
.hacc__item[open] .hacc__icon::before,
.hacc__item[open] .hacc__icon::after { background: #0a1630; }
.hacc__item[open] .hacc__icon::after { transform: rotate(0deg); }

.hacc__a {
	padding: 0 22px 22px;
	color: rgba(255, 255, 255, .86);
	line-height: 1.7;
}
.hacc__a > :first-child { margin-top: 0; }
.hacc__a > :last-child { margin-bottom: 0; }
.hacc__a p { margin: 0 0 1em; }

/* Smooth open/close where the browser supports animating <details> content */
.hacc__item::details-content {
	block-size: 0;
	overflow: hidden;
	transition: block-size .35s cubic-bezier(.2, .7, .2, 1), content-visibility .35s allow-discrete;
}
.hacc__item[open]::details-content { block-size: auto; }

@media (max-width: 600px) {
	.hacc__sum { padding: 16px 16px; }
	.hacc__a { padding: 0 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.hs-top, .hs-top *, .hacc, .hacc * { transition: none !important; }
	.hacc__item::details-content { transition: none; }
}
