#preloader {
    position: fixed;
    margin: 0;
    padding: 0;
    top: 0;
    left: 0;
    z-index: 999999;
    width: 100vw;
    height: 100vh;
    width: 100dvw;
    height: 100dvh;
    background-color: var(--SmartThemeBlurTintColor);
    color: var(--SmartThemeBodyColor);
    /*for some reason the full screen blur does not work on iOS*/
    backdrop-filter: blur(30px);
    opacity: 1;
}

#load-spinner {
    --spinner-size: 2em;
    transition: all var(--animation-duration-2x) ease-out;
    opacity: 1;
    top: calc(50% - var(--spinner-size) / 2);
    left: calc(50% - var(--spinner-size) / 2);
    position: absolute;
    width: var(--spinner-size);
    height: var(--spinner-size);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Action loader toast styles */
.action-loader-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.action-loader-message {
    flex: 1;
}

.action-loader-stop {
    cursor: pointer;
    font-size: 1.2em;
    opacity: 0.8;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.action-loader-stop:hover {
    opacity: 1;
    color: color-mix(in srgb, currentColor 40%, #e74c3c 60%);
}

/* Splash screen styles for branded loading */
#loader.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    height: 100%;
    transition: all var(--animation-duration-2x) ease-out;
}

#loader.splash-screen #load-spinner {
    position: static;
    top: unset;
    left: unset;
}

.splash-logo {
    /* max original px, or 50% on mobile */
    width: min(150px, 50%);
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.splash-message {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.02em;
}
