@font-face {
    font-family:'jh_beirut';
    src: url('../fonts/jh_beirut.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ============== EPAP – Ticker tape (scoped to #bannerMoving) ============== */

/* 0) The strip container (transparent by default, only visible when tape runs) */
#bannerMoving.tcontainer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0px;
    width: 100%;
    height: 60px;
    line-height: 60px;
    font-size: 40px;
    color: #101010;
    overflow: hidden;
    /*background: transparent;                  ⬅️ transparent instead of white */
    /*Fahad: Make tape background semi transparent*/
    background: rgba(255, 255, 255, 0.80);
    z-index: 9999;
    border: 0;                               /* no border line */
    box-shadow: none;                        /* no shadow when idle */
    border-radius: 10px 10px 0 0;
}

/* 1) Global keyframes (top-level, lang-specific names) */
@-webkit-keyframes ticker-en {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
    }
    100% {
        -webkit-transform: translate3d(-100%, 0, 0);
    }
}
@keyframes ticker-en {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

@-webkit-keyframes ticker-ar {
    0% {
        -webkit-transform: translate3d(-100px, 0, 0);
        transform: translate3d(-100px, 0, 0);
        visibility: visible;
    }
    100% {
        -webkit-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
    }
}
@keyframes ticker-ar {
    0% {
        -webkit-transform: translate3d(-100px, 0, 0);
        transform: translate3d(-100px, 0, 0);
        visibility: visible;
    }
    100% {
        -webkit-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
    }
}

/* 2) Lang-specific application of keyframes + padding for seamless infinite */
html[lang="en"] #bannerMoving .ticker-move {
    -webkit-animation-name: ticker-en;
    animation-name: ticker-en;
    padding-right: 100%;  /* Extra space for seamless loop */
}

html[lang="ar"] #bannerMoving .ticker-move {
    -webkit-animation-name: ticker-ar;
    animation-name: ticker-ar;
    padding-left: 100%;  /* Extra space for seamless loop (AR direction) */
}

/* Uniform wrapper */
#bannerMoving .ticker-wrap {
    width: 100%;
    margin-left: 100%;  /* Start off-screen right for both */
}

/* Shared move styles (infinite, no JS restart) */
#bannerMoving .ticker-move {
    display: inline-block;
    background-color: transparent;
    white-space: nowrap;
    height: 60px;
    line-height: 60px;

    /* Infinite loop, linear timing – duration set by JS */
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}

#bannerMoving .ticker-move:hover {
    animation-play-state: paused;
    cursor: pointer;
}

/* 3) Items (exact backend match) */
#bannerMoving .ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 1rem;
    white-space: nowrap;
    overflow: visible !important;
    height: 60px;
    line-height: 1;
}
#bannerMoving .ticker-text {
    display: inline-flex;
    align-items: center;
    height: 100%;
    line-height: 1.5;
    padding-top: 0;
    color: #101010;
}
#bannerMoving .ticker-sep {
    padding-inline: 10px;
    opacity: .6;
    height: 60px;
    line-height: 60px;
}
#bannerMoving .ticker-item.announce .ticker-text {
    font-weight: 700;
}
#bannerMoving img.ticker-img {
    width: 80px !important;
    height: 45px !important;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border-radius: 2px;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

/* 4) AR-specific text direction */
html[lang="ar"] #bannerMoving .ticker-text {
    direction: rtl;
}

/* 5) Reserve page space only when ticker is visible */
body.has-ticker {
    padding-bottom: calc(60px + 1px);
}

@media (max-width:480px){
    #bannerMoving.tcontainer {
        font-size: 20px;
        height: 48px;
        line-height: 48px;
        bottom: 8px;
    }
    #bannerMoving .ticker-wrap,
    #bannerMoving .ticker-move {
        height: 48px;
        line-height: 48px;
    }
    #bannerMoving .ticker-item {
        height: 48px;
    }
    #bannerMoving .ticker-sep {
        height: 48px;
        line-height: 48px;
    }
    #bannerMoving img.ticker-img {
        height: 40px !important;
        width: auto !important;
    }
    body.has-ticker {
        padding-bottom: calc(48px + 12px);
    }
    #bannerMoving .ticker-item.announce .ticker-text {
        font-size: 26px;
    }
}