/* Full-screen overlay covering the page until it is fully loaded.
   The --loader-* variables are injected on #loader by loader-frontend.php (inline style).
   The spinner itself is styled by loader-preview.css (.loader-preview__spinner), loaded before this file. */
.loader {
	position: fixed;
	inset: 0;
	/* Above the theme header, sticky elements, admin bar, etc. */
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Fallback = same default as the admin preview */
	background-color: var(--loader-bg, #dbdbdb);
	opacity: 1;
	visibility: visible;
	/* Fade-out; visibility switches only at the end so the page becomes clickable afterwards */
	transition: opacity 0.5s ease, visibility 0s linear 0s;
}

/* Class added by loader-frontend.js once the window "load" event has fired */
.loader--hidden {
	opacity: 0;
	visibility: hidden;
	/* Never blocks clicks while fading out */
	pointer-events: none;
	transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}