/**
 * Codlion Theme - Announcement Bar
 * 
 * Isolated announcement bar styling that sits above the header and hero section
 * - Full-width design with no right-side space issues
 * - Properly isolated from header and hero components
 * - Responsive design for both desktop and mobile
 */

/* Base announcement bar styling */
.announcement-bar {
    background-color: var(--top-bar-bg-color);
    color: var(--top-bar-text-color);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 30px;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.announcement-bar p {
    margin: 0;
    padding: 0;
    opacity: 0.95;
}

.announcement-content {
    width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0 auto;
}

.announcement-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: announcement-marquee 20s linear infinite;
    padding-right: 100px; /* Extra padding to ensure no space on the right */
}

.announcement-text {
    display: inline-block;
    padding: 0 10px;
}

.announcement-separator {
    display: inline-block;
    margin: 0 18px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 8px;
    vertical-align: middle;
}

/* Animation for marquee effect */
@keyframes announcement-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Add padding to body only when announcement bar is present */
body.has-announcement-bar {
    padding-top: 30px; /* Height of announcement bar - Desktop */
}

body.no-announcement-bar {
    padding-top: 0; /* No padding when announcement bar is disabled */
}

/* Responsive styles - Following Development Recommendations */
/* Mobile/Tablet: max-width: 991px (tablets >991px treated as desktop) */
@media (max-width: 991px) {
    body.has-announcement-bar .announcement-bar {
        height: 30px;
        padding: 3px 0;
        font-size: 12px;
        font-weight: 400;
        line-height: 24px;
    }
    
    body.has-announcement-bar {
        padding-top: 30px; /* Only when announcement bar is present */
    }
}
