/* Shared article table display, theme-aware; no global overrides. */
.cpm-article-table, .cpm-article-html-preview {max-width:100%; overflow-x:auto; min-width:0;}
.article-content, .cpm-article-html-preview {overflow-wrap:anywhere;}
:is(.article-content, .ql-editor, .cpm-article-html-preview) table {
    border-collapse:collapse; width:100%; margin:1rem 0;
    color:var(--bs-body-color); background:var(--bs-body-bg); white-space:normal;
}
:is(.article-content, .ql-editor, .cpm-article-html-preview) :is(td,th) {
    border:1px solid var(--bs-border-color, #64748b); padding:.55rem .7rem; text-align:start; vertical-align:top;
}
:is(.article-content, .ql-editor, .cpm-article-html-preview) th {background:var(--bs-tertiary-bg, #e9ecef); font-weight:700;}
:is(.article-content, .ql-editor, .cpm-article-html-preview) caption {caption-side:top; color:var(--bs-body-color); font-weight:600;}
.article-content .cpm-article-table table {min-width: min-content;}
/* Quill Snow is loaded after this sheet and assigns icon buttons 28 x 24px.
   Target only the text action with higher specificity, leaving icon buttons unchanged. */
#article-editor-toolbar.ql-toolbar button[data-article-html-open] {
    display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
    width:auto; max-width:100%; height:auto; min-height:32px;
    white-space:nowrap; line-height:1.35; padding:.35rem .65rem;
    border:1px solid currentColor; border-radius:.35rem; float:none;
    color:var(--bs-primary-text-emphasis, #157ca3);
}
#article-editor-toolbar.ql-toolbar button[data-article-html-open]:focus-visible {
    outline:2px solid currentColor; outline-offset:2px;
}
@media (max-width:575px) {
    #article-editor-toolbar.ql-toolbar button[data-article-html-open] {min-height:44px;}
}
.cpm-article-html-dialog {width:min(720px, calc(100% - 1.5rem)); max-height:calc(100% - 1.5rem); overflow:auto; padding:1.25rem; border:1px solid var(--bs-border-color); border-radius:.75rem; background:var(--bs-body-bg); color:var(--bs-body-color);}
.cpm-article-html-dialog::backdrop {background:rgba(15,23,42,.55);}
.cpm-article-html-preview {min-height:5rem; max-height:35vh; padding:.75rem; border:1px solid var(--bs-border-color); border-radius:.4rem;}
.cpm-article-html-dialog textarea {font-family:monospace; min-height:7rem; font-size:16px;}
.cpm-article-html-dialog input[type=file] {max-width:100%;}
@media (max-width:575px) {.cpm-article-html-dialog {padding:.85rem;} .cpm-article-html-dialog .btn {min-height:44px;}}

/* Quill Snow ships English link tooltip strings in CSS. Scope to article editors. */
[data-article-editor-language="it"] .ql-snow .ql-tooltip::before {content:"Apri URL:";}
[data-article-editor-language="it"] .ql-snow .ql-tooltip[data-mode=link]::before {content:"Inserisci link:";}
[data-article-editor-language="it"] .ql-snow .ql-tooltip a.ql-action::after {content:"Modifica";}
[data-article-editor-language="it"] .ql-snow .ql-tooltip.ql-editing a.ql-action::after {content:"Salva";}
[data-article-editor-language="it"] .ql-snow .ql-tooltip a.ql-remove::before {content:"Rimuovi";}
[data-article-editor-language="de"] .ql-snow .ql-tooltip::before {content:"URL öffnen:";}
[data-article-editor-language="de"] .ql-snow .ql-tooltip[data-mode=link]::before {content:"Link eingeben:";}
[data-article-editor-language="de"] .ql-snow .ql-tooltip a.ql-action::after {content:"Bearbeiten";}
[data-article-editor-language="de"] .ql-snow .ql-tooltip.ql-editing a.ql-action::after {content:"Speichern";}
[data-article-editor-language="de"] .ql-snow .ql-tooltip a.ql-remove::before {content:"Entfernen";}
