/*
===============================================
Cekkirimanku.com - TRACKING ANIMATIONS
Modern Animation Effects for Tracking Page
Version: 1.0
===============================================
*/

/*
===============================================
FADE IN ANIMATIONS
===============================================
*/

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/*
===============================================
TRACKING CARD ANIMATIONS
===============================================
*/

.tracking__search--card {
    animation: fadeInUp 0.6s ease-out;
}

.shipment__info--card {
    animation: fadeInLeft 0.6s ease-out 0.2s both;
}

.tracking__timeline--card {
    animation: fadeInRight 0.6s ease-out 0.2s both;
}

/*
===============================================
PULSE ANIMATIONS
===============================================
*/

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes pulseScale {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(237, 29, 36, 0.2);
    }
    50% {
        box-shadow: 0 8px 40px rgba(237, 29, 36, 0.4);
    }
}

.tracking__search--icon {
    animation: pulseScale 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/*
===============================================
SLIDE ANIMATIONS
===============================================
*/

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/*
===============================================
TIMELINE ANIMATIONS
===============================================
*/

@keyframes timelineElementSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.vertical-timeline-element {
    animation: timelineElementSlide 0.5s ease-out forwards;
}

.vertical-timeline-element:nth-child(1) {
    animation-delay: 0s;
}

.vertical-timeline-element:nth-child(2) {
    animation-delay: 0.1s;
}

.vertical-timeline-element:nth-child(3) {
    animation-delay: 0.2s;
}

.vertical-timeline-element:nth-child(4) {
    animation-delay: 0.3s;
}

.vertical-timeline-element:nth-child(5) {
    animation-delay: 0.4s;
}

.vertical-timeline-element:nth-child(n+6) {
    animation-delay: 0.5s;
}

/*
===============================================
ICON ANIMATIONS
===============================================
*/

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.shipment__info--label svg,
.tracking__timeline--title svg {
    animation: iconFloat 2s ease-in-out infinite;
}

/*
===============================================
BUTTON ANIMATIONS
===============================================
*/

@keyframes buttonHoverEffect {
    0% {
        box-shadow: 0 4px 16px rgba(237, 29, 36, 0.3);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 8px 24px rgba(237, 29, 36, 0.4);
        transform: translateY(-2px);
    }
    100% {
        box-shadow: 0 12px 48px rgba(237, 29, 36, 0.5);
        transform: translateY(-4px);
    }
}

.tracking__search--submit:hover {
    animation: buttonHoverEffect 0.3s ease-out forwards;
}

/*
===============================================
INPUT ANIMATIONS
===============================================
*/

@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(237, 29, 36, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(237, 29, 36, 0.1);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(237, 29, 36, 0);
    }
}

.tracking__search--input:focus {
    animation: inputFocus 0.4s ease-out;
}

/*
===============================================
SKELETON LOADING
===============================================
*/

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/*
===============================================
RESPONSIVE ANIMATIONS
===============================================
*/

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .tracking__search--card,
    .shipment__info--card,
    .tracking__timeline--card {
        animation-duration: 0.4s;
    }
    
    .vertical-timeline-element {
        animation-duration: 0.4s;
    }
}

/*
===============================================
GLOWING EFFECTS
===============================================
*/

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(237, 29, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(237, 29, 36, 0.8);
    }
}

.vertical-timeline-element.active .vertical-timeline-element-icon {
    animation: glow 1.5s ease-in-out infinite;
}

/*
===============================================
BOUNCE ANIMATIONS
===============================================
*/

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.breadcrumb__title {
    animation: bounce 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

/*
===============================================
END OF TRACKING ANIMATIONS
===============================================
*/
