/* Scrolling Banner Styles */

.scrolling-banner-container {
    width: 100%;
    overflow: hidden;
    /* Background and color set by JavaScript from database */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scrolling-banner {
    display: flex;
    align-items: center;
    padding: 12px 0;
    animation: scroll-left 28s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.scrolling-banner.paused {
    animation-play-state: paused;
}

.banner-item {
    display: inline-flex;
    align-items: center;
    padding: 0 40px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.banner-item:hover {
    opacity: 0.8;
}

.banner-item-clickable {
    cursor: pointer;
}

.banner-item-clickable:hover {
    text-decoration: underline;
}

.banner-separator {
    display: inline-block;
    margin: 0 20px;
    font-size: 1.2rem;
    opacity: 0.6;
}

/* Animation for scrolling from right to left - seamless loop */
@keyframes scroll-left {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scrolling-banner-container {
        font-size: 0.9rem;
    }

    .banner-item {
        padding: 0 30px;
    }

    .scrolling-banner {
        padding: 10px 0;
        animation-duration: 25s;
    }
}

@media (max-width: 480px) {
    .scrolling-banner-container {
        font-size: 0.85rem;
    }

    .banner-item {
        padding: 0 20px;
    }

    .scrolling-banner {
        padding: 8px 0;
        animation-duration: 30s;
    }
}

/* Loading state */
.scrolling-banner-container.loading {
    background: #f0f0f0;
    color: #999;
}

.scrolling-banner-container.loading .scrolling-banner {
    animation: none;
    justify-content: center;
}

/* No banners state */
.scrolling-banner-container.no-banners {
    display: none;
}

/* Adjust header when banner is not present */
body:not(.has-banner) .header {
    top: 0 !important;
}
