﻿/*#region Geral*/

.containerNfe {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.fieldsetNfe {
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 10px;
}

legend {
    font-weight: bold;
    color: #0056b3;
    /*color: #1e5a85;*/
    padding: 0 10px;
    font-size: 1.1em;
    border-bottom: none;
    width: auto;
    margin-bottom: 0px;
}

/*h1 {
    color: #0056b3;
}*/

small {
    display: block;
    padding-bottom: 5px;
}

.form-group {
    padding-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 0;
}

    .form-group .radio-line {
        display: block;
        align-items: center; /* Alinha verticalmente */
        /*margin-bottom: 5px;*/
    }

    .form-group small, .form.group select {
        margin-bottom: 8px;
    }

    .form-group .radio-line label {
        display: inline-block;
        margin-left: 5px;
        cursor: pointer;
    }

    .form-group .radio-line input {
        width: auto;
    }

.form-row {
    display: flex;
    flex-wrap: wrap;
}

.form-col {
    flex: 1 1 45%;
    min-width: 60px;
}

label {
    display: block;
    font-weight: 600;
    padding: 5px;
    color: #444;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .input-wrapper input[type="text"],
    .input-wrapper input[type="number"],
    .input-wrapper input[type="select"] {
        width: 90%;
    }

input, select {
    width: 90%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1;
}

/* Tooltip */
.tooltipNfe {
    position: relative;
    overflow: visible;
}

    .tooltipNfe::after {
        content: attr(tooltip-data); /* Pega o texto do atributo tooltip-data */
        position: absolute;
        bottom: 100%; /* Posiciona acima do botão */
        left: -500px;
        right: -500px;
        margin: auto;
        width: fit-content;
        max-width: 30vw;
        white-space: normal;
        transform: translateX(0%) translateY(-5px);
        background-color: #333333;
        color: #fff;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 0.85em;
        z-index: 1000; /* Garante que fique acima de outros elementos */
        opacity: 0; /* Começa invisível */
        visibility: hidden; /* Esconde completamente até o hover */
        transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
        pointer-events: none; /* Impede que o tooltip interfira com eventos do mouse */
    }

    .tooltipNfe:hover::after {
        opacity: 1;
        visibility: visible;
        /* transform: translateX(-50%) translateY(0); /* Remove o translateY para subir ao hover */
    }

/* Código em linha */
code {
    background-color: #f2f2f2;
    padding: 1px 2px;
    border-radius: 2px;
    font-family: 'Courier New', Courier, monospace;
    color: #c7254e;
    font-size: 0.85em;
    font-weight: 600;
    display: none;
}

.showTags code {
    display: inline-block;
}

.code-always-visible {
    display: inline-block !important;
}

indicator {
    background-color: #f2f2f2;
    padding: 1px 2px;
    border-radius: 2px;
    font-family: 'Courier New', Courier, monospace;
    color: #0056b3;
    font-size: 0.85em;
    font-weight: 600;
}

.text-bold {
    font-weight: bold;
}

/*#endregion*/

/*#region Configurações e Legenda */

/* Estilos para o wrapper do Header da página */
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    display: block;
    /*max-width: 750px;*/
    width: 100%;
    height: 100%;
}

#lbl-mostrarTags {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.vbc-legend-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-flow: row;
    padding-left: 1px;
    margin-bottom: 15px;
    gap: 20px;
}

    /*.vbc-legend-wrapper .form-group {*/
    /* Garante que o form-group não pegue 100% da largura, permitindo o container ao lado */
    /*flex-grow: 1;*/ /* Permite que cresça para preencher o espaço disponível */
    /*padding-bottom: 0;*/ /* Remove padding-bottom, pois o wrapper já tem margin-bottom */
    /*padding-left: 0;*/ /* Remove padding-left, pois o wrapper já tem */
    /*margin-bottom: 0;*/ /* Remove margem inferior, pois o wrapper já tem gap/margin */
    /*}*/

    .vbc-legend-wrapper .form-group label {
        margin-bottom: 5px; /* Ajusta o espaçamento entre o label e o input */
    }

/* Estilos do Container de Legenda */
.container-legenda {
    width: 230px; /* Definido um valor fixo para não depender tanto de porcentagem */
    min-width: 230px;
    height: 150px; /* Baixo */
    background-color: #ffffff;
    border-radius: 25px; /* Bordas bem arredondadas */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra inicial */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    transition: all 0.2s ease-in-out; /* Transição suave para a elevação */
    position: relative;
    box-sizing: border-box; /* Garante que padding não aumente o tamanho total */
    margin-bottom: 20px;
}

    .container-legenda:hover {
        transform: translateY(-5px); /* Leve elevação ao passar o mouse */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Sombra mais pronunciada ao elevar */
    }

