/* Preloader Plugin Styles */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fcfdfd !important;
    background: #fcfdfd !important;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    position: relative;
    background: transparent !important;
    background-color: transparent !important;
}

.preloader-logo {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    animation: logoPulse 2s ease-in-out infinite;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

/* Text below logo */
.preloader-text {
    font-size: 20px;
    /* font-weight: bold; */
    color: #e75a2c;
    font-family: Arial, sans-serif;
    animation: textPulse 2s ease-in-out infinite;
    margin: 5px auto 0 auto;
    text-transform: uppercase;
    text-align: center;
}

/* Logo pulse animation */
@keyframes logoPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Text pulse animation */
@keyframes textPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Spinner rotation animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading dots animation (optional enhancement) */
.preloader-dots {
    margin-top: 20px;
    display: none;
    justify-content: center;
    gap: 5px;
}

.preloader-dot {
    width: 8px;
    height: 8px;
    background-color: #3498db;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.preloader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.preloader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Dark theme support - keeping white background */
@media (prefers-color-scheme: dark) {
    /* Background remains white even in dark mode */
    
    .preloader-spinner {
        border-color: #333333;
        border-top-color: #3498db;
    }
    
    .preloader-dot {
        background-color: #3498db;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .preloader-logo {
        max-width: 150px;
        max-height: 150px;
    }
    
    .preloader-text {
        font-size: 36px;
    }
}

/* Hide preloader when page is loaded */
body.preloader-loaded #preloader {
    display: none;
}

/* Ensure body and html have white background when preloader is active */
body:not(.preloader-loaded) {
    background-color: #fdfdfd !important;
    background: #fdfdfd !important;
}

html:not(.preloader-loaded) {
    background-color: #fdfdfd !important;
    background: #fdfdfd !important;
}

/* Additional override for any theme conflicts */
#preloader * {
    background-color: transparent !important;
    background: transparent !important;
}

#preloader {
    background-color: #fdfdfd !important;
    background: #fdfdfd !important;
}
