/**
 * Componente Button - CSS
 * Estilos adicionais para botões (Bootstrap já fornece os estilos base)
 */

/* Container do botão com flexbox */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

/* Botão com largura total (w-100 do Bootstrap) */
.btn.w-100 {
    width: 100%;
    display: flex;
}

/* Ícone do botão */
.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.button-icon i[data-lucide] {
    width: 18px;
    height: 18px;
    display: block;
}

/* Texto do botão */
.button-text {
    display: inline-block;
    line-height: 1.5;
    font-size: inherit;
}

/* Botão com loading */
.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Hover effects personalizados */
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Tamanhos */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    min-height: 36px;
}

.btn-sm .button-icon i[data-lucide] {
    width: 16px;
    height: 16px;
}

.btn-md, .btn {
    font-size: 0.9375rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
    height: 48px;
    box-sizing: border-box;
}

.btn-md .button-icon i[data-lucide],
.btn .button-icon i[data-lucide] {
    width: 18px;
    height: 18px;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    min-height: 56px;
}

.btn-lg .button-icon i[data-lucide] {
    width: 20px;
    height: 20px;
}

/* Botão sem texto (apenas ícone) */
.btn:has(.button-icon):not(:has(.button-text:not(:empty))) {
    padding: 0.5rem;
    width: auto;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm:has(.button-icon):not(:has(.button-text:not(:empty))) {
    padding: 0.375rem;
    min-width: 36px;
}

.btn-lg:has(.button-icon):not(:has(.button-text:not(:empty))) {
    padding: 0.75rem;
    min-width: 56px;
}

/* Esconde texto vazio */
.btn .button-text:empty {
    display: none;
}