.container-legenda-header {
    display: flex;
    align-items: center;
    gap: 10px; /* Espaço entre o h2 e o p */
}

.container-legenda h2 {
    margin-top: 0;
    margin-bottom: 0;
    color: #444;
    font-size: 1.3em;
}

.container-legenda .icones { /* Adicionado ".container-legenda" para especificidade */
    display: flex;
    gap: 15px; /* Espaço entre os ícones */
    margin-bottom: 5px; /* Espaço entre os ícones e o texto "passe o mouse" */
}

    .container-legenda .icones i { /* Adicionado ".container-legenda" para especificidade */
        font-size: 23px; /* Tamanho dos ícones */
        color: #666;
    }

.container-legenda .texto-hover { /* Adicionado ".container-legenda" para especificidade */
    margin-top: 0;
    margin-bottom: 0;
    color: #888;
    font-size: 0.9em;
}


/* Tooltip da área de "Lengendas" */
.container-legenda .tooltipNfe::after {
    bottom: auto;
    top: 125%; /* Posiciona abaixo do botão */
}

/* ----------------------------- */
/* Botões do header da página */
.header-buttons-container {
    margin-right: 20px;
    margin-top: 10px;
}

.header-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #333;
    padding: 8px 20px;
    margin-bottom: 5px;
    background-color: #f5f7fa;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 177px;
}

    .header-button:hover {
        background-color: #e0f2f7; /* Light blue on hover (mantido) */
        border-color: #a7d9ee; /* Slightly darker blue border on hover (mantido) */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover for "elevation" */
        transform: translateY(-3px); /* Slight lift effect */
    }

    .header-button .cronograma-icon {
        width: 24px;
        height: 24px;
        max-width: 24px;
        max-height: 24px;
    }

        .header-button .cronograma-icon img {
            width: 100%;
            height: 100%;
            display: block;
        }
/*#endregion*/

/*#region Informações Iniciais do item */

/* Ícones NFe / NFCe */
/*  Nota: as regras para exibição estão no .accordion-container */
.img-allowed, .img-not-allowed {
    display: none;
}

.icon-container-nfe-nfce {
    width: 80px;
    height: 35px;
    min-width: 80px;
    min-height: 35px;
    max-width: 80px;
    max-height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10); /* Sombra mais pronunciada */
    transition: transform 0.2s ease-in-out;
    display: flex;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    cursor: help;
    transition: transform 0.2s ease-in-out, border-color 0.2s ease;
    margin-left: 10px;
}

    .icon-container-nfe-nfce:hover {
        /* transform: translateY(-5px); */ /* Efeito de elevação ao passar o mouse */
        /*box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 0 10px rgba(220, 53, 69, 0.2);*/
    }

    .icon-container-nfe-nfce img {
        max-width: 90%;
        max-height: 90%;
        height: auto;
        width: auto;
        pointer-events: none;
        background-color: transparent;
    }

    .icon-container-nfe-nfce[use="allowed"] {
        border-color: #28a745;
        background-color: #d4edda;
    }

        .icon-container-nfe-nfce[use="allowed"] .img-allowed {
            display: block;
        }

    .icon-container-nfe-nfce[use="not-allowed"] {
        border-color: #dc3545;
        background-color: #f8d7da;
    }

        .icon-container-nfe-nfce[use="not-allowed"] .img-not-allowed {
            display: block;
        }

#cClassTrib {
    width: 100%;
}

#lblCst, #lblClassTrib {
    display: inline-flex;
    align-items: center;
}

#gTribReg-CSTReg, #gTribReg-cClassTribReg {
    width: 95%;
}


#gIBSCredPres-vCredPresCondSus {
    display: block;
}

/*#endregion*/

/*#region Regime de Tributação */

