/* ==========================================================================
   SUNYA - Top Bar
   ========================================================================== */

.sunya-topbar {
    /* v1.5.4: il fallback era --sunya-color-primary (legacy, navy fisso):
       la topbar restava #1a1a2e invece della superficie scura del sito.
       --sunya-topbar-bg dal Customizer continua a vincere se impostato. */
    background-color: var(--sunya-topbar-bg, var(--sunya-color-surface-dark, var(--sunya-color-primary)));
    color: var(--sunya-topbar-color, var(--sunya-color-text-on-dark, #ffffff));
    font-size: var(--sunya-font-size-sm);
    line-height: 1.4;
    position: relative;
    z-index: 1001;
}

.sunya-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: var(--sunya-spacing-md);
    padding: var(--sunya-spacing-xs) 0;
}

.sunya-topbar__left,
.sunya-topbar__center,
.sunya-topbar__right {
    display: flex;
    align-items: center;
    gap: var(--sunya-spacing-md);
}

.sunya-topbar__center {
    flex: 1;
    justify-content: center;
}

.sunya-topbar__text {
    white-space: nowrap;
}

.sunya-topbar__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sunya-topbar__text a:hover {
    opacity: 0.85;
}


/* --- Stile promo --- */
.sunya-topbar--promo .sunya-topbar__text--highlight {
    font-weight: var(--sunya-font-weight-bold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


/* --- Menu secondario nella top bar --- */
.sunya-topbar__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--sunya-spacing-md);
}

.sunya-topbar__menu a {
    color: inherit;
    font-size: var(--sunya-font-size-sm);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity var(--sunya-transition-fast);
}

.sunya-topbar__menu a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* --- Pulsante chiudi --- */
.sunya-topbar__close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: var(--sunya-spacing-xs);
    opacity: 0.7;
    transition: opacity var(--sunya-transition-fast);
    flex-shrink: 0;
    line-height: 1;
}

.sunya-topbar__close:hover {
    opacity: 1;
}

.sunya-topbar__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}


/* --- Nascosta (after dismiss) --- */
.sunya-topbar--hidden {
    display: none;
}


/* --- Responsive --- */
@media screen and (max-width: 768px) {

    .sunya-topbar__left,
    .sunya-topbar__right {
        display: none;
    }

    .sunya-topbar__center {
        justify-content: center;
        width: 100%;
    }

    .sunya-topbar__text {
        white-space: normal;
        text-align: center;
        font-size: 0.75rem;
    }
}
