/* =========================================================
   GG Newsbar — Full CSS (outside header, full-bleed)
   ========================================================= */

.gg-newsbar {
    /* Themeable vars (overridden inline by plugin settings) */
    --bg: #0f1115;
    --fg: #ffffff;
    --accent: #2c944b;
    --sep: rgba(255,255,255,.35);

    /* Visuals */
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(0,0,0,.15);
    background: var(--bg);
    color: var(--fg);
    font-size: .85rem;
    line-height: 1.3;
    font-size: var(--size, .85rem);

    /* Full-bleed breakout from any parent containers */
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    /* If it's outside the header, likely at top of page: keep it above content */
    display: block;
    z-index: 100; /* raise if it sits under a sticky header */

    /* Prevent micro horizontal scrollbars on some browsers */
    box-sizing: border-box;
    overflow-x: clip;
}

/* Layout */
.gg-newsbar__inner {
    display: flex;
    align-items: center;
    min-height: 44px; /* tap target size */
}

.gg-newsbar__viewport {
    overflow: hidden; /* required for ticker effect */
    flex: 1 1 auto;
}

.gg-newsbar__track {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    will-change: transform; /* animated by JS */
    padding-inline: 1rem;
    list-style: none;
    margin: 0;
}

.gg-newsbar__track.is-single {
    gap: 100vw; /* fallback; JS sets an exact pixel gap at runtime */
}

/* Items & separators */
.gg-newsbar__item {
    flex: 0 0 auto;
    position: relative;
    padding-left: 0;
}

.gg-newsbar__item + .gg-newsbar__item::before {
    content: "•";
    color: var(--sep);
    margin-right: 2rem;
}

.gg-newsbar__track.is-single .gg-newsbar__item::before {
    content: '';
}

/* Links */
.gg-newsbar a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.gg-newsbar a:hover {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

/* Focus styles for a11y */
.gg-newsbar a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-bottom-color: transparent;
}

/* Prefer dynamic viewport units on mobile UIs (iOS Safari / dynamic toolbars) */
@supports (width: 100dvw) {
    .gg-newsbar {
        width: 100dvw;
        margin-left: calc(50% - 50dvw);
        margin-right: calc(50% - 50dvw);
    }
    .gg-newsbar__track.is-single { gap: 100dvw; }
}

/* Reduced motion: stop the animation and allow manual scroll */
@media (prefers-reduced-motion: reduce) {
    .gg-newsbar__track { transform: none !important; }
    .gg-newsbar__viewport { overflow: auto; }
}

/* Optional: if something above/below adds unexpected spacing, control it here */
/*
.gg-newsbar { margin-top: 0; margin-bottom: 0; }
*/

/* Optional: if your site header is sticky and overlapping, bump z-index */
/*
.gg-newsbar { z-index: 999; }
*/