.regime-choice {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha se não houver espaço */
    gap: 10px;
    justify-content: center;
}

    .regime-choice label {
        display: flex;
        align-items: center; /* Alinha o radio button e o texto verticalmente */
        gap: 8px;
        margin-bottom: 0;
        font-weight: normal;
        white-space: nowrap; /* Impede que o texto dentro da label quebre para a próxima linha */
        padding: 8px 16px;
        border: 1px solid #dcdcdc;
        border-radius: 6px;
        background-color: #f0f4f7;
        cursor: pointer;
        transition: background-color 0.2s ease, border-color 0.2s ease;
        flex-basis: auto; /* Permite que o item seja tão largo quanto seu conteúdo */
        max-width: 100%; /* Garante que não exceda o pai */
    }

        .regime-choice label:hover {
            background-color: #e0e6eb;
            border-color: #b0c4de;
        }

        /* Estilo para a opção de regime exigida */
        .regime-choice label[use="required"] {
            background-color: #d4edda;
            border-color: #28a745;
            color: #155724;
            font-weight: bold;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        /* Estilo para a opção de regime não permitida */
        .regime-choice label[use="not-allowed"] {
            background-color: #f8d7da;
            border-color: #dc3545;
            color: #721c24;
            font-weight: bold;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

    /* Estilo para quando o radio button está selecionado */
    .regime-choice input[type="radio"]:checked + span {
        font-weight: bold;
        color: #0056b3;
    }

    /* Ocultar o radio button nativo para estilizar o próprio label como clicável */
    .regime-choice input[type="radio"] {
        opacity: 0;
        display: none;
        visibility: hidden;
        pointer-events: none; /* Não interage com o mouse */
    }

    /* Estilo do ícone de rádio quando a opção está selecionada */
    .regime-choice label.regime-option-selected .custom-radio-icon {
        background-color: #28a745;
        border-color: #28a745;
    }

        /* Exibir o checkmark quando a opção está selecionada */
        .regime-choice label.regime-option-selected .custom-radio-icon::after {
            opacity: 1; /* Torna o checkmark visível */
        }

/* Estilo para o ícone de rádio personalizado */
.custom-radio-icon {
    display: inline-block;
    width: 20px; /* Tamanho do círculo */
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%; /* Círculo */
    background-color: #fff;
    position: relative; /* Para posicionar o checkmark */
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    /* Estilo do checkmark (inicialmente invisível) */
    .custom-radio-icon::after {
        content: '';
        position: absolute;
        top: 38%;
        left: 50%;
        width: 6px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: translate(-50%, -50%) rotate(45deg);
        opacity: 0; /* Esconde o checkmark por padrão */
        transition: opacity 0.2s ease;
    }

/* Estilo para o ícone de informação (o círculo com '?') */
/*.help-circle {
    background-color: transparent;*/ /* Remove o fundo sólido, deixando-o transparente */
/*color: #6c757d;*/ /* Cor para o ponto de interrogação */
/*border: 1px solid #ced4da;*/ /* Borda do círculo */
/*border-radius: 50%;*/ /* Círcular */
/*width: 22px;
    height: 22px;
    display: inline-flex;*/ /* Centraliza o '?' */
/*align-items: center;*/ /* Centraliza o '?' verticalmente */
/*justify-content: center;*/ /* Centraliza o '?' horizontalmente */
/*font-size: 0.95em;*/ /* Tamanho da fonte do '?' */
/*font-weight: bold;
    cursor: help;*/ /* Indica que é um elemento de ajuda */
/*margin-left: 8px;*/ /* Espaço entre o campo de input e o ícone */
/*transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

    .help-circle:hover::after {
        opacity: 1;
        visibility: visible;
    }

    .help-circle:hover {
        background-color: #e0e6eb;
        border-color: #777;
        color: #333;
    }*/

/*#endregion*/

/*#region Tributação Padrão */

.columns {
    display: flex;
    gap: 20px;
}

.column {
    flex: 1;
    min-width: 0;
}

.sub-group {
    background-color: #fafafa;
    border-color: #e0e0e0;
    min-width: 280px;
}

    .sub-group legend {
        font-size: 1em;
        color: #333;
    }

.accordion-container-overlay-bg {
    background-color: #f9f9f9;
}

.accordion-container {
    margin-bottom: 10px;
    background-color: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: visible; /* Necessário para o tooltip */
    line-height: 1.2;
}

    .accordion-container[entry-rule="required"] .accordion-header {
        background-color: #d4edda;
        color: #155724;
        border-color: #28a745;
        cursor: pointer;
    }

    .accordion-container[entry-rule="not-allowed"] .accordion-header {
        background-color: #f8d7da;
        color: #721c24;
        border-color: #dc3545;
        cursor: not-allowed;
    }

    /* Regras para exibir as bordas coloridas no container (estilos aplicados se o pai tiver um filho com a classe "xxxxx") */
    /*.accordion-container[entry-rule="required"].accordion-container:has(.not-allowed) { } */
    /*.accordion-container[entry-rule="not-allowed"].accordion-container:has(.not-allowed) { } */
    .accordion-container[entry-rule="required"] {
        border-color: #28a745;
    }

    .accordion-container[entry-rule="not-allowed"] {
        border-color: #dc3545;
    }

    /* Regras para exibir os ícones */
    .accordion-container[entry-rule="required"] .icon-group .icon-wrapper.icon-wrapper-required {
        display: flex;
    }

    .accordion-container[entry-rule="not-allowed"] .icon-group .icon-wrapper.icon-wrapper-not-allowed {
        display: flex;
    }

    .accordion-container[entry-rule="optional"] .icon-group .icon-wrapper.icon-wrapper-optional {
        display: flex;
    }

    .accordion-container[entry-rule="conditional"] .icon-group .icon-wrapper.icon-wrapper-conditional {
        display: flex;
    }

/* Abre com os ícones escondidos */
.icon-group .icon-wrapper.icon-wrapper-required,
.icon-group .icon-wrapper.icon-wrapper-not-allowed,
.icon-group .icon-wrapper.icon-wrapper-optional,
.icon-group .icon-wrapper.icon-wrapper-conditional {
    display: none;
}

.icon-input-wrapper .icon-wrapper.icon-wrapper-info {
    cursor: pointer;
}

.icon-group .icon-wrapper.icon-wrapper-info {
    display: flex;
    cursor: pointer;
}

.accordion-header {
    color: #495057;
    width: 100%;
    height: 40px;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.2s;
    margin-top: 0px;
    margin-bottom: 0px;
    border-radius: 4px;
}

.accordion-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 3px;
    height: 100%;
}

.toggle-switch {
    position: relative; /* Mantém para posicionamento absoluto do slider e input */
    display: flex;
    flex-grow: 1; /* Permite que o label ocupe todo o espaço disponível no accordion-header-content */
    width: auto;
    height: 34px; /* Mantém a altura do switch visual */
    cursor: pointer;
    align-items: center;
    gap: 10px;
    padding-left: 6px;
    margin-top: 0px;
}

    .toggle-switch input {
        display: none;
    }

.slider {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: .4s;
    position: relative;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #28a745;
}

    input:checked + .slider:before {
        transform: translateX(16px);
    }

.accordion-body {
    background-color: white;
    max-height: 0; /* Inicia fechado */
    overflow: hidden; /* Esconde o conteúdo extra */
    transition: max-height 0.3s ease-out; /* Apenas transição para max-height */
    border: 0px;
    border-radius: 4px;
    overflow: hidden;
}

    .accordion-body.is-open#section-gPagAntecipado {
        max-height: 1024px !important;
        overflow-y: auto;
        transition: max-height .3s ease-in-out;
    }

    .accordion-body:has(.tooltipNfe:hover) {
        overflow: visible;
    }

#section-gPagAntecipado {
    transition: max-height .6s ease-out;
}

