/* =========================================
   GlobalAccess - Shared Animations
   ========================================= */

/* --- RIS: Blob Background Animation --- */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* --- RIS: Infinite Scroll --- */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    animation: scroll 40s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* --- Mediscan: Laser Scan Animation --- */
@keyframes laser-scan {

    0%,
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    45% {
        transform: translateY(400%);
        opacity: 1;
    }

    50% {
        transform: translateY(400%);
        opacity: 0;
    }
}

.animate-laser {
    animation: laser-scan 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    will-change: transform, opacity;
}

@keyframes doc-pulse {

    0%,
    100%,
    45% {
        transform: scale(1);
        opacity: 1;
    }

    48% {
        transform: scale(0.98);
        opacity: 0.7;
    }

    52%,
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.animate-doc {
    animation: doc-pulse 5s ease-in-out infinite;
    will-change: transform, opacity;
}

@keyframes result-reveal {

    0%,
    48% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    55% {
        transform: scale(1);
        opacity: 1;
    }

    90% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

.animate-result {
    animation: result-reveal 5s ease-out infinite;
    will-change: transform, opacity;
}

@keyframes data-flow {

    0%,
    15% {
        transform: translateX(0);
        opacity: 1;
    }

    35% {
        transform: translateX(10px);
        opacity: 0.6;
    }

    45%,
    100% {
        transform: translateX(20px);
        opacity: 0;
    }
}

.animate-data {
    animation: data-flow 5s ease-out infinite;
    will-change: transform, opacity;
}

.data-delay-1 {
    animation-delay: 0s;
}

.data-delay-2 {
    animation-delay: 0.1s;
}

.data-delay-3 {
    animation-delay: 0.2s;
}

.data-delay-4 {
    animation-delay: 0.3s;
}

@keyframes check-appear {

    0%,
    55% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.15);
        opacity: 1;
    }

    65%,
    90% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

.animate-check {
    animation: check-appear 5s ease-out infinite;
    will-change: transform, opacity;
}

@keyframes bar-fill {

    0%,
    52% {
        width: 0%;
    }

    55% {
        width: 40%;
    }

    58% {
        width: 70%;
    }

    62%,
    100% {
        width: 100%;
    }
}

.animate-bar {
    animation: bar-fill 5s ease-out infinite;
    will-change: width;
}

.bar-delay-1 {
    animation-delay: 0s;
}

.bar-delay-2 {
    animation-delay: 0.15s;
}

@keyframes ring-expand {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.4;
    }

    50% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.animate-ring {
    animation: ring-expand 5s ease-out infinite;
    will-change: transform, opacity;
}

.ring-delay-1 {
    animation-delay: 0s;
}

.ring-delay-2 {
    animation-delay: 0.5s;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    25% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.4;
    }
}

.animate-glow {
    animation: glow-pulse 3s ease-in-out infinite;
    will-change: opacity;
}

/* Scroll Reveal Animations (RIS) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-100 {
    transition-delay: 0.1s;
}

.reveal.delay-200 {
    transition-delay: 0.2s;
}

.reveal.delay-300 {
    transition-delay: 0.3s;
}

.reveal.delay-400 {
    transition-delay: 0.4s;
}

.reveal.delay-500 {
    transition-delay: 0.5s;
}

/* Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Shared UI Components --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}