/**
 * JCS Publisher Bar — styles
 * Loaded by the JCS Publisher Bar WordPress plugin on every frontend page.
 * Namespace: .enterprise-ag__publisher-bar (matches the canonical Enterprise Ag source).
 */

:root {
    --publisher-bar-height: 37px;
}

/* Push theme content down so the fixed bar doesn't overlap it. */
body {
    padding-top: var(--publisher-bar-height) !important;
}

/* Make anchor-link scrolling land below the bar, not hidden under it. */
html {
    scroll-padding-top: var(--publisher-bar-height);
}

/* When the WordPress admin bar is visible (logged-in users), push our bar below it. */
.admin-bar .enterprise-ag__publisher-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .enterprise-ag__publisher-bar {
        top: 46px;
    }
}

/* ==========================================================================
   PUBLISHER BAR
   ========================================================================== */

.enterprise-ag__publisher-bar {
    background: linear-gradient(90deg, #050912 0%, #0a1628 50%, #050912 100%);
    border-bottom: 1px solid rgba(201, 162, 39, 0.28);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998; /* just below WP admin bar (99999), above typical theme headers */
    height: var(--publisher-bar-height);
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 250ms ease, border-color 250ms ease;
    box-sizing: border-box;
}

.enterprise-ag__publisher-bar:hover {
    background: linear-gradient(90deg, #0a1628 0%, #14355a 50%, #0a1628 100%);
    border-bottom-color: rgba(201, 162, 39, 0.55);
}

.enterprise-ag__publisher-bar-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #a4b0bd;
    box-sizing: border-box;
}

.enterprise-ag__publisher-bar-intro {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #8b96a4;
    font-weight: 600;
    letter-spacing: 2px;
    flex-shrink: 0;
}

/* Gold vertical divider after the opener — visually segments the bar */
.enterprise-ag__publisher-bar-intro::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(201, 162, 39, 0.55) 50%, transparent 100%);
    flex-shrink: 0;
}

/* Rotator: cycles between Publications and Events */
.enterprise-ag__publisher-bar-rotator {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 22px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.enterprise-ag__publisher-bar-slide {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    will-change: opacity;
}

.enterprise-ag__publisher-bar-slide--pubs {
    animation: publisherBarFadePubs 11s infinite ease-in-out;
}

.enterprise-ag__publisher-bar-slide--events {
    animation: publisherBarFadeEvents 11s infinite ease-in-out;
}

@keyframes publisherBarFadePubs {
    0%, 42%  { opacity: 1; }
    48%, 92% { opacity: 0; }
    98%      { opacity: 1; }
    100%     { opacity: 1; }
}

@keyframes publisherBarFadeEvents {
    0%, 42%  { opacity: 0; }
    48%, 92% { opacity: 1; }
    98%      { opacity: 0; }
    100%     { opacity: 0; }
}

/* Pause rotation on hover so users can finish reading */
.enterprise-ag__publisher-bar:hover .enterprise-ag__publisher-bar-slide {
    animation-play-state: paused;
}

.enterprise-ag__publisher-bar-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1;
}

.enterprise-ag__publisher-bar-chip--pubs {
    background: rgba(111, 191, 60, 0.14);
    border: 1px solid rgba(111, 191, 60, 0.55);
    color: #8FD14F;
}

.enterprise-ag__publisher-bar-chip--events {
    background: rgba(201, 162, 39, 0.18);
    border: 1px solid rgba(201, 162, 39, 0.6);
    color: #F2D589;
}

.enterprise-ag__publisher-bar-chip svg {
    flex-shrink: 0;
    display: block;
}

.enterprise-ag__publisher-bar-titles {
    color: #c9d2dc;
    font-weight: 500;
    font-size: 10.5px;
    letter-spacing: 1.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.enterprise-ag__publisher-bar-cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 5px 14px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.18) 0%, rgba(242, 213, 137, 0.08) 100%);
    border: 1px solid rgba(242, 213, 137, 0.55);
    border-radius: 999px;
    color: #F2D589;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 2px;
    flex-shrink: 0;
    transition: background 250ms ease, border-color 250ms ease, color 250ms ease, box-shadow 250ms ease, transform 250ms cubic-bezier(.22,1,.36,1);
}

