/* =========================================================
   MAHALAXMI TRADERS — MINIMALIST FROSTED GLASS LOADER
   - Clean, elegant frosted backdrop blur filter
   - No solid green background, no clutter, no side icons
   - Luxury gold & emerald glassmorphic center card
   - High-end spinning gold ring & continuous shimmer bar
   ========================================================= */

/* ---- Loader Backdrop (Frosted Glass Blur) ---- */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    /* Soft translucent frosted glass with high saturation */
    background: 
        radial-gradient(circle at 15% 20%, rgba(198, 154, 69, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(23, 63, 53, 0.06) 0%, transparent 45%),
        rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

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

/* Ambient Center Radial Warmth */
.page-loader::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(198, 154, 69, 0.12) 0%, rgba(231, 199, 123, 0.04) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: loaderAmbientGlow 5s ease-in-out infinite;
}

@keyframes loaderAmbientGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.95; }
}

/* Hide / disable any particles */
.loader-particles {
    display: none;
}

/* ---- Loader Content Card (Glassmorphism Modal) ---- */
.loader-content {
    text-align: center;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid rgba(198, 154, 69, 0.35);
    border-radius: 28px;
    padding: 40px 52px;
    box-shadow: 
        0 26px 70px -15px rgba(23, 63, 53, 0.16),
        0 10px 30px -8px rgba(198, 154, 69, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.95) inset;
    min-width: 320px;
    max-width: 90vw;
}

/* ---- Logo & Spinning Gold Ring ---- */
.loader-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo-circle {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #f7f3eb);
    border: 1.5px solid rgba(198, 154, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(198, 154, 69, 0.15);
}

/* Outer spinning glowing golden ring */
.loader-logo-circle::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #c69a45;
    border-right-color: #e7c77b;
    animation: loaderSpin 1.4s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
    filter: drop-shadow(0 0 6px rgba(198, 154, 69, 0.5));
}

/* Secondary counter-rotating inner accent */
.loader-logo-circle::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px dashed rgba(198, 154, 69, 0.32);
    animation: loaderSpinReverse 5s linear infinite;
}

.loader-logo-circle .loader-leaf {
    font-size: 32px;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(23, 63, 53, 0.18));
    animation: loaderLeafPulse 2.4s ease-in-out infinite;
}

.loader-logo-circle .loader-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 3px 6px rgba(198, 154, 69, 0.3));
    animation: loaderLeafPulse 2.4s ease-in-out infinite;
}

@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loaderSpinReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes loaderLeafPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(6deg);
    }
}

/* ---- Brand Typography ---- */
.loader-brand {
    margin-bottom: 22px;
}

.loader-brand-name {
    display: block;
    font-family: "Cinzel", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #173f35;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.loader-brand-sub {
    display: block;
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #c69a45;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ---- Continuous Smooth Shimmer Progress Bar ---- */
.loader-progress {
    width: 170px;
    height: 3px;
    background: rgba(23, 63, 53, 0.08);
    border-radius: 99px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c69a45 0%, #e7c77b 50%, #c69a45 100%);
    background-size: 200% 100%;
    border-radius: 99px;
    width: 100%;
    box-shadow: 0 0 10px rgba(198, 154, 69, 0.4);
    animation: loaderContinuousShimmer 1.4s linear infinite;
}

@keyframes loaderContinuousShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---- Loading Status Text with Animated Dots ---- */
.loader-text {
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #63726a;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 14px;
    position: relative;
    display: inline-block;
}

.loader-text::after {
    content: '...';
    position: absolute;
    left: 100%;
    margin-left: 2px;
    letter-spacing: 2px;
    animation: loaderDots 1.4s infinite;
}

@keyframes loaderDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* ---- Corner Accents ---- */
.loader-ornament {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: rgba(198, 154, 69, 0.35);
    border-style: solid;
    border-width: 0;
    pointer-events: none;
}

.loader-ornament--tl {
    top: -6px; left: -6px;
    border-top-width: 2px;
    border-left-width: 2px;
    border-top-left-radius: 12px;
}
.loader-ornament--tr {
    top: -6px; right: -6px;
    border-top-width: 2px;
    border-right-width: 2px;
    border-top-right-radius: 12px;
}
.loader-ornament--bl {
    bottom: -6px; left: -6px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-bottom-left-radius: 12px;
}
.loader-ornament--br {
    bottom: -6px; right: -6px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-bottom-right-radius: 12px;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    .loader-content {
        padding: 32px 28px;
        min-width: 280px;
    }
    .loader-brand-name {
        font-size: 19px;
        letter-spacing: 4px;
    }
}
