.announcement-bar-wrapper {
    width: 100%;
}
.announcement-bar-wrapper.announcement-bar-position-content-bottom{
    margin-top: 15px;
}
.announcement-bar-wrapper.announcement-bar-position-content-top{
    margin-bottom: 15px;
}

.announcement-bar {
    position: relative;
    width: 100%;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    box-sizing: border-box;
}

.announcement-bar--page-top,
.announcement-bar--page-bottom {
    width: 100%;
}

.announcement-bar--content-top,
.announcement-bar--content-bottom {
    margin: 0 0 20px;
}

.announcement-bar--content-bottom {
    margin-top: 20px;
}

.announcement-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.announcement-bar-message {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Clickable message styles */
.announcement-bar-message--clickable {
    transition: opacity 0.2s ease;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-bar-message--clickable:hover {
    opacity: 0.9;
    text-decoration: none !important;
}

.announcement-bar-marquee__item--clickable {
    transition: opacity 0.2s ease;
}

.announcement-bar-marquee__item--clickable:hover {
    opacity: 0.9;
    text-decoration: none !important;
}

.announcement-bar-message--marquee {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    display: flex;
    align-items: center;
    padding-right: 48px;
}

.announcement-bar-message--marquee>* {
    display: inline-block;
    flex: 0 0 auto;
}

.announcement-bar-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.announcement-bar-marquee__content {
    display: inline-block;
}

.announcement-bar-marquee__item {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-right: 30px;
    white-space: nowrap;
}

/* Prevent trailing 30px gap so cloned segments join seamlessly */
.announcement-bar-marquee__content .announcement-bar-marquee__item:last-child {
    margin-right: 0;
}

.announcement-bar-marquee__text {
    display: inline-block;
    white-space: nowrap;
}

.announcement-bar-marquee__cta {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
}

.announcement-bar-marquee__inner {
    display: inline-flex;
    align-items: center;
    --ca-marquee-group-gap: 30px;
    gap: var(--ca-marquee-group-gap);
    --ca-marquee-distance: 50%;
    animation-name: ca-announcement-marquee;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: running;
    /* Improve animation stability on Firefox/Chrome; reduce jitter and speed fluctuation */
    will-change: transform;
    backface-visibility: hidden;
    /* Additional optimizations for smooth scrolling */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    /* Force hardware acceleration */
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    /* Prevent flickering */
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    /* Ensure smooth animation */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes ca-announcement-marquee {
    0% {
        transform: translateX(0) translateZ(0);
    }

    100% {
        transform: translateX(calc(-1 * var(--ca-marquee-distance))) translateZ(0);
    }
}

.announcement-bar-message p {
    margin: 0;
}

.announcement-bar-marquee--paused .announcement-bar-marquee__inner {
    animation-play-state: paused;
}

.announcement-bar .announcement-bar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    z-index: 3;
    min-width: 22px;
    min-height: 22px;
}

.announcement-bar .announcement-bar-close:hover {
    opacity: 1;
}

.announcement-bar .announcement-bar-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
}

.announcement-bar-cta {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    text-decoration: none;
    padding: 4px 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.announcement-bar-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    color: inherit;
    text-decoration: none;
}

.announcement-bar-close {

    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 5px 7px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin-left: auto;
    font-size: 0;
}

.announcement-bar-close:hover {
    opacity: 1;
    border: none;
}

.announcement-bar-close__symbol {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

/* Carousel Styles */
.announcement-bar-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 40px; /* Ensure carousel has minimum height */
}

.announcement-bar-slide {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* Fade mode: hidden by default */
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    will-change: opacity;
    z-index: 1;
    gap: 15px;
    /* Display controlled via JS/classes to avoid legacy inline styles */
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Keep visible layout (flex centered) during active and leaving states */
.announcement-bar-slide.active,
.announcement-bar-slide.leaving {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.announcement-bar-slide.active {
    opacity: 1;
    z-index: 2;
}

.announcement-bar-slide.leaving {
    opacity: 0;
    z-index: 1;
}

.announcement-bar-slide .announcement-bar-message {

    text-align: center;
}

.announcement-bar-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-left: 20px;
    align-items: center;
}

.announcement-bar-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-bar-dots .dot.active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.announcement-bar-dots .dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .announcement-bar {
        flex-direction: column;
        gap: 12px;
        padding: 10px 15px;
        font-size: 13px;
    }

    .announcement-bar-dots {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .announcement-bar {
        font-size: 12px;
        padding: 8px 12px;
    }

    .announcement-bar-cta {
        padding: 3px 10px;
        font-size: 11px;
    }

    .announcement-bar-dots .dot {
        width: 6px;
        height: 6px;
    }
}
