/* Botão — variantes e tamanhos do design system. Pressionar desloca 1px para baixo. */

.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--raio-md);
    font-family: inherit;
    font-size: 14px;
    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: color-mix(in srgb, var(--primaria) 80%, transparent); }

.botao--contorno {
    background: var(--fundo);
    color: var(--texto);
    border-color: var(--borda);
    box-shadow: var(--sombra-xs);
}
.botao--contorno:hover { background: var(--neutra); }

.botao--fantasma {
    background: transparent;
    color: var(--texto);
}
.botao--fantasma:hover { background: var(--neutra); }

/* Destrutivo é tint, nunca fundo vermelho cheio */
.botao--destrutivo {
    background: color-mix(in srgb, var(--destrutiva) 10%, transparent);
    color: var(--destrutiva);
}
.botao--destrutivo:hover { background: color-mix(in srgb, var(--destrutiva) 20%, transparent); }

.botao--sm { height: 32px; }
.botao--lg { height: 40px; }
.botao--largura-total { width: 100%; }

/* Estado de envio (JS troca o conteúdo e desabilita) */
.botao[data-carregando="true"] { opacity: .7; pointer-events: none; }

.botao .spinner {
    width: 14px;
    height: 14px;
    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); } }
