/* ============================================
   LOADING ANIMATION - Shining Ayurvedic Leaf
   ============================================ */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Leaf Container */
.leaf-loader {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Leaf Icon */
.leaf-icon {
    font-size: 80px;
    color: var(--sage-green);
    position: relative;
    z-index: 2;
    animation: leafFloat 2s ease-in-out infinite;
}

/* Shining Effect - Rotating Glow */
.leaf-shine {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(192, 108, 84, 0.3) 50%,
        transparent 70%
    );
    animation: shineRotate 2s linear infinite;
    z-index: 1;
}

/* Pulsing Glow Around Leaf */
.leaf-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(116, 139, 111, 0.2) 0%,
        rgba(116, 139, 111, 0.1) 40%,
        transparent 70%
    );
    animation: pulseGlow 2s ease-in-out infinite;
    z-index: 0;
}

/* Secondary Glow Layer */
.leaf-glow-2 {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(192, 108, 84, 0.15) 0%,
        rgba(192, 108, 84, 0.05) 50%,
        transparent 70%
    );
    animation: pulseGlow 2.5s ease-in-out infinite;
    animation-delay: 0.5s;
    z-index: 0;
}

/* Floating Particles */
.leaf-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--sage-green);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 3s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 50%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 50%;
    left: 20%;
    animation-delay: 0.5s;
}

.particle:nth-child(3) {
    top: 80%;
    left: 50%;
    animation-delay: 1s;
}

.particle:nth-child(4) {
    top: 50%;
    left: 80%;
    animation-delay: 1.5s;
}

/* Loading Text */
.loader-text {
    margin-top: 30px;
    font-family: var(--font-heading);
    color: var(--sage-dark);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 2px;
    animation: textFade 2s ease-in-out infinite;
}

.loader-subtext {
    margin-top: 10px;
    color: var(--text-medium);
    font-size: 0.9rem;
    font-style: italic;
}

/* Animations */
@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes shineRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1);
    }
    100% {
        transform: translateY(-60px) scale(0);
        opacity: 0;
    }
}

@keyframes textFade {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .leaf-loader {
        width: 100px;
        height: 100px;
    }
    
    .leaf-icon {
        font-size: 60px;
    }
    
    .leaf-glow {
        width: 120px;
        height: 120px;
    }
    
    .leaf-glow-2 {
        width: 140px;
        height: 140px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
}

/* Alternative: SVG Leaf Animation */
.leaf-svg {
    width: 100px;
    height: 100px;
    animation: leafFloat 2s ease-in-out infinite;
}

.leaf-svg path {
    fill: var(--sage-green);
    animation: leafShine 2s ease-in-out infinite;
}

@keyframes leafShine {
    0%, 100% {
        fill: var(--sage-green);
        filter: drop-shadow(0 0 5px rgba(116, 139, 111, 0.5));
    }
    50% {
        fill: var(--terracotta);
        filter: drop-shadow(0 0 15px rgba(192, 108, 84, 0.8));
    }
}
