/* 
 * Page Loader Styles
 * Modern loading spinner with brand colors
 */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.loader-spinner {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    position: relative;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid #f3f4f6;
    border-top-color: #D40511;
    border-right-color: #0052A5;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-spinner::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 3px solid transparent;
    border-top-color: #FFCC00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

.loader-text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.5px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-logo {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #D40511 0%, #0052A5 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 1s ease-in-out infinite;
}

.loader-logo svg {
    width: 24px;
    height: 24px;
    fill: white;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .loader-spinner {
        width: 60px;
        height: 60px;
    }

    .loader-text {
        font-size: 14px;
    }

    .loader-logo {
        width: 35px;
        height: 35px;
    }
}