/* News Bar Ticker Styles */
.auto-menu-news-bar {
    width: 100vw;
    height: 40px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.auto-menu-news-bar-empty {
    width: 100vw;
    height: 40px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
    margin: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.news-bar-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.news-bar-content {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: newsBarScroll 30s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    position: relative;
    gap: 0;
    /* Force hardware acceleration */
    transform: translate3d(0, 0, 0);
}

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

/* Force animation to work - removed duplicate */

.news-item {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    height: 100%;
    border-right: 1px solid #e1e5e9;
    min-width: fit-content;
    max-width: none;
    margin: 0;
    flex-shrink: 0;
}

.news-item:hover {
    color: #007cba;
    text-decoration: none;
    background: rgba(0, 123, 186, 0.05);
}

.news-item:last-child {
    border-right: none;
}

.news-title {
    font-weight: 500;
    margin-right: 3px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

.news-date {
    font-size: 0.85em;
    color: #666;
    margin-right: 3px;
    font-weight: normal;
}

.news-author {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
    font-style: italic;
}

.news-separator {
    color: #999;
    font-weight: bold;
    padding: 0 2px;
    margin: 0;
    flex-shrink: 0;
}

/* News Bar Animation - More aggressive approach for seamless scrolling */
@keyframes newsBarScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-25%, 0, 0);
    }
}

/* Ensure animation is always running with better timing */
.news-bar-content {
    animation: newsBarScroll 30s linear infinite !important;
}

/* Override any conflicting animations */
.news-bar-content {
    animation-name: newsBarScroll !important;
    animation-duration: 30s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-fill-mode: forwards !important;
    animation-delay: 0s !important;
}

/* Fallback animation for when JavaScript is disabled */
.auto-menu-news-bar:not(.js-enabled) .news-bar-content {
    animation: newsBarScroll 30s linear infinite !important;
}

/* Pause on hover functionality */
.auto-menu-news-bar[data-pause-on-hover="true"] .news-bar-content:hover {
    animation-play-state: paused;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auto-menu-news-bar {
        height: 35px;
        font-size: 13px;
    }
    
    .news-item {
        padding: 0 6px;
    }
    
    .news-title {
        margin-right: 2px;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
    }
    
    .news-date,
    .news-author {
        font-size: 0.8em;
        margin-right: 2px;
    }
    
    .news-separator {
        padding: 0 1px;
    }
}

@media (max-width: 480px) {
    .auto-menu-news-bar {
        height: 30px;
        font-size: 12px;
    }
    
    .news-item {
        padding: 0 5px;
        min-width: fit-content;
        max-width: none;
    }
    
    .news-title {
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
    }
    
    .news-separator {
        padding: 0 1px;
    }
}

/* Loading state */
.auto-menu-news-bar.loading {
    opacity: 0.7;
}

.auto-menu-news-bar.loading .news-bar-content {
    animation: none;
}

/* Focus styles for accessibility */
.news-item:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}

/* Custom speed variations */
.auto-menu-news-bar[data-speed="slow"] .news-bar-content {
    animation-duration: 60s;
}

.auto-menu-news-bar[data-speed="fast"] .news-bar-content {
    animation-duration: 20s;
}

.auto-menu-news-bar[data-speed="very-fast"] .news-bar-content {
    animation-duration: 10s;
}

/* Smooth scrolling for better performance */
.news-bar-content {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Hover effects */
.news-item {
    position: relative;
    overflow: hidden;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 186, 0.1), transparent);
    transition: left 0.5s ease;
}

.news-item:hover::before {
    left: 100%;
}

/* Control buttons removed - keeping only keyboard controls */

/* News bar with gradient background */
.auto-menu-news-bar.gradient {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
}

/* News bar with border accent */
.auto-menu-news-bar.border-accent {
    border-left: 4px solid #007cba;
}

/* Compact mode */
.auto-menu-news-bar.compact {
    height: 30px;
    font-size: 12px;
}

.auto-menu-news-bar.compact .news-item {
    padding: 0 5px;
}

/* Large mode */
.auto-menu-news-bar.large {
    height: 50px;
    font-size: 16px;
}

.auto-menu-news-bar.large .news-item {
    padding: 0 12px;
} 