/**
 * BD Preloader Styles
 * File: wp-content/plugins/bad-dog-elementor-addons/assets/preloader/style.css
 */

/* Base Styles */
.bd-preloader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-preloader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.bd-preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bd-preloader-animation {
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    position: relative;
    width: 60px;
    height: 60px;
}

.bd-preloader-text {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    margin-top: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

/* Fade in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* 1. Spinning Dots */
.bd-preloader-spinning-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 60px;
    height: 20px;
}

.bd-preloader-spinning-dots .dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: spinningDots 1.4s ease-in-out infinite both;
}

.bd-preloader-spinning-dots .dot2 {
    animation-delay: -0.16s;
}

.bd-preloader-spinning-dots .dot3 {
    animation-delay: -0.32s;
}

@keyframes spinningDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 2. Pulsing Circle */
.bd-preloader-pulsing-circle .pulse-circle {
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    position: relative;
    animation: pulseCircle 2s ease-in-out infinite;
}

.bd-preloader-pulsing-circle .pulse-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseCore 2s ease-in-out infinite;
}

@keyframes pulseCircle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

@keyframes pulseCore {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* 3. Bouncing Balls */
.bd-preloader-bouncing-balls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 60px;
    height: 40px;
}

.bd-preloader-bouncing-balls .ball {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: bounceBalls 1.4s ease-in-out infinite both;
}

.bd-preloader-bouncing-balls .ball1 {
    background: var(--primary-color);
}

.bd-preloader-bouncing-balls .ball2 {
    background: var(--secondary-color);
    animation-delay: -0.16s;
}

.bd-preloader-bouncing-balls .ball3 {
    background: var(--primary-color);
    animation-delay: -0.32s;
}

@keyframes bounceBalls {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
}

/* 4. Wave Loader */
.bd-preloader-wave-loader {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 50px;
    height: 40px;
}

.bd-preloader-wave-loader .wave {
    width: 6px;
    background: var(--primary-color);
    animation: waveLoader 1.2s ease-in-out infinite;
    border-radius: 3px;
}

.bd-preloader-wave-loader .wave1 { animation-delay: -1.2s; }
.bd-preloader-wave-loader .wave2 { animation-delay: -1.1s; }
.bd-preloader-wave-loader .wave3 { animation-delay: -1.0s; }
.bd-preloader-wave-loader .wave4 { animation-delay: -0.9s; }
.bd-preloader-wave-loader .wave5 { animation-delay: -0.8s; }

@keyframes waveLoader {
    0%, 40%, 100% {
        height: 15px;
        transform: scaleY(0.4);
    }
    20% {
        height: 40px;
        transform: scaleY(1);
    }
}

/* 5. Morphing Cube */
.bd-preloader-morphing-cube .cube {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    animation: morphCube 2s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes morphCube {
    0%, 100% {
        border-radius: 4px;
        transform: rotate(0deg) scale(1);
    }
    25% {
        border-radius: 50%;
        transform: rotate(90deg) scale(0.8);
    }
    50% {
        border-radius: 4px;
        transform: rotate(180deg) scale(1.1);
    }
    75% {
        border-radius: 50%;
        transform: rotate(270deg) scale(0.9);
    }
}

/* 6. Gradient Spinner */
.bd-preloader-gradient-spinner .gradient-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-color),
        var(--secondary-color),
        transparent
    );
    animation: gradientSpin 1s linear infinite;
    position: relative;
}

.bd-preloader-gradient-spinner .gradient-ring::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
}

@keyframes gradientSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .bd-preloader-animation {
        width: 50px;
        height: 50px;
    }
    
    .bd-preloader-text {
        font-size: 14px;
        margin-top: 15px;
    }
    
    .bd-preloader-spinning-dots {
        width: 50px;
        height: 16px;
    }
    
    .bd-preloader-spinning-dots .dot {
        width: 10px;
        height: 10px;
    }
    
    .bd-preloader-bouncing-balls {
        width: 50px;
        height: 35px;
    }
    
    .bd-preloader-bouncing-balls .ball {
        width: 10px;
        height: 10px;
    }
    
    .bd-preloader-wave-loader {
        width: 42px;
        height: 35px;
    }
    
    .bd-preloader-wave-loader .wave {
        width: 5px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .bd-preloader-gradient-spinner .gradient-ring::before {
        background: #1a1a1a;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bd-preloader-animation {
        --primary-color: #000000;
        --secondary-color: #ffffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bd-preloader-animation * {
        animation-duration: 3s;
        animation-iteration-count: 3;
    }
}