/*
 * Botão de tema claro/escuro do menu lateral. Fica separado de tema-escuro.css porque precisa
 * estar carregado nos dois temas (o CSS do escuro só é ligado para quem usa o modo escuro).
 * O nome contém "tema-escuro", então o "grunt tema-escuro" não converte este arquivo.
 */
/* ----------------------------------------------------------------- botão de tema (os dois temas) */
.sg-tema-toggle {
    position: absolute;
    top: 25px;
    left: 18px;
    z-index: 5;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    outline: none;
}
.sg-tema-trilho {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 62px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: background .25s ease, border-color .25s ease;
}
.sg-tema-toggle:hover .sg-tema-trilho { background: rgba(255, 255, 255, 0.22); }
.sg-tema-toggle:focus-visible .sg-tema-trilho { box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.55); }
.sg-tema-trilho i {
    position: relative;
    z-index: 2;
    width: 14px;
    text-align: center;
    font-size: 13px;
    line-height: 1;
    transition: color .25s ease, opacity .25s ease;
}
.sg-tema-sol { color: #f59e0b; }
.sg-tema-lua { color: rgba(255, 255, 255, 0.55); }
.sg-tema-bola {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform .28s cubic-bezier(.4, 1.4, .6, 1), background .25s ease;
}
html.sg-escuro .sg-tema-bola { transform: translateX(32px); background: #1b1530; }
html.sg-escuro .sg-tema-sol { color: rgba(255, 255, 255, 0.45); }
html.sg-escuro .sg-tema-lua { color: #c4b5fd; }
html.sg-escuro .sg-tema-trilho { background: rgba(0, 0, 0, 0.28); border-color: rgba(167, 139, 250, 0.45); }
/* menu recolhido (só existe no desktop): sem espaço para o botão. No celular ele aparece com o menu aberto. */
@media (min-width: 768px) {
    body.minified .sg-tema-toggle { display: none; }
}

/* transição suave só na troca de tema (a classe some sozinha) */
html.sg-tema-trocando *, html.sg-tema-trocando *::before, html.sg-tema-trocando *::after {
    transition: background-color .3s ease, border-color .3s ease, color .2s ease !important;
}

