/* QuicklyFly loading indicators: pure-CSS spinners, layouts and the full-screen holder.
   Shared by the site, the transition preview and the settings screen. */
.quicklyfly-loader {
	--ql-c: var(--quicklyfly-progress-color, #0a3df0);
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, visibility 0s linear .18s;
}
.quicklyfly-loader--preview { position: absolute; z-index: 3; }
.quicklyfly-loader.quicklyfly-loader--overlay { background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.quicklyfly-loader.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.quicklyfly-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-color-scheme: dark) {
	.quicklyfly-loader.quicklyfly-loader--overlay { background: rgba(10, 10, 16, .5); }
}

.quicklyfly-loader__box { display: inline-flex; align-items: center; justify-content: center; max-width: 86vw; }

.quicklyfly-spin { --ql-c: var(--quicklyfly-progress-color, #0a3df0); --ql-size: 44px; position: relative; display: inline-block; flex: none; width: var(--ql-size); height: var(--ql-size); color: var(--ql-c); }

/* Ring */
.quicklyfly-spin--ring::before { content: ""; position: absolute; inset: 0; border: calc(var(--ql-size) * .09) solid color-mix(in srgb, currentColor 20%, transparent); border-top-color: currentColor; border-radius: 50%; animation: ql-rotate .8s linear infinite; }

/* Dots */
.quicklyfly-spin--dots { display: inline-flex; align-items: center; justify-content: space-between; width: calc(var(--ql-size) * 1.18); height: calc(var(--ql-size) * .36); }
.quicklyfly-spin--dots i { width: calc(var(--ql-size) * .27); height: calc(var(--ql-size) * .27); border-radius: 50%; background: currentColor; animation: ql-bounce 1s ease-in-out infinite both; }
.quicklyfly-spin--dots i:nth-child(2) { animation-delay: .15s; }
.quicklyfly-spin--dots i:nth-child(3) { animation-delay: .3s; }

/* Pulse */
.quicklyfly-spin--pulse::before, .quicklyfly-spin--pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: .6; animation: ql-pulse 1.4s ease-out infinite; }
.quicklyfly-spin--pulse::after { animation-delay: .7s; }

@keyframes ql-rotate { to { transform: rotate(360deg); } }
@keyframes ql-bounce { 0%, 80%, 100% { transform: scale(.4); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes ql-pulse { 0% { transform: scale(.1); opacity: .7; } 100% { transform: scale(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
	.quicklyfly-spin::before, .quicklyfly-spin::after, .quicklyfly-spin i, .quicklyfly-spin--custom { animation-duration: 3s !important; }
	.quicklyfly-loader { transition: none; }
}
