/* News Ticker Styles */
#news-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 45px;
    background-color: #212529;
    color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 300;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#news-ticker .ticker-item {
    display: none;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#news-ticker .ticker-item.active {
    display: flex;
    animation: fadeIn 0.5s ease-in-out forwards;
}

#news-ticker .ticker-item.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

#news-ticker .ticker-source {
    color: #01AEEF;
    font-weight: 500;
    margin-right: 8px;
    text-decoration: none;
    transition: color 0.3s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#news-ticker .ticker-favicon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    vertical-align: middle;
}

#news-ticker .ticker-source:hover {
    color: #00c8ff;
    text-decoration: underline;
}

#news-ticker .ticker-separator {
    color: #6c757d;
    margin: 0 8px;
    flex-shrink: 0;
}

#news-ticker .ticker-title {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

#news-ticker .ticker-title:hover {
    color: #01AEEF;
}

#news-ticker .ticker-nav {
    display: flex;
    gap: 10px;
    margin-left: auto;
    padding-left: 20px;
    flex-shrink: 0;
}

#news-ticker .ticker-nav-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 3px;
}

#news-ticker .ticker-nav-btn:hover {
    background-color: rgba(1, 174, 239, 0.2);
    color: #01AEEF;
}

#news-ticker .ticker-nav-btn:active {
    transform: scale(0.95);
}

#news-ticker .ticker-counter {
    color: #6c757d;
    font-size: 11px;
    margin-left: 15px;
    flex-shrink: 0;
}

/* Loading state */
#news-ticker.loading {
    justify-content: center;
}

#news-ticker .ticker-loading {
    color: #6c757d;
    font-size: 12px;
}

/* Error state */
#news-ticker .ticker-error {
    color: #dc3545;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    #news-ticker {
        font-size: 11px;
        height: 40px;
    }

    #news-ticker .ticker-favicon {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }

    #news-ticker .ticker-source {
        display: none;
    }

    #news-ticker .ticker-counter {
        display: none;
    }

    #news-ticker .ticker-nav {
        padding-left: 10px;
    }
}

/* Adjust body padding to account for fixed ticker */
body {
    padding-top: 45px !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 40px !important;
    }
}
