/* Karim Home Widgets – back-to-top button with scroll progress ring */

/* Astra's default button is replaced by this one */
#ast-scroll-top {
	display: none !important;
}

.khw-totop {
	--size: 54px;
	position: fixed;
	right: 24px;
	bottom: 56px; /* clears the TrustedSite seal in the corner */
	z-index: 9995; /* above the footer (9991), below popups (9999) and the menu drawer */
	display: grid;
	place-items: center;
	width: var(--size);
	height: var(--size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #0D1B2A;
	color: #FFD700;
	box-shadow: 0 10px 28px rgba(13, 27, 42, .28);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px) scale(.9);
	transition: opacity .3s, visibility .3s, transform .3s, background-color .25s, color .25s;
	-webkit-tap-highlight-color: transparent;
}

.khw-totop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.khw-totop:hover,
.khw-totop:focus-visible {
	background: #FFD700;
	color: #0D1B2A;
}

.khw-totop:focus-visible {
	outline: 2px solid #0D1B2A;
	outline-offset: 3px;
}

/* Progress ring */
.khw-totop .tt-ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	pointer-events: none;
}

.khw-totop .tt-track,
.khw-totop .tt-bar {
	fill: none;
	stroke-width: 3;
}

.khw-totop .tt-track {
	stroke: rgba(255, 255, 255, .16);
}

.khw-totop .tt-bar {
	stroke: #FFD700;
	stroke-linecap: round;
	transition: stroke .25s;
}

.khw-totop:hover .tt-track,
.khw-totop:focus-visible .tt-track {
	stroke: rgba(13, 27, 42, .18);
}

.khw-totop:hover .tt-bar,
.khw-totop:focus-visible .tt-bar {
	stroke: #0D1B2A;
}

.khw-totop .tt-arrow {
	position: relative;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .25s;
}

.khw-totop:hover .tt-arrow {
	transform: translateY(-2px);
}

@media (max-width: 600px) {
	.khw-totop {
		--size: 48px;
		right: 16px;
		bottom: 64px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.khw-totop,
	.khw-totop .tt-arrow {
		transition: opacity .2s, visibility .2s;
	}
}

@media print {
	.khw-totop {
		display: none;
	}
}
