/* Botão — variantes e tamanhos do design system, nas cores de botão do Dark Modern.
   Densidade do editor: padrão 32px, sm 28px, lg 36px (só no login). Pressionar desloca 1px. */

.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--raio-md);
    font-family: inherit;
    font-size: 13px;
    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(--secundaria); color: var(--texto-forte); }

.botao--fantasma {
    background: transparent;
    color: var(--texto);
}
.botao--fantasma:hover { background: var(--realce); color: var(--texto-forte); }

/* Destrutivo é tint, nunca fundo vermelho cheio */
.botao--destrutivo {
    background: color-mix(in srgb, var(--destrutiva) 15%, transparent);
    color: var(--destrutiva);
}
.botao--destrutivo:hover { background: color-mix(in srgb, var(--destrutiva) 25%, transparent); }

.botao--sm { height: 28px; padding: 0 10px; font-size: 12px; }
.botao--lg { height: 36px; }
.botao--largura-total { width: 100%; }

/* Desabilitado (ex.: formulário ainda inválido): apagado, sem o deslocamento de clique */
.botao:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* 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); } }