#section-gPagAntecipado input,
#section-gPagAntecipado button {
    margin-bottom: 20px;
}

/* Novo container para as seções de tributação */
.trib-sections-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

    .trib-sections-container > div {
        flex: 1 1 100%; /* Faz com que cada div de seção dentro do container ocupe o espaço disponível */
        /* min-width: 300px; /* Garante uma largura mínima antes de quebrar a linha */
    }

.main-tributary-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.tributary-section-item {
    padding: 0px 8px;
    flex: 0 1 calc(50% - 1px);
    break-inside: avoid; /* IMPORANTE: Evita que o item seja quebrado entre colunas */
    /* min-width: 390px;*/
}

/*  --------------------- Ícones Circle --------------------- */
/*  Nota: as regras para exibição estão no .accordion-container */
.icon-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.icon-wrapper {
    width: 27px;
    height: 27px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* necessário para o tooltip (::before/::after) funcione corretamente */
    cursor: help;
}

.circle-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-left: 4px;
    right: 4px;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

    .circle-icon:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

.icon-svg {
    width: 100%;
    height: 100%;
}

/* Opcional: Estilo para desabilitar cliques nos botões 'Não Permitido'*/
/*.accordion-toggle.not-allowed {
    pointer-events: none;*/ /*Impede eventos de clique*/
/*}*/

.icon-input-wrapper {
    display: flex;
    align-items: center;
}

    .icon-input-wrapper input {
        max-width: 50%;
    }

/*#endregion*/

/* #region Botões para XMLs */

.botaoSubmitNfe {
    /*background-color: #0056b3;*/
    background-color: #1e5a85;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    margin-top: 20px;
}

.botaoValidarXml {
    background-color: #5cb85c;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    margin-top: 20px;
}

.botaoLimparXml {
    /*    background-color: #5cb85c;
    color: white;*/
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    margin-top: 20px;
}

/* --------- */

.botaoNfe {
    /*padding: 12px 20px;*/
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
}

.botaoSubmitNfe2 {
    background-color: #1e5a85;
    color: white;
}

