/* ========================================
   Announcement Banner - True Marquee
   ======================================== */
.announcement-banner {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 1001 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* Color set via inline style using var(--site-accent-dark) for page theming */
}

.announcement-scroll {
    display: flex;
    position: relative;
    width: 100%;
    height: 24px;
    align-items: center;
}

.announcement-content {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
    animation: marquee-slide 150s linear infinite;
    /* Start off-screen to the right */
    transform: translateX(100vw);
}

/* Faster scroll on desktop */
@media (min-width: 769px) {
    .announcement-content {
        animation-duration: 100s;
    }
}

.announcement-content:hover {
    animation-play-state: paused;
}

.announcement-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.announcement-link {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.announcement-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/*
   Animation breakdown:
   - 0%: Start off-screen right (100vw)
   - 40%: Exit off-screen left (content fully passed)
   - 100%: Stay off-screen (this creates the 3-5 second pause)

   With 15s total duration:
   - ~6s for scrolling across
   - ~9s pause before next loop
*/
@keyframes marquee-slide {
    0% {
        transform: translateX(100vw);
    }
    40% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 768px) {
    .announcement-banner {
        padding: 8px 0;
    }

    .announcement-scroll {
        height: 20px;
    }

    .announcement-text {
        font-size: 0.8rem;
    }

    .announcement-link {
        padding: 4px 12px;
        font-size: 0.75rem;
    }

    /* Slightly faster on mobile */
    .announcement-content {
        animation-duration: 100s;
    }
}
