/**
 * Announcement Bar CSS - Refactored for Static Positioning
 * Styles for the main announcement bar (relative/static) and marquee animation.
 * Version: 5.0.5
 */

/* Core styles for the bar container */
html body #final-announcement-bar {
    /* --- Positioning --- */
    position: relative; /* Ensures it's part of the document flow */
    border-bottom: 1px solid #000;
    display: block; /* Ensure it takes up block-level space */
    width: 100%;    /* Span full width */
    overflow: hidden !important; /* Prevent content spill */
    /* --- Removed fixed positioning properties --- */
    /* top, left, z-index */

    /* Appearance - using CSS Variables set in PHP */
    background-color: var(--wc-announcement-bg-color, #000000) !important;
    color: var(--wc-announcement-text-color, #ffffff) !important;
    font-size: var(--wc-announcement-font-size, 14px) !important;
    padding: var(--wc-announcement-padding, 10px) 0 !important; /* Vertical padding only */

    /* Text Alignment */
    text-align: center !important;
}

/* Marquee container - wraps the scrolling content */
#final-announcement-bar .marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative; /* Context for marquee content if needed */
}

/* Marquee content - the element that scrolls */
#final-announcement-bar .marquee-content {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;

    /* Base Animation Properties */
    animation-name: wc_marquee_animation;
    animation-timing-function: linear;
    animation-delay: 0s;
    animation-direction: normal;
    animation-fill-mode: none;

    /* Overrides for specific theme conflicts under prefers-reduced-motion */
    /* Ensure these run with !important to beat the theme's !important rules */
    animation-duration: var(--wc-announcement-duration, 20s) !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important; /* Ensure it's not paused */

    opacity: 1;
}


/* Marquee Animation Keyframes */
@keyframes wc_marquee_animation {
    0% {
        transform: translateX(0%);
    }
    100% {
        /* Moves exactly half its width to loop seamlessly with duplicated content */
        transform: translateX(-50%);
    }
}

/* Individual message styling within the marquee */
#final-announcement-bar .final-announcement-message {
    display: inline-block; /* Align messages side-by-side */
    vertical-align: middle; /* Align vertically if line-height differs */
    margin: 0 var(--wc-announcement-spacing, 20px); /* Spacing between messages */
    opacity: 1; /* Make visible immediately */
    text-decoration: none; /* Base decoration */
}

/* Style links and text within messages consistently */
#final-announcement-bar .final-announcement-message,
#final-announcement-bar .final-announcement-message * { /* Apply to children too */
    color: var(--wc-announcement-text-color, #ffffff); /* Use variable */
    font-size: 0.66rem; /* Example base rem value */
    line-height: 1.4;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: 0.4px;
    text-transform: uppercase;
   /* vertical-align: middle; */
}

/* Link hover effect */
#final-announcement-bar .final-announcement-message a:hover {
    text-decoration: underline;
    opacity: 0.85; /* Slight visual feedback */
}

/* --- Removed Body margin adjustments --- */
/* These are highly likely to cause theme conflicts */
/* body { margin-top: ... } */

/* --- Removed Admin bar fixed positioning adjustments --- */
/* No longer needed as the bar is not fixed to the viewport */
/* .admin-bar #final-announcement-bar { top: ... } */


/* Mobile optimizations for the bar */
@media screen and (max-width: 500px) {
    #final-announcement-bar {
        /* Slightly smaller font and padding on mobile */
        font-size: calc(var(--wc-announcement-font-size, 14px) * 0.9) !important; /* Relative adjustment */
        padding: calc(var(--wc-announcement-padding, 10px) - 2px) 0 !important;
    }

    /* Apply mobile spacing between messages */
    #final-announcement-bar .final-announcement-message {
        margin: 0 var(--wc-announcement-mobile-spacing, 10px); /* Use mobile spacing variable */
    }
}

/* --- Removed .wc-country-placeholder styles --- */
/* These styles are in country-shortcode.css */