/*
 * SalvatoreMasone.it — Header reference restoration v2.7.24
 * Restores the compact black top bar shown in the reference screenshot.
 * Custom actions such as "Entra nella Community" remain supported.
 */

@media (min-width:821px){
    body.lsm-theme .sm-topbar{
        background:#050505!important;
        color:#fff!important;
        min-height:31px!important;
        font-size:11px!important;
        line-height:1!important;
    }
    body.lsm-theme .sm-topbar .lsm-container{
        width:min(calc(100% - 40px),1240px)!important;
    }
    body.lsm-theme .sm-topbar__inner{
        min-height:31px!important;
        height:31px!important;
        display:flex!important;
        align-items:center!important;
        justify-content:space-between!important;
        gap:20px!important;
        padding:0!important;
    }
    body.lsm-theme .sm-topbar__panel{
        width:100%!important;
        min-width:0!important;
        display:flex!important;
        align-items:center!important;
        justify-content:space-between!important;
        gap:20px!important;
    }
    body.lsm-theme .sm-topbar__nav{
        display:flex!important;
        align-items:center!important;
        flex:1 1 auto!important;
        min-width:0!important;
        margin:0!important;
    }
    body.lsm-theme .sm-topbar__nav .sm-topbar-menu{
        display:flex!important;
        align-items:center!important;
        flex-wrap:nowrap!important;
        gap:27px!important;
        margin:0!important;
        padding:0!important;
        list-style:none!important;
        white-space:nowrap!important;
    }
    body.lsm-theme .sm-topbar__nav .sm-topbar-menu>li{
        flex:0 0 auto!important;
        margin:0!important;
        padding:0!important;
    }
    body.lsm-theme .sm-topbar__nav .sm-topbar-menu>li>a{
        display:flex!important;
        align-items:center!important;
        height:31px!important;
        padding:0!important;
        color:#fff!important;
        font-size:11px!important;
        font-weight:800!important;
        line-height:31px!important;
        text-transform:none!important;
        letter-spacing:0!important;
        opacity:1!important;
        text-decoration:none!important;
        white-space:nowrap!important;
    }
    body.lsm-theme .sm-topbar__right{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-end!important;
        flex:0 0 auto!important;
        min-width:max-content!important;
        margin:0 0 0 auto!important;
        gap:0!important;
        white-space:nowrap!important;
    }
    body.lsm-theme .sm-topbar__social{
        margin-right:12px!important;
    }
    body.lsm-theme .sm-topbar__actions{
        display:flex!important;
        align-items:center!important;
        flex:0 0 auto!important;
        margin:0!important;
    }
    body.lsm-theme .sm-topbar-actions-menu{
        display:flex!important;
        align-items:center!important;
        flex-wrap:nowrap!important;
        gap:8px!important;
        width:auto!important;
        margin:0!important;
        padding:0!important;
        list-style:none!important;
        white-space:nowrap!important;
    }
    body.lsm-theme .sm-topbar-actions-menu>li{
        display:flex!important;
        align-items:center!important;
        flex:0 0 auto!important;
        margin:0!important;
        padding:0!important;
    }
    body.lsm-theme .sm-topbar-actions-menu>li>a{
        box-sizing:border-box!important;
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:auto!important;
        min-width:0!important;
        min-height:27px!important;
        height:27px!important;
        margin:0!important;
        padding:0 12px!important;
        border-radius:5px!important;
        font-size:10px!important;
        font-weight:900!important;
        line-height:25px!important;
        letter-spacing:0!important;
        text-transform:uppercase!important;
        white-space:nowrap!important;
        opacity:1!important;
        text-decoration:none!important;
        transform:none!important;
        box-shadow:none!important;
    }

    /* Newsletter: plain white text, as in the reference screenshot. */
    body.lsm-theme .sm-topbar-action-item--newsletter>a,
    body.lsm-theme .sm-topbar-action-item--link>a{
        min-height:31px!important;
        height:31px!important;
        padding:0 8px!important;
        border:0!important;
        border-radius:0!important;
        background:transparent!important;
        color:#fff!important;
        font-size:10px!important;
        font-weight:800!important;
        line-height:31px!important;
        text-transform:none!important;
    }

    /* ACCEDI: black/transparent fill + thin white border. */
    body.lsm-theme .sm-topbar-action-item--login>a,
    body.lsm-theme .sm-topbar-action-item--outline>a{
        background:#050505!important;
        border:1px solid rgba(255,255,255,.72)!important;
        color:#fff!important;
    }
    body.lsm-theme .sm-topbar-action-item--login>a:hover,
    body.lsm-theme .sm-topbar-action-item--outline>a:hover{
        background:#151515!important;
        border-color:#fff!important;
        color:#fff!important;
    }

    /* ISCRIVITI GRATIS: compact solid red button. */
    body.lsm-theme .sm-topbar-action-item--register>a,
    body.lsm-theme .sm-topbar-action-item--primary>a{
        background:#d90429!important;
        border:1px solid #d90429!important;
        color:#fff!important;
    }
    body.lsm-theme .sm-topbar-action-item--register>a:hover,
    body.lsm-theme .sm-topbar-action-item--primary>a:hover{
        background:#b90020!important;
        border-color:#b90020!important;
        color:#fff!important;
    }

    /* Canonical screenshot proportions. */
    body.lsm-theme .sm-topbar-action-item--login>a{
        min-width:63px!important;
        padding-left:11px!important;
        padding-right:11px!important;
    }
    body.lsm-theme .sm-topbar-action-item--register>a{
        min-width:118px!important;
        padding-left:13px!important;
        padding-right:13px!important;
    }

    /* Extra custom CTA stays compact and cannot stretch the bar. */
    body.lsm-theme .sm-topbar-action-item:not(.sm-topbar-action-item--login):not(.sm-topbar-action-item--register):not(.sm-topbar-action-item--dashboard):not(.sm-topbar-action-item--logout):not(.sm-topbar-action-item--newsletter)>a{
        max-width:190px!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
    }
}

@media (min-width:821px) and (max-width:1180px){
    body.lsm-theme .sm-topbar__nav .sm-topbar-menu{gap:16px!important}
    body.lsm-theme .sm-topbar__nav .sm-topbar-menu>li>a{font-size:10px!important}
    body.lsm-theme .sm-topbar-actions-menu{gap:6px!important}
    body.lsm-theme .sm-topbar-actions-menu>li>a{padding-left:9px!important;padding-right:9px!important;font-size:9px!important}
    body.lsm-theme .sm-topbar-action-item--register>a{min-width:104px!important}
    body.lsm-theme .sm-topbar-action-item--login>a{min-width:56px!important}
}
