/*
 * This file is part of Moodle - http://moodle.org/
 *
 * Moodle is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 */

#local-pageloader.local-pageloader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#local-pageloader.local-pageloader.is-visible {
    display: flex;
}

#local-pageloader .local-pageloader__panel {
    min-width: 220px;
    max-width: min(90vw, 520px);
    padding: 24px 28px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    text-align: center;
    font-family: inherit;
}

#local-pageloader .local-pageloader__spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border: 5px solid rgba(0, 0, 0, 0.12);
    border-top-color: #ff7a00;
    border-radius: 50%;
    animation: local-pageloader-spin 0.85s linear infinite;
}

#local-pageloader .local-pageloader__text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

#local-pageloader .local-pageloader__longwait {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
    color: #5f6670;
}

@keyframes local-pageloader-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #local-pageloader .local-pageloader__spinner {
        animation-duration: 1.8s;
    }
}

/* Never display a loader instance explicitly disabled by loader.js. */
#local-pageloader.local-pageloader.is-disabled,
#local-pageloader.local-pageloader.is-disabled.is-visible {
    display: none !important;
}
