/* Toggle del tema nella toolbar (COMPONENTI L8). Stile dei bottoni della toolbar, solo icona. */

.hy-theme-toggle {
    justify-content: center;
    min-width: 42px;
    width: 42px;
    padding: 0;
    gap: 0;
    cursor: pointer;
}

.hy-theme-toggle i {
    font-size: 1.05rem;
    margin: 0;
}

.hy-theme-toggle:focus-visible {
    outline: 2px solid var(--hy-focus-ring);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .hy-theme-toggle {
        min-width: 48px;
        width: 48px;
        min-height: 48px;
    }

    .hy-theme-toggle i {
        font-size: 1.22rem;
    }
}

/* Transizione dei colori durante il cambio tema. !important: deve prevalere sulle transizioni dei componenti. */
@media (prefers-reduced-motion: no-preference) {
    html.hy-theme-switching,
    html.hy-theme-switching *,
    html.hy-theme-switching *::before,
    html.hy-theme-switching *::after {
        transition: background-color var(--hy-dur-base) ease, color var(--hy-dur-base) ease, border-color var(--hy-dur-base) ease !important;
    }
}