.botaoValidarXml2 {
    background-color: #5cb85c;
    color: white;
}

.botaoLimparXml2 {
}

/*#endregion*/

/*#region Responsividade */

/* Telas menores */
@media (max-width: 1000px) {
    .columns {
        flex-direction: column;
    }

    .column {
        width: 100%;
        margin-bottom: 0px;
    }

    .main-tributary-group {
        display: block;
    }

    .tributary-section-item {
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .vbc-legend-wrapper {
        flex-direction: column; /* Em telas menores, os elementos ficam um abaixo do outro */
        align-items: flex-start; /* Alinha os itens à esquerda na coluna */
    }

    .container-legenda {
        /*width: 100%;*/ /* Ocupa a largura total em telas menores */
        /*margin-top: 15px;*/ /* Adiciona um espaçamento superior quando em coluna */
    }
}

@media (max-width: 1024px) {
    .vbc-legend-wrapper {
        flex-flow: column;
    }
}

/*#endregion*/

/*#region Modais */

/* Fundo escurecido */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,.5);
}

    .custom-modal.show {
        display: block;
    }

/* Caixa / diálgo */
.custom-modal-dialog {
    position: relative;
    margin: 32px auto;
    width: min(1080px, 96vw);
}

/* Conteúdo */
.custom-modal-content {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
    padding: 20px;
    color: #333;
    font-family: Arial, sans-serif;
    line-height: 1.45;
}

/* Cabeçalho */
.modal-header {
    text-align: center;
    border-bottom: 1px solid #eef2f4;
    padding: 14px 12px;
    position: relative;
}

.modal-title {
    margin: 0;
    font-size: 1.3rem; /* menor que antes */
    line-height: 1.25;
    color: #1f2937;
}

.modal-subtitle {
    margin: 4px 0 0;
    font-size: .95rem; /* discreto */
    color: #6b7280;
    font-weight: 400;
}

/* Botão fechar */
.modal-header .close {
    position: absolute;
    right: 10px;
    top: 8px;
    padding: 6px 8px;
    line-height: 1;
    border-radius: 6px;
    opacity: .75;
    transition: background-color .15s ease, opacity .15s ease;
}

    .modal-header .close:hover {
        background: #f3f4f6;
        opacity: 1;
    }

/* Corpo */
.modal-body {
    padding: 14px 6px 4px;
    max-height: calc(90vh - 160px); /* evita estourar a viewport */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Links dentro da modal */
.custom-modal-content a {
    color: #1d4ed8;
    text-decoration: none;
}

    .custom-modal-content a:hover {
        text-decoration: underline;
    }

/* Tabelas */
.modal-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

    .modal-table thead tr {
        font-weight: 700;
    }

    .modal-table th {
        padding: 12px 10px; 
        text-align: center;
        font-weight: 600;
        font-size: .95rem; 
        letter-spacing: .3px;
        background: #f8fafc;
        border-bottom: 1px solid #e5e7eb;
    }

    .modal-table td {
        padding: 12px 10px;
        text-align: center;
        border-bottom: 1px solid #eef2f4;
        font-size: 1rem;
        font-weight: 500;
    }

    .modal-table tr:hover {
        background: #f3f8ff; 
        transition: background-color .12s ease;
    }

    .modal-table th,
    .modal-table td {
        border-left: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
    }

.table-note {
    font-size: 0.95rem;
    color: #6b7280; /* cinza suave */
    margin-top: 6px;
    text-align: right;
    /*font-style: italic;*/
}

/* Chips / tags e destaques existentes */
.aliquota-imposto {
    font-weight: 700;
}

.aliquota-tag {
    background: #2563eb;
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    display: inline-block;
    margin: 2px 0;
}

.aliquota-aliquota {
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669; /* verde */
}

.aliquota-zero {
    color: #dc2626;
}

.aliquota-artigo {
    font-size: .9rem;
    color: #6b7280;
}

/* Abertura de modal */
.modal-open-button {
    cursor: pointer;
    display: inline-block;
    font-weight: normal !important;
}

.dica-button {
    cursor: help;
    display: inline-block !important;
    font-weight: normal !important;
    margin-right: 5px;
}

@media (max-width: 640px) {
    .modal-header {
        padding: 10px 8px;
    }

    .modal-title {
        font-size: 1.15rem;
    }

    .modal-subtitle {
        font-size: .9rem;
    }

    .modal-body {
        padding: 10px 4px 2px;
    }

    .modal-table th, .modal-table td {
        padding: 10px 8px;
        font-size: .95rem;
    }
}

/*#endregion*/