/* Botão — variantes e tamanhos do kit (molde: UI.MaestroTI), em rem e por token. Pressionar desloca 1px. */

.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 2.4rem;
    padding: 0 0.9rem;
    border: 1px solid transparent;
    border-radius: var(--raio-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.botao:active { transform: translateY(1px); }
.botao, .botao:hover { text-decoration: none; }

.botao--padrao {
    background: var(--primaria);
    color: var(--primaria-texto);
}
.botao--padrao:hover { background: var(--primaria-hover); }

.botao--contorno {
    background: transparent;
    color: var(--texto);
    border-color: var(--borda-campo);
}
.botao--contorno:hover { background: var(--superficie); }

.botao--fantasma {
    background: transparent;
    color: var(--texto);
}
.botao--fantasma:hover { background: var(--superficie); }

/* Destrutivo é tint, nunca fundo vermelho cheio */
.botao--destrutivo {
    background: var(--perigo-fundo);
    color: var(--perigo-texto);
}

.botao--sm { height: 2.1rem; padding: 0 0.75rem; font-size: 0.9rem; }
.botao--lg { height: 2.65rem; }
.botao--largura-total { width: 100%; }

/* Estado de envio (o JS troca o conteúdo e marca data-carregando) */
.botao[data-carregando="true"] { opacity: .7; pointer-events: none; }

.botao .spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: botao-girar .7s linear infinite;
}

@keyframes botao-girar { to { transform: rotate(360deg); } }
