/* Host-independent editor component; page adapters only arrange its neighboring chat. */
.wdt-table-editor { color:var(--wdt-color-text,#172337); background:var(--wdt-color-surface,#fff); border-radius:20px; padding:24px; min-width:0; box-shadow:0 12px 40px #172b4c15; }
.wdt-table-editor header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.wdt-table-editor h2 { margin:6px 0 0; font:500 23px/1.3 'Space Grotesk',sans-serif; }
.wdt-table-editor small,.wdt-editor-caption,.wdt-table-editor footer { color:var(--wdt-color-muted,#52657c); font-size:12px; }
.wdt-editor-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.wdt-table-editor :is(button,a) { border:0; border-radius:999px; padding:10px 14px; background:var(--wdt-color-field,#e8edf5); color:var(--wdt-color-action,#0765b5); cursor:pointer; text-decoration:none; font:500 13px/1.4 Geist,sans-serif; }
.wdt-table-editor .wdt-editor-primary { background:var(--wdt-color-action,#0765b5); color:var(--wdt-color-surface,#fff); }
.wdt-table-editor button:disabled { opacity:.45; cursor:default; }
.wdt-table-editor :is(button,input,a):focus-visible { outline:2px solid var(--wdt-color-action,#0765b5); outline-offset:3px; }
.wdt-editor-render { display:block; width:100%; height:460px; border:0; border-radius:12px; margin:20px 0; background:white; }
.wdt-editor-loading { min-height:300px; display:grid; place-content:center; }
.wdt-editor-grid { overflow:auto; margin:16px 0; }
.wdt-editor-grid table { border-collapse:collapse; width:100%; }
.wdt-editor-grid :is(th,td) { padding:6px; min-width:140px; border-bottom:1px solid var(--wdt-color-border,#dbe3ee); }
.wdt-table-editor input { box-sizing:border-box; width:100%; min-width:0; border:1px solid var(--wdt-color-border,#dbe3ee); background:var(--wdt-color-field,#e8edf5); color:inherit; padding:10px; border-radius:8px; }
.wdt-editor-title-input { display:block; margin:20px 0; }
.wdt-editor-error { color:var(--wdt-color-text); background:#e55b6320; padding:12px; border-radius:10px; }
.wdt-table-editor footer { margin-top:18px; }
.wdt-tabella-conversation.wdt-has-editor { display:grid; grid-template-columns:minmax(270px,.8fr) minmax(420px,1.4fr); column-gap:24px; align-items:start; }
.wdt-has-editor > header { grid-column:1; }
.wdt-has-editor > .wdt-chat-log { grid-column:1; grid-row:2; max-height:470px; overflow:auto; }
.wdt-has-editor > .wdt-chat-draft { grid-column:2; grid-row:1 / span 6; margin:0; padding:0; background:transparent; border:0; }
.wdt-has-editor > :is(.wdt-chat-suggestions,.wdt-chat-progress,.wdt-chat-form) { grid-column:1; }
.wdt-has-editor .wdt-chat-message { font-size:14px; }
dialog.wdt-tabella-chat:has(.wdt-has-editor) { width:min(1440px,96vw)!important; max-width:96vw!important; }
.wdt-ai-start:has(.wdt-has-editor) { max-width:none; }
.wdt-has-editor .wdt-table-editor { animation:wdt-editor-enter .3s ease-out; }
@keyframes wdt-editor-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@media(max-width:1000px) { .wdt-tabella-conversation.wdt-has-editor { display:flex; flex-direction:column; gap:14px; } .wdt-has-editor > * { width:100%; box-sizing:border-box; } .wdt-has-editor > .wdt-chat-log { max-height:280px; } .wdt-editor-render { height:360px; } }
@media(prefers-reduced-motion:reduce) { .wdt-has-editor .wdt-table-editor { animation:none; } }
.wdt-has-editor > .wdt-ai-start { grid-column:1; min-width:0; padding:14px!important; margin:0!important; }
.wdt-ai-home:has(.wdt-has-editor) .wdt-main-chat { max-width:none!important; }
.wdt-has-editor .wdt-ai-composer-actions { flex-wrap:wrap; gap:8px; }
.wdt-has-editor .wdt-chat-model-label { max-width:180px; min-width:0; }
.wdt-has-editor .wdt-ai-start textarea { font-size:15px!important; min-height:74px!important; }
.wdt-has-editor .wdt-data-start { font-size:12px; }
.wdt-table-editor { text-align:left; }
.wdt-table-editor > header { justify-content:space-between!important; }
.wdt-editor-plan { margin:14px 0; color:var(--wdt-color-muted); font-size:13px; }
.wdt-editor-plan summary { cursor:pointer; }
.wdt-ai-home:has(.wdt-has-editor) > h1 { font-size:28px!important; margin:12px 0!important; }
.wdt-ai-home:has(.wdt-has-editor) .wdt-ai-home-brand { margin-bottom:10px; }
body.wpdt-c .wdt-browse-refresh .wdt-table-editor .wdt-editor-primary { background:var(--wdt-color-action,#0765b5)!important; color:var(--wdt-color-surface,#fff)!important; }
body.wpdt-c .wdt-browse-refresh .wdt-table-editor button { font-size:13px; }
/* Keep the split dialog's setup control quiet and compact. */
.wdt-browse-refresh .wdt-tabella-chat:has(.wdt-has-editor)[open] { gap:12px; }
.wdt-tabella-chat .wdt-browse-setup-toggle { border:0; border-radius:999px; padding:8px 12px; background:transparent; color:var(--wdt-color-muted); font:500 13px/1.4 Geist,sans-serif; cursor:pointer; }
.wdt-tabella-chat .wdt-browse-setup-toggle:hover { background:var(--wdt-color-field); color:var(--wdt-color-action); }
.wdt-tabella-chat .wdt-browse-setup-toggle:focus-visible { outline:2px solid var(--wdt-color-action); outline-offset:2px; }
.wdt-settings-diff { display:grid; gap:14px; margin:24px 0; }
.wdt-settings-diff > div { padding:14px; border-radius:12px; background:var(--wdt-color-field); }
.wdt-settings-diff dt { font-size:12px; color:var(--wdt-color-muted); margin-bottom:6px; }
.wdt-settings-diff dd { margin:0; overflow-wrap:anywhere; }
