/*
 * Footer Marquee Animation Styles
 */

/* View Transition API opt-in for cross-document transitions */
@view-transition {
  navigation: auto;
  types: forward, backward;
}

footer {
    width: 100%;
    overflow: hidden;
    padding: 1rem 0;
}

.footer-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #f5f5f5;
    display: none;
}

.footer-marquee-wrapper.footer-visible {
    display: block;
}

.footer-marquee-track {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    width: fit-content;
    animation: scroll-marquee 60s linear infinite;
    padding: 1rem 0;
}

.footer-marquee-wrapper:hover .footer-marquee-track {
    animation-play-state: paused;
}

.footer-marquee-link {
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    font-size: 1.2rem;
    padding: 0;
    transition: opacity 0.2s ease;
}

.footer-marquee-link:hover {
    opacity: 0.7;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* View Transition API - Push from bottom animation */
@keyframes push-in-from-bottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes push-in-from-top {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes push-out-to-top {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes push-out-to-bottom {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Configure View Transition animations using CSS custom properties */
/* Animation names are set dynamically via JavaScript using CSS variables */
::view-transition-new(root) {
    animation-name: var(--vt-new-animation, push-in-from-bottom);
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

::view-transition-old(root) {
    animation-name: var(--vt-old-animation, push-out-to-top);
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-marquee-link {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    .footer-marquee-track {
        gap: 2rem;
        animation-duration: 40s;
    }
}

/* Reduced motion support - disable all animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable view transition animations */
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}
