.wp-block-eamcn-tabela.eamcn-table-wrap{margin-inline:0;max-width:100%;min-width:0;box-sizing:border-box}
.eamcn-table-wrap .eamcn-table-scroll{max-width:100%;overflow-x:auto}
.eamcn-table-wrap table{border-collapse:collapse!important;border-spacing:0!important;margin:0!important;max-width:100%;box-sizing:border-box;border:0!important}
.eamcn-table-wrap td,.eamcn-table-wrap th{box-sizing:border-box;overflow-wrap:anywhere;min-width:0}
.eamcn-table-wrap .mode-scroll table{min-width:var(--eamcn-table-min,600px);max-width:none}
.eamcn-table-wrap .mode-fit table{table-layout:fixed!important}
.eamcn-table-wrap figcaption{margin-top:8px;text-align:center}

/* Equilibrar as linhas de texto sem alterar o alinhamento escolhido. */
.eamcn-table-wrap td,.eamcn-table-wrap th,.eamcn-table-wrap td > .block-editor-rich-text__editable,.eamcn-table-wrap th > .block-editor-rich-text__editable{text-wrap:balance}
.editor-styles-wrapper .eamcn-table-wrap .eamcn-cell-selected{box-shadow:inset 0 0 0 2px #2271b1;outline-offset:-2px;background-image:linear-gradient(rgba(34,113,177,.10),rgba(34,113,177,.10))}

/* Alinhamento da tabela de largura ajustada ao conteúdo. */
.eamcn-table-wrap table.eamcn-table-align-center{margin-left:auto!important;margin-right:auto!important}
.eamcn-table-wrap table.eamcn-table-align-right{margin-left:auto!important;margin-right:0!important}

/* Largura intrínseca: só quebrar linhas quando a largura disponível o exigir.
   O seletor usa o estilo já guardado, sem alterar a serialização Gutenberg. */
.eamcn-table-wrap .eamcn-table-scroll:not(.mode-scroll) > table[style*="width:auto"],
.eamcn-table-wrap .eamcn-table-scroll:not(.mode-scroll) > table[style*="width: auto"] {
    width: max-content !important;
    max-width: 100% !important;
    table-layout: auto !important;
}
.eamcn-table-wrap table[style*="width:auto"] td,
.eamcn-table-wrap table[style*="width:auto"] th,
.eamcn-table-wrap table[style*="width: auto"] td,
.eamcn-table-wrap table[style*="width: auto"] th,
.eamcn-table-wrap table[style*="width:auto"] .block-editor-rich-text__editable,
.eamcn-table-wrap table[style*="width: auto"] .block-editor-rich-text__editable {
    text-wrap: wrap;
    overflow-wrap: break-word;
}

/* Em mobile, equilibrar também as tabelas ajustadas ao conteúdo,
   sem modificar o cálculo da largura intrínseca em desktop. */
@media (max-width: 689px) {
    .eamcn-table-wrap .eamcn-table-scroll table td,
    .eamcn-table-wrap .eamcn-table-scroll table th,
    .eamcn-table-wrap .eamcn-table-scroll table td *,
    .eamcn-table-wrap .eamcn-table-scroll table th * {
        text-wrap: balance !important;
        line-height: 1.25 !important;
    }
}

/* Balance each logical line independently; explicit breaks remain intact. */
.eamcn-table-wrap .eamcn-table-logical-line { display: contents; }
@media (max-width: 689px) {
    .eamcn-table-wrap .eamcn-table-scroll table .eamcn-table-logical-line {
        display: block;
        white-space: normal;
        overflow-wrap: break-word;
        text-wrap: balance !important;
    }
    .eamcn-table-wrap .eamcn-table-line-break { display: none; }
    .eamcn-table-wrap .eamcn-table-scroll table td,
    .eamcn-table-wrap .eamcn-table-scroll table th { overflow-wrap: break-word; }
}
@media (min-width: 1000px) {
.eamcn-table-wrap .eamcn-table-scroll.eamcn-table-scroll > table[style*='--eamcn-desktop-width'] { width: var(--eamcn-desktop-width) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-desktop-pad-top'] { padding-top: var(--eamcn-desktop-pad-top) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-desktop-pad-right'] { padding-right: var(--eamcn-desktop-pad-right) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-desktop-pad-bottom'] { padding-bottom: var(--eamcn-desktop-pad-bottom) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-desktop-pad-left'] { padding-left: var(--eamcn-desktop-pad-left) !important; }
}
@media (min-width: 690px) and (max-width: 999px) {
.eamcn-table-wrap .eamcn-table-scroll.eamcn-table-scroll > table[style*='--eamcn-tablet-width'] { width: var(--eamcn-tablet-width) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-tablet-pad-top'] { padding-top: var(--eamcn-tablet-pad-top) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-tablet-pad-right'] { padding-right: var(--eamcn-tablet-pad-right) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-tablet-pad-bottom'] { padding-bottom: var(--eamcn-tablet-pad-bottom) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-tablet-pad-left'] { padding-left: var(--eamcn-tablet-pad-left) !important; }
}
@media (max-width: 689px) {
.eamcn-table-wrap .eamcn-table-scroll.eamcn-table-scroll > table[style*='--eamcn-mobile-width'] { width: var(--eamcn-mobile-width) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-mobile-pad-top'] { padding-top: var(--eamcn-mobile-pad-top) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-mobile-pad-right'] { padding-right: var(--eamcn-mobile-pad-right) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-mobile-pad-bottom'] { padding-bottom: var(--eamcn-mobile-pad-bottom) !important; }
.eamcn-table-wrap .eamcn-table-scroll table :is(td,th)[style*='--eamcn-mobile-pad-left'] { padding-left: var(--eamcn-mobile-pad-left) !important; }
}