.enterprise-ag__publisher-bar:hover .enterprise-ag__publisher-bar-cta-pill {
    background: linear-gradient(135deg, #F2D589 0%, #C9A227 100%);
    border-color: #F2D589;
    color: #0a1628;
    box-shadow: 0 0 22px rgba(242, 213, 137, 0.45);
    transform: translateX(-2px);
}

.enterprise-ag__publisher-bar-arrow {
    font-size: 13px;
    line-height: 1;
    transition: transform 250ms ease;
}

.enterprise-ag__publisher-bar:hover .enterprise-ag__publisher-bar-arrow {
    transform: translateX(4px);
}

/* === Mobile button row — hidden on desktop, replaces bar under 680px === */
.enterprise-ag__publisher-bar-mobile {
    display: none;
}

/* Responsive breakpoints */
@media (max-width: 1180px) {
    .enterprise-ag__publisher-bar-titles {
        display: none;
    }
}

@media (max-width: 820px) {
    .enterprise-ag__publisher-bar-inner {
        padding: 0 16px;
        gap: 12px;
        font-size: 10.5px;
        letter-spacing: 1.4px;
    }
    .enterprise-ag__publisher-bar-cta-pill {
        padding: 4px 11px;
        font-size: 10px;
        letter-spacing: 1.5px;
    }
    .enterprise-ag__publisher-bar-chip {
        padding: 2px 7px;
        font-size: 8.5px;
        letter-spacing: 1.4px;
    }
}

/* === Mobile: swap desktop bar for three tappable buttons === */
@media (max-width: 680px) {
    /* Hide the desktop bar entirely on small screens */
    .enterprise-ag__publisher-bar {
        display: none !important;
    }
    /* Show the mobile row: brand label + Events + Visit JCS */
    .enterprise-ag__publisher-bar-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99998;
        height: var(--publisher-bar-height);
        display: flex;
        align-items: stretch;
        gap: 10px;
        padding: 5px 12px;
        background: linear-gradient(90deg, #050912 0%, #0a1628 50%, #050912 100%);
        border-bottom: 1px solid rgba(201, 162, 39, 0.28);
        box-sizing: border-box;
    }
    /* Brand identity label (not clickable) — tells mobile users WHAT this bar is */
    .enterprise-ag__publisher-bar-mobile-brand {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        color: #F2D589;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 1.4px;
        text-transform: uppercase;
        white-space: nowrap;
        padding-right: 2px;
        border-right: 1px solid rgba(201, 162, 39, 0.35);
        padding-right: 10px;
        margin-right: 2px;
    }
    .enterprise-ag__publisher-bar-mobile-btn {
        flex: 1 1 0;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 8px;
        border-radius: 6px;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 1.1px;
        text-transform: uppercase;
        text-decoration: none;
        white-space: nowrap;
        transition: background 180ms ease, border-color 180ms ease, transform 120ms ease;
        border: 1px solid transparent;
        line-height: 1;
    }
    .enterprise-ag__publisher-bar-mobile-btn--events {
        background: rgba(242, 213, 137, 0.14);
        border-color: rgba(242, 213, 137, 0.55);
        color: #F2D589;
    }
    /* Visit button — slightly larger / more prominent than Events */
    .enterprise-ag__publisher-bar-mobile-btn--visit {
        flex: 1.45 1 0;
        background: linear-gradient(135deg, #F2D589 0%, #C9A227 100%);
        border-color: #F2D589;
        color: #0a1628;
        font-size: 11.5px;
        letter-spacing: 1.3px;
        box-shadow: 0 0 14px rgba(242, 213, 137, 0.35);
    }
    .enterprise-ag__publisher-bar-mobile-btn:active {
        transform: scale(0.96);
    }
    .enterprise-ag__publisher-bar-mobile-btn--events:active {
        background: rgba(242, 213, 137, 0.26);
    }
    /* When WP admin bar is visible (logged-in users), offset mobile row below it */
    .admin-bar .enterprise-ag__publisher-bar-mobile {
        top: 32px;
    }
}

@media (max-width: 680px) and (max-width: 782px) {
    .admin-bar .enterprise-ag__publisher-bar-mobile {
        top: 46px;
    }
}

@media (max-width: 420px) {
    .enterprise-ag__publisher-bar-mobile {
        padding: 5px 9px;
        gap: 8px;
    }
    .enterprise-ag__publisher-bar-mobile-brand {
        font-size: 9.5px;
        letter-spacing: 1.1px;
        padding-right: 8px;
    }
    .enterprise-ag__publisher-bar-mobile-btn {
        font-size: 9.5px;
        letter-spacing: 0.9px;
        padding: 0 6px;
    }
    .enterprise-ag__publisher-bar-mobile-btn--visit {
        font-size: 10.5px;
        letter-spacing: 1.1px;
    }
}

/* Under 340px (very small phones), hide the brand label so the 2 CTAs have room */
@media (max-width: 340px) {
    .enterprise-ag__publisher-bar-mobile-brand {
        display: none;
    }
}

/* Accessibility: honor prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .enterprise-ag__publisher-bar-slide--pubs {
        animation: none;
        opacity: 1;
    }
    .enterprise-ag__publisher-bar-slide--events {
        animation: none;
        display: none;
    }
    .enterprise-ag__publisher-bar,
    .enterprise-ag__publisher-bar-cta-pill,
    .enterprise-ag__publisher-bar-arrow,
    .enterprise-ag__publisher-bar-mobile-btn {
        transition: none;
    }
}
