/* CAS Loading Animation Component */
/* Modular loading animation for reuse across pages */

.cas-loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.cas-loading-container.hiding {
    opacity: 0;
}

/* Logo wrapper */
.cas-logo-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

/* Base logo (without text and glare) */
.cas-logo-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Combined glare element */
.cas-logo-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 50%;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Text element */
.cas-logo-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

/* Spinning animation */
@keyframes cas-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.cas-loading .cas-logo-glare {
    animation: cas-spin 2s linear infinite;
}

.cas-hiding-text .cas-logo-text {
    opacity: 0;
}

/* Scale animation for magnifying effect */
@keyframes cas-magnify-transition {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(5);
        opacity: 0;
    }
}

.cas-magnifying {
    animation: cas-magnify-transition 1s ease-in forwards;
}

/* Progress bar */
.cas-progress-bar {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: rgba(191, 87, 0, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.cas-progress-fill {
    height: 100%;
    background: #BF5700;
    width: 0;
    transition: width 0.3s ease;
}

/* Error state */
.cas-error .cas-logo-base,
.cas-error .cas-logo-glare,
.cas-error .cas-logo-text {
    filter: hue-rotate(180deg) saturate(2);
}

.cas-error .cas-logo-glare {
    animation: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cas-logo-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .cas-progress-bar {
        width: 150px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .cas-logo-wrapper {
        width: 200px;
        height: 200px;
    }
} 