/**
 * YMCA Loading Animation Styles
 * Spinning and bouncing YMCA logo loader
 */

/* Loading Overlay */
.ymca-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 95, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ymca-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loader Container */
.ymca-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

/* YMCA Logo Holder */
.ymca-logo-circle {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    animation: ymca-bounce 1.1s ease-in-out infinite;
    overflow: hidden;
}

.ymca-logo-image {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    max-height: 88px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 50% !important;
    clip-path: circle(50%) !important;
    filter: drop-shadow(0 16px 30px rgba(15, 23, 42, 0.28));
    animation: ymca-spin 2.3s linear infinite;
}

/* Bouncing animation container */
.ymca-loader::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    bottom: -30px;
    animation: ymca-shadow-bounce 1s ease-in-out infinite;
}

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

/* Bouncing Animation */
@keyframes ymca-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-24px);
    }
}

/* Shadow bounce animation */
@keyframes ymca-shadow-bounce {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(0.6);
        opacity: 0.1;
    }
}

/* Loading Text */
.ymca-loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: ymca-text-pulse 1.5s ease-in-out infinite;
}

@keyframes ymca-text-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ymca-logo-circle {
        width: 76px;
        height: 76px;
    }

    .ymca-logo-image {
        width: 76px !important;
        height: 76px !important;
        min-width: 76px !important;
        max-width: 76px !important;
        max-height: 76px !important;
    }
    
    .ymca-loading-text {
        font-size: 16px;
    }
}
