/* JuriTotal - correções visuais Vendas / Ficha da Venda V1.1 */

/* O estilo genérico de input da tela Vendas também atingia os checkboxes. */
.vendas-multi-opcoes input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 18px !important;
    accent-color: #14213d;
    cursor: pointer;
}

.vendas-multi-opcoes .vendas-check {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    column-gap: 9px;
    min-height: 36px;
    padding: 7px 9px;
    text-align: left;
}

.vendas-multi-opcoes .vendas-check span {
    min-width: 0;
    text-align: left;
}

.vendas-multi-opcoes {
    min-width: 270px !important;
    width: max-content !important;
    max-width: min(360px, 90vw) !important;
}

/* Impede que painéis do modal sejam alargados pelo conteúdo interno. */
.venda-ficha-panel,
.venda-ficha-duas-colunas > * {
    min-width: 0;
}

/* Dá espaço adequado ao resumo financeiro e evita quebra caractere a caractere. */
.venda-ficha-duas-colunas {
    grid-template-columns:
        minmax(0, 1.75fr)
        minmax(390px, .85fr) !important;
    align-items: start;
}

.venda-ficha-resultado {
    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 24px !important;
}

.venda-ficha-resultado .venda-ficha-campo {
    min-width: 0;
}

.venda-ficha-resultado .venda-ficha-campo small {
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.venda-ficha-resultado .venda-ficha-campo span {
    font-size: 18px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Em telas menores, o resultado financeiro desce para uma linha própria. */
@media(max-width: 1150px) {
    .venda-ficha-duas-colunas {
        grid-template-columns: 1fr !important;
    }

    .venda-ficha-resultado {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
    }
}

@media(max-width: 720px) {
    .venda-ficha-resultado {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }
}

@media(max-width: 480px) {
    .venda-ficha-resultado {
        grid-template-columns: 1fr !important;
    }
}
