/* Ticker Bar Container */
#ttn-bar {
    width: 100%;
    height: 35px; /* Adjustable between 30-40px */
    line-height: 35px;
    overflow: hidden;
    position: relative;
    z-index: 2147483647 !important; /* Max z-index */
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#ttn-bar.ttn-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
}

/* Adjust for WordPress Admin Bar */
body.admin-bar #ttn-bar.ttn-sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #ttn-bar.ttn-sticky {
        top: 46px;
    }
}

.ttn-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    position: relative;
    padding: 0 15px;
}

/* Desktop Carousel */
.ttn-desktop-carousel {
    display: none; /* Hidden by default, shown on desktop */
    height: 100%;
    text-align: center;
    position: relative;
}

.ttn-slide {
    display: none;
    height: 100%;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadein 0.5s;
}

.ttn-slide.active {
    display: block;
}

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

/* Mobile Marquee */
.ttn-mobile-marquee {
    display: block; /* Shown by default (mobile first) */
    height: 100%;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.ttn-marquee-content {
    display: inline-block;
    padding-left: 0; /* Start immediately */
    animation: marquee 15s linear infinite;
}

.ttn-item {
    display: inline-block;
    padding-right: 50px; /* Gap between messages */
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Responsive Breakpoints */
@media (min-width: 768px) {
    .ttn-mobile-marquee {
        display: none;
    }
    .ttn-desktop-carousel {
        display: block;
    }
}
