/* ============================================================
   PAGE LOADING SCREEN — included on every page
   Full-viewport overlay with the SalBAYAN icon in the centre and
   orange/pink pulse rings radiating outward. Shown from first paint
   (this file loads in <head>, the markup sits first in <body>) and
   removed by js/loader.js once the page has fully loaded, or when
   a page-specific script calls SalBAYANLoader.show()/hide().
   ============================================================ */

.sb-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: #ffffff;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.sb-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sb-loader-stage {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-loader-icon {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(245, 130, 32, 0.35));
    animation: sb-loader-float 1.8s ease-in-out infinite;
}

/* Three staggered rings expand out from behind the icon and fade —
   the "radiating" effect. Ring 1 & 3 are brand orange, ring 2 the
   brand pink from the icon's orbit lines. */
.sb-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid #f58220;
    opacity: 0;
    transform: scale(0.55);
    animation: sb-loader-radiate 2.1s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.sb-loader-ring:nth-child(2) { border-color: #e83e8c; animation-delay: 0.7s; }
.sb-loader-ring:nth-child(3) { animation-delay: 1.4s; }

/* Soft glow that breathes behind the icon */
.sb-loader-glow {
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 130, 32, 0.35) 0%, rgba(245, 130, 32, 0) 70%);
    animation: sb-loader-breathe 1.8s ease-in-out infinite;
}

.sb-loader-text {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #f58220;
}

.sb-loader-text::after {
    content: '';
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: sb-loader-dots 1.2s steps(4, end) infinite;
}

@keyframes sb-loader-radiate {
    0%   { opacity: 0.9; transform: scale(0.55); }
    100% { opacity: 0;   transform: scale(1.75); }
}
@keyframes sb-loader-breathe {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50%      { transform: scale(1.2); opacity: 1; }
}
@keyframes sb-loader-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-5px) scale(1.04); }
}
@keyframes sb-loader-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

@media (prefers-reduced-motion: reduce) {
    .sb-loader-ring, .sb-loader-glow, .sb-loader-icon { animation-duration: 4s; }
}
