/* ------------------------------------------------------------------------
   1. CONTAINERS E LAYOUT
   ------------------------------------------------------------------------ */
#ContainerProdutosVinculados .card-body {
    display: flex;
    flex-direction: column;
}

.tabela-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    width: 100%;
}

/* ------------------------------------------------------------------------
   2. TABELAS
   ------------------------------------------------------------------------ */

#ProdutosTable,
#ProdutosTable *,
#ProdutosVinculadosTable,
#ProdutosVinculadosTable *,
#ModalProdutosTable,
#ModalProdutosTable * {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

#ProdutosTable.table-hover > tbody > tr > td,
#ProdutosTable.table-hover > thead > tr > th,
#ProdutosVinculadosTable.table-hover > tbody > tr > td,
#ProdutosVinculadosTable.table-hover > thead > tr > th,
#ModalProdutosTable.table-hover > tbody > tr > td,
#ModalProdutosTable.table-hover > thead > tr > th {
    border: none !important;
}

#PromocoesTable td {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 400 !important;
}

#ContainerProdutos > .col-12 > .card.card-list,
#ContainerProdutosVinculados > .col-12 > .card.card-list {
    border: none !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------------------
   3. CHECKBOXES
   ------------------------------------------------------------------------ */

#chkAllProdutos:indeterminate,
#chkAllVinculados:indeterminate,
#chkAllModalProdutos:indeterminate {
    opacity: 0.7;
}

#chkAllProdutos:indeterminate::before,
#chkAllVinculados:indeterminate::before,
#chkAllModalProdutos:indeterminate::before {
    content: "";
    display: block;
    width: 10px;
    height: 2px;
    background-color: currentColor;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ------------------------------------------------------------------------
   4. CONTADORES DE SELEÇÃO
   ------------------------------------------------------------------------ */

#containerContadorProdutos,
#containerContadorVinculados,
#containerContadorModal {
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
}

#containerContadorProdutos span,
#containerContadorVinculados span,
#containerContadorModal span {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 400 !important;
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
}

/* ------------------------------------------------------------------------
   5. PAGINAÇÃO
   ------------------------------------------------------------------------ */

#divPaginacaoProdutos,
#divPaginacaoModalProdutos {
    margin-top: 0 !important;
}

#ProdutosVinculadosPagination,
#ProdutosModalPagination {
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    flex: 0 0 auto;
}

/* ------------------------------------------------------------------------
   6. MODAL DE SELEÇÃO DE PRODUTOS
   ------------------------------------------------------------------------ */

#modalSelecionarProdutos .modal-dialog {
    max-width: 90%;
}

#modalSelecionarProdutos .tabela-scroll {
    max-height: 400px;
    overflow-y: auto;
}

#modalSelecionarProdutos thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

/* ------------------------------------------------------------------------
   7. BOTÕES
   ------------------------------------------------------------------------ */

.btn-precos-promocionais {
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin-left: 0 !important;
    background-color: #f9fbfc;
    cursor: pointer;
    outline: none !important;
    max-height: 33px !important;
    min-height: 33px !important;
    font-family: OpenSans-Regular;
    font-size: 12px;
    color: #4285f4;
}

    .btn-precos-promocionais i {
        padding-right: 12px !important;
        font-size: 12px !important;
        color: #4285f4 !important;
        line-height: 1 !important;
    }

#btnRemoverProdutos:disabled,
#btnprecosPromocionaisRemoverProduto:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------------
   8. ESTADOS DE PRODUTO (Já Vinculado / Em Promoção)
   ------------------------------------------------------------------------ */

.produto-ja-vinculado {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
}

.produto-ja-vinculado td {
    color: #6c757d !important;
}

.produto-ja-vinculado input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.produto-em-promocao {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
}

.produto-em-promocao td {
    color: #856404 !important;
}

.produto-em-promocao input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ------------------------------------------------------------------------
   9. BADGES
   ------------------------------------------------------------------------ */

.pp-badge {
    padding: 1px 5px;
    font-size: 0.69rem;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.1;
    position: relative;
    top: -1px;
}

.pp-badge-secondary {
    background-color: #b8babc !important;
    color: #0a0a0a !important;
}

.pp-badge-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.pp-badge-danger {
    background-color: #f64859 !important;
    color: #f8fbfe !important;
}

/* ------------------------------------------------------------------------
   10. INPUTS DE FILTRO
   ------------------------------------------------------------------------ */

#FiltroCodigoPrecoPromocional {
    text-align: left !important;
    -moz-appearance: textfield;
}

    #FiltroCodigoPrecoPromocional::-webkit-inner-spin-button,
    #FiltroCodigoPrecoPromocional::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

#FiltroProdutoPrecoPromocional::placeholder {
    font-size: 12px;
}

/* ------------------------------------------------------------------------
   11. ÍCONES E ELEMENTOS AUXILIARES
   ------------------------------------------------------------------------ */

.pp-info {
    color: #dc3545 !important;
    margin-left: 4px;
}
