/* back-to-top.css - Pulsante torna su */

.btt {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s,
                background-color 0.3s, border-color 0.3s;
    z-index: 89;
}

.btt.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btt:hover {
    background: var(--gray-900);
    border-color: var(--gray-900);
}

.btt:hover svg {
    fill: var(--white);
}

.btt svg {
    width: 18px;
    height: 18px;
    fill: var(--gray-600);
    transition: fill 0.15s;
}

@media (max-width: 768px) {
    /* Senza mobile-bar: sopra mobile-nav (60px) */
    .btt {
        bottom: 76px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    /* Con mobile-bar: btt nascosto — bottom nav + TOC bastano,
       il chrome flottante resta a 4 elementi (reperto 3 valutazione-design) */
    .has-mobile-bar .btt {
        display: none;
    }
}
