/* Global page progress + AJAX shimmer (replaces old full-page logo preloader) */

.at-page-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 100000;
    pointer-events: none;
    background: transparent;
    overflow: hidden;
}
.at-page-progress:not([hidden]) {
    display: block;
}
.at-page-progress::before {
    content: "";
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--secondary-color, #e41f27), transparent);
    animation: at-page-progress-slide 0.9s ease-in-out infinite;
}
@keyframes at-page-progress-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.at-ajax-shimmer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.at-ajax-shimmer[style*="display: block"],
.at-ajax-shimmer.is-visible {
    display: flex !important;
}
.at-ajax-shimmer__card {
    width: min(320px, calc(100vw - 32px));
    padding: 20px 18px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e8e8ea;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}
.at-ajax-shimmer__progress {
    height: 4px;
    border-radius: 999px;
    background: #f1f1f3;
    overflow: hidden;
    margin-bottom: 16px;
}
.at-ajax-shimmer__progress span {
    display: block;
    height: 100%;
    width: 45%;
    border-radius: inherit;
    background: var(--secondary-color, #e41f27);
    animation: at-shimmer-bar 1s ease-in-out infinite;
}
@keyframes at-shimmer-bar {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}
.at-ajax-shimmer__rows {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}
.at-shimmer-block {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f2 20%, #e4e4e7 50%, #f0f0f2 80%);
    background-size: 200% 100%;
    animation: at-shimmer-move 1.1s linear infinite;
}
.at-shimmer-block.is-lg { width: 100%; height: 14px; }
.at-shimmer-block.is-md { width: 78%; }
.at-shimmer-block.is-sm { width: 52%; }
@keyframes at-shimmer-move {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.at-ajax-shimmer__label {
    margin: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.02em;
}

/* Faster page interaction: do not lock the whole UI until window load */
body.loading {
    overflow: visible;
    pointer-events: auto;
}
