﻿.news-ticker {
    display: flex;
    overflow: hidden; /* Vital to hide text when it is "off-screen" */
    white-space: nowrap;
    /*direction: rtl;*/ /* Corrects Arabic character and punctuation flow */
    width: 100%;
    background: #222; /* Optional background */
    cursor: pointer;
}

.news-content {
    display: inline-block;
    /* We use 'linear' for a consistent speed */
    animation: scroll-right 50s linear infinite;
}

/* Stops the animation when mouse hovers over the bar */
.news-ticker:hover .news-content {
    animation-play-state: paused;
    cursor: pointer;
}

@keyframes scroll-right {
    0% {
        /* Starts the news bar completely hidden on the left */
        transform: translateX(-80vw);
    }

    100% {
        /* Moves the news bar across the screen to the right edge */
        transform: translateX(100vw);
    }
}
