/**
 * WooCOD AI - Frontend Enhancements CSS
 */

/* ================================
   Announcement Bar (Ticker)
   ================================ */

.acs-ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.acs-ticker-content {
    display: flex;
    animation: acs-ticker-scroll 20s linear infinite;
    white-space: nowrap;
}

.acs-ticker-item {
    padding: 0 50px;
    font-weight: 600;
    font-size: 15px;
    display: inline-block;
}

@keyframes acs-ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

/* Pause on hover */
.acs-ticker-wrapper:hover .acs-ticker-content {
    animation-play-state: paused;
}

/* ================================
   Scroll to Form Button
   ================================ */

#acs-scroll-to-form {
    animation: acs-shake 2s infinite;
}

#acs-scroll-to-form:hover {
    transform: scale(1.1) !important;
    animation: acs-shake-fast 0.5s infinite;
}

#acs-scroll-to-form.show {
    display: block !important;
    animation: acs-slide-in 0.5s ease-out, acs-shake 2s 0.5s infinite;
}

/* Shake Animation */
@keyframes acs-shake {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px) rotate(-2deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px) rotate(2deg);
    }
}

/* Fast Shake on Hover */
@keyframes acs-shake-fast {

    0%,
    100% {
        transform: translateX(0) scale(1.1);
    }

    25% {
        transform: translateX(-3px) scale(1.1);
    }

    75% {
        transform: translateX(3px) scale(1.1);
    }
}

/* Slide In Animation */
@keyframes acs-slide-in {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================================
   Pulsing Glow Effect
   ================================ */

#acs-scroll-to-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    animation: acs-glow 2s infinite;
}

@keyframes acs-glow {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* ================================
   Checkout Form Enhancements
   ================================ */

/* Buy Button Shake */
.acs-checkout-form .submit-button,
.acs-checkout-form button[type="submit"],
#checkout-form button[type="submit"] {
    animation: acs-button-pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.acs-checkout-form .submit-button:hover,
.acs-checkout-form button[type="submit"]:hover,
#checkout-form button[type="submit"]:hover {
    animation: acs-shake 0.5s infinite;
    transform: scale(1.05);
}

/* Button Pulse */
@keyframes acs-button-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

/* Shine Effect on Button */
.acs-checkout-form .submit-button::after,
.acs-checkout-form button[type="submit"]::after,
#checkout-form button[type="submit"]::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: rotate(45deg);
    animation: acs-shine 3s infinite;
}

@keyframes acs-shine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

/* ================================
   Mobile Responsive
   ================================ */

@media (max-width: 768px) {
    .acs-ticker-item {
        font-size: 13px;
        padding: 0 30px;
    }

    #acs-scroll-to-form {
        bottom: 20px;
        left: 20px;
        padding: 12px 24px;
        font-size: 16px;
    }

    @keyframes acs-ticker-scroll {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-50%);
        }
    }
}

/* ================================
   Floating Animation for Form
   ================================ */

.acs-form-wrapper {
    animation: acs-float 3s ease-in-out infinite;
}

@keyframes acs-float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ================================
   Attention Grabber
   ================================ */

.acs-attention-pulse {
    animation: acs-attention 1.5s infinite;
}

@keyframes acs-attention {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}