/* Shared Free/paid Tabella AI setup UI. */
.wdt-browse-refresh .wdt-tabella-setup { text-align:left; color:var(--wdt-color-text); }
.wdt-browse-refresh .wdt-tabella-guide-heading { display:flex; gap:16px; align-items:center; margin-bottom:16px; }
.wdt-browse-refresh .wdt-tabella-guide-heading .wdt-tabella-character { width:52px; height:52px; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-guide-heading h2 { font:500 23px/1.25 'Space Grotesk',sans-serif; letter-spacing:-.6px; margin:5px 0 0; }
.wdt-browse-refresh .wdt-tabella-guide-eyebrow { font-size:10px; letter-spacing:1.2px; color:var(--wdt-color-action); }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-setup p { font-size:13px; line-height:1.65; margin:12px 0; color:var(--wdt-color-muted); }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-setup .wdt-tabella-introduction { color:var(--wdt-color-text); font-size:15px; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-setup :is(.wdt-tabella-scripted,.wdt-tabella-scope-note) { font-size:11px; }
.wdt-browse-refresh .wdt-tabella-questions { display:flex; gap:8px; flex-wrap:wrap; margin:18px 0 12px; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-setup button { border:0; border-radius:12px; background:var(--wdt-color-field); color:var(--wdt-color-action); padding:10px 14px; font:500 12px/1.4 Geist,sans-serif; cursor:pointer; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-setup button:hover { box-shadow:0 0 16px #7aaeff25; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-setup button:disabled { opacity:.55; cursor:wait; }
.wdt-browse-refresh .wdt-tabella-answer { background:var(--wdt-color-field); padding:16px; border-radius:14px; font-size:13px; line-height:1.65; }
.wdt-browse-refresh .wdt-tabella-steps { display:flex; flex-wrap:wrap; gap:14px; list-style:none; margin:24px 0 12px; padding:0; }
.wdt-browse-refresh .wdt-tabella-steps li { display:flex; align-items:center; gap:7px; color:var(--wdt-color-muted); font-size:11px; }
.wdt-browse-refresh .wdt-tabella-steps b { border-radius:50%; background:var(--wdt-color-field); color:var(--wdt-color-action); width:24px; height:24px; display:grid; place-items:center; }
.wdt-browse-refresh .wdt-tabella-connection { padding:16px 18px; border-radius:18px; background:linear-gradient(125deg,#7d94cf12,#8c75c31b); }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-connection .wdt-tabella-status { margin-top:0; }
.wdt-browse-refresh .wdt-tabella-settings { margin:0 8px 8px 0; }
.wdt-browse-refresh .wdt-tabella-test { margin-top:18px; }
.wdt-browse-refresh .wdt-tabella-test label { display:grid; gap:7px; font-size:12px; font-weight:500; color:var(--wdt-color-text); }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-model { width:100%; max-width:100%; border:1px solid var(--wdt-color-border); border-radius:10px; color:var(--wdt-color-text); background:var(--wdt-color-field); font:13px Geist,sans-serif; padding:10px; height:auto; }
.wdt-browse-refresh .wdt-tabella-chat { overflow-y:auto; }
.wdt-browse-refresh .wdt-tabella-chat > * { flex-shrink:0; }
.wdt-browse-refresh .wdt-tabella-setup [hidden] { display:none!important; }
.wdt-browse-refresh .wdt-tabella-connection[data-state=verified] { background:#48b99c1a; }
.wdt-browse-refresh .wdt-tabella-connection[data-state=error] { background:#d58c641a; }
.wdt-browse-refresh .wdt-tabella-setup[data-activity=testing] .wdt-tabella-character { animation:wdt-setup-think 1s steps(2,end) infinite; }
@keyframes wdt-setup-think { 50% { transform:translateY(-3px) rotate(5deg); } }
@media(prefers-reduced-motion:reduce) { .wdt-browse-refresh .wdt-tabella-setup .wdt-tabella-character { animation:none!important; } }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-settings.btn { border:0; border-radius:12px; padding:10px 14px; font-size:12px; color:#fff; }
body.wpdt-c .wdt-dashboard-refresh .wdt-ai-start .wdt-setup-invitation { min-height:100px; margin:0 0 18px; padding:8px 0; font:400 24px/1.45 'Space Grotesk',sans-serif; letter-spacing:-.45px; color:var(--wdt-color-muted); }
body.wpdt-c .wdt-dashboard-refresh .wdt-ai-start [hidden] { display:none!important; }
@media(max-width:782px) { body.wpdt-c .wdt-dashboard-refresh .wdt-ai-start .wdt-setup-invitation { font-size:20px; min-height:80px; } }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-connection-actions { display:flex; align-items:stretch; gap:10px; flex-wrap:wrap; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-connection-actions > :is(a,button) { display:inline-flex; align-items:center; justify-content:center; margin:0; min-height:40px; box-sizing:border-box; padding:10px 14px; font:500 12px/1.4 Geist,sans-serif; }
.wdt-browse-refresh .wdt-tabella-conversation { margin-top:24px; padding:24px; background:var(--wdt-color-surface); border-radius:22px; text-align:left; }
.wdt-browse-refresh .wdt-tabella-conversation[hidden] { display:none!important; }
.wdt-browse-refresh .wdt-tabella-conversation header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-conversation h2 { font:500 23px/1.3 'Space Grotesk',sans-serif; margin:0; color:var(--wdt-color-text); }
.wdt-browse-refresh .wdt-chat-log { max-height:520px; overflow:auto; margin:20px 0; }
.wdt-browse-refresh .wdt-chat-message { padding:18px; margin:12px 0; border-radius:16px; background:var(--wdt-color-field); font:14px/1.65 Geist,sans-serif; color:var(--wdt-color-text); overflow-wrap:anywhere; }
.wdt-browse-refresh .wdt-chat-message[data-role=user] { margin-left:10%; background:#648dde20; }
body.wpdt-c .wdt-browse-refresh .wdt-chat-message p { color:inherit; font-size:14px; margin:8px 0; }
.wdt-browse-refresh .wdt-chat-message ul { list-style:disc; padding-left:22px; }
.wdt-browse-refresh .wdt-chat-plan { margin-top:16px; padding:16px; background:#7194f018; border-radius:12px; }
.wdt-browse-refresh .wdt-chat-plan ol { padding-left:22px; }
.wdt-browse-refresh .wdt-chat-suggestions { display:flex; flex-wrap:wrap; gap:8px; }
body.wpdt-c .wdt-browse-refresh .wdt-tabella-conversation button { border:0; border-radius:12px; padding:10px 14px; font:500 12px/1.4 Geist,sans-serif; color:var(--wdt-color-action); background:var(--wdt-color-field); cursor:pointer; }
.wdt-browse-refresh .wdt-chat-form label { display:grid; gap:8px; color:var(--wdt-color-text); }
body.wpdt-c .wdt-browse-refresh .wdt-chat-form textarea { width:100%; box-sizing:border-box; padding:14px; border-radius:14px; background:var(--wdt-color-field); color:var(--wdt-color-text); border:1px solid var(--wdt-color-border); font:14px/1.6 Geist,sans-serif; resize:vertical; }
.wdt-browse-refresh .wdt-chat-form > div { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:12px; }
.wdt-browse-refresh .wdt-chat-form small { color:var(--wdt-color-muted); max-width:70%; }
.wdt-browse-refresh .wdt-chat-progress { color:var(--wdt-color-action); min-height:20px; }
.wdt-browse-refresh .wdt-tabella-conversation button:disabled { opacity:.5; cursor:wait; }

/* One Dashboard conversation: transcript, suggestions and the original main composer. */
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat { max-width:940px; margin:28px auto 0; background:var(--wdt-color-surface); border-radius:26px; box-shadow:0 12px 40px #172d6420; overflow:hidden; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-tabella-conversation { margin:0; padding:24px 28px 0; background:transparent; border-radius:0; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-ai-start { margin:0; max-width:none; border-radius:0; box-shadow:none; background:transparent; padding:20px 28px 24px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-log { max-height:460px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-chat-model { max-width:210px; min-width:0; height:38px; padding:7px 28px 7px 10px; border:0; border-radius:10px; background:var(--wdt-color-field); color:var(--wdt-color-text); font:12px Geist,sans-serif; }
body.wpdt-c .wdt-dashboard-refresh .wdt-chat-model-label { margin:0 0 0 auto; }
body.wpdt-c .wdt-dashboard-refresh .wdt-chat-privacy { display:block; text-align:left; font:11px/1.6 Geist,sans-serif; color:var(--wdt-color-muted); margin-top:14px; }
.wdt-reply-word { animation:wdt-reply-reveal 160ms both; }
@keyframes wdt-reply-reveal { from { opacity:0; } to { opacity:1; } }
.wdt-chat-progress[data-waiting=true] { animation:wdt-thinking-pulse 1.8s ease-in-out infinite; }
.wdt-chat-progress[data-waiting=true]::after { content:'...'; display:inline-block; overflow:hidden; vertical-align:bottom; width:0; margin-left:6px; font-family:monospace; animation:wdt-thinking-dots 1.2s steps(4,end) infinite; }
@keyframes wdt-thinking-pulse { 50% { opacity:.55; } }
@keyframes wdt-thinking-dots { to { width:3ch; } }
@media(prefers-reduced-motion:reduce) { .wdt-reply-word,.wdt-chat-progress[data-waiting=true],.wdt-chat-progress[data-waiting=true]::after { animation:none; opacity:1; } .wdt-chat-progress[data-waiting=true]::after { width:3ch; } }
@media(max-width:600px) { body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-tabella-conversation { padding:18px 18px 0; } body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-ai-start { padding:18px; } body.wpdt-c .wdt-dashboard-refresh .wdt-chat-model { max-width:155px; } }
body.wpdt-c .wdt-dashboard-refresh .wdt-ai-start[data-connected=true] .wdt-ai-composer-actions .btn { margin-left:0; }
/* Compact reply UI once Tabella AI has opened the conversation. */
html[data-wdt-theme] body.wpdt-c .wdt-datatables-admin-wrap.wdt-dashboard-refresh .wdt-main-chat .wdt-ai-start { box-shadow:none !important; outline:0; background:var(--wdt-color-field); margin:18px 24px 24px; padding:16px; border-radius:18px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-tabella-conversation { padding:16px 24px 0; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-tabella-conversation header { justify-content:flex-end; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-reset { padding:6px 8px; background:transparent; font-size:11px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-log { margin:4px 0 16px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-message[data-role=assistant] { background:transparent; padding:8px 0; margin:0 0 14px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-progress:empty { display:none; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat #wdt-home-prompt { min-height:58px; max-height:180px; font:400 15px/1.6 Geist,sans-serif; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-ai-composer-actions { margin-top:8px; gap:10px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-ai-composer-actions :is(.btn,.wdt-data-start) { padding:8px 12px; font-size:12px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model { appearance:auto; -webkit-appearance:menulist; background-color:transparent; padding:6px 8px; height:34px; border:0; box-shadow:none; cursor:pointer; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model:is(:hover,:focus-visible) { background-color:var(--wdt-color-surface); }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model option { background:var(--wdt-color-surface); color:var(--wdt-color-text); }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-privacy { margin-top:10px; font-size:10px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-suggestions button { background:transparent; box-shadow:inset 0 0 0 1px var(--wdt-color-border); font-size:12px; padding:8px 10px; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-suggestions button:hover { background:var(--wdt-color-field); }
@media(max-width:600px) { html[data-wdt-theme] body.wpdt-c .wdt-datatables-admin-wrap.wdt-dashboard-refresh .wdt-main-chat .wdt-ai-start { margin:14px; padding:14px; } body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-tabella-conversation { padding:14px 14px 0; } }
html[data-wdt-theme] body.wpdt-c .wdt-datatables-admin-wrap.wdt-dashboard-refresh .wdt-main-chat .wdt-ai-start:focus-within { outline:2px solid var(--wdt-color-action) !important; outline-offset:2px; }

/* Keep model control and Send on one baseline, including native select metrics. */
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model-label { display:flex; align-items:center; align-self:center; margin:0 0 0 auto; padding:0; line-height:1; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model { display:block; box-sizing:border-box; height:36px; min-height:36px; margin:0; padding:0 10px; font:400 12px/normal Geist,sans-serif; vertical-align:middle; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-ai-composer-actions .btn { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; height:36px; min-height:36px; margin-top:0; margin-bottom:0; padding:0 14px; line-height:1; }
/* Right-aligned model name with a consistently inset chevron. */
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model { appearance:none; -webkit-appearance:none; text-align:right; text-align-last:right; padding:0 34px 0 12px; background-image:none; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model-label { position:relative; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model-label::after { content:''; position:absolute; right:14px; top:50%; width:6px; height:6px; border-right:1.5px solid var(--wdt-color-muted); border-bottom:1.5px solid var(--wdt-color-muted); transform:translateY(-70%) rotate(45deg); pointer-events:none; }
body.wpdt-c .wdt-dashboard-refresh .wdt-main-chat .wdt-chat-model option { text-align:left; }

/* Keep pending replies clear of stale suggestion chips. */
.wdt-browse-refresh .wdt-chat-suggestions[hidden] { display:none !important; }
body.wpdt-c .wdt-browse-refresh .wdt-chat-progress[data-waiting=true] { display:flex; align-items:center; justify-content:flex-start; gap:6px; margin:12px 0 0; padding:0; min-height:24px; font:400 13px/24px Geist,sans-serif; text-align:left; }
body.wpdt-c .wdt-browse-refresh .wdt-chat-progress[data-waiting=true]::after { margin:0; flex:none; height:24px; line-height:24px; vertical-align:baseline; }

/* Tiny thinking pose reuses the existing original pixel character asset. */
body.wpdt-c .wdt-browse-refresh .wdt-chat-progress[data-waiting=true]::before { content:''; display:inline-block; flex:0 0 16px; width:16px; height:16px; background-size:contain; background-repeat:no-repeat; image-rendering:pixelated; transform-origin:50% 80%; animation:wdt-chat-thought 1.8s steps(2,end) infinite; }
@keyframes wdt-chat-thought { 0%,100% { transform:translateY(0) rotate(0); } 30%,55% { transform:translateY(-1px) rotate(-10deg); } 75% { transform:translateY(0) rotate(5deg); } }
@media(prefers-reduced-motion:reduce) { body.wpdt-c .wdt-browse-refresh .wdt-chat-progress[data-waiting=true]::before { animation:none; } }

/* Browse uses the same reply composer; setup stays available as a secondary control. */
.wdt-tabella-chat [hidden] { display:none !important; }
.wdt-tabella-chat .wdt-browse-chat-settings { display:flex; justify-content:flex-end; }
.wdt-tabella-chat .wdt-tabella-conversation { margin-top:12px; padding:16px 0; background:transparent; box-shadow:none; }
.wdt-tabella-chat .wdt-chat-form textarea { width:100%; min-height:64px; font-size:15px; }
.wdt-tabella-chat .wdt-browse-chat-actions { display:flex; justify-content:flex-end; align-items:center; gap:12px; }
.wdt-tabella-chat .wdt-chat-model { max-width:220px; height:38px; margin:0; color:inherit; background:transparent; border:0; }
.wdt-tabella-chat .wdt-browse-chat-actions button { margin:0; min-height:38px; }

.wdt-chat-draft { margin:16px 0; padding:18px; background:var(--wdt-surface-raised,rgba(120,140,200,.1)); border-radius:16px; }
.wdt-chat-draft[hidden] { display:none; }
.wdt-draft-scroll { max-width:100%; overflow:auto; margin:12px 0; }
.wdt-chat-draft table { width:100%; border-collapse:collapse; font-size:13px; }
.wdt-chat-draft th,.wdt-chat-draft td { padding:8px 12px; text-align:left; border-bottom:1px solid rgba(128,150,180,.18); white-space:pre-wrap; min-width:90px; }

.wdt-chat-references { margin-top:12px; font-size:13px; }
.wdt-chat-references summary { cursor:pointer; color:var(--wdt-accent,#80baff); }
.wdt-chat-references ul { display:flex; flex-wrap:wrap; gap:8px; padding:10px 0; list-style:none; }
.wdt-chat-references li { margin:0; }
.wdt-chat-references a { display:inline-block; padding:6px 10px; border-radius:8px; background:rgba(128,150,200,.12); }

/* Override WP's disabled-select arrow image, which otherwise tiles in the drawer. */
html[data-wdt-theme] body.wpdt-c .wdt-browse-refresh .wdt-tabella-chat .wdt-chat-model,
html[data-wdt-theme] body.wpdt-c .wdt-browse-refresh .wdt-tabella-chat .wdt-chat-model:disabled {
    appearance:auto; -webkit-appearance:menulist; background-image:none !important;
    background-color:transparent !important; color:var(--wdt-color-text);
    border:0; box-shadow:none; padding:0 12px; height:38px; margin:0;
}
html[data-wdt-theme] body.wpdt-c .wdt-browse-refresh .wdt-tabella-chat .wdt-chat-model:disabled { opacity:.5; cursor:wait; }
.wdt-chat-draft .wdt-draft-discard { display:block; margin:0 0 12px auto; }

/* WordPress Media/source entry; shared across Dashboard and browse dialogs. */
.wdt-source-panel{padding:24px;border-radius:20px;background:var(--wdt-color-surface,#eef2f8);color:var(--wdt-color-text,#172337);margin:16px 0;display:grid;gap:14px}
.wdt-source-panel[hidden]{display:none!important}.wdt-source-panel label{display:grid;gap:6px}.wdt-source-panel input,.wdt-source-panel select{width:100%;max-width:none;padding:10px;border-radius:10px;background:var(--wdt-color-field,#fff);color:inherit}.wdt-source-panel button{justify-self:start}.wdt-table-editor code{display:inline-block;margin:8px;padding:12px;border-radius:8px}

.wdt-table-editor code{background:var(--wdt-color-field,#e8edf5)!important;color:var(--wdt-color-text,#172337)!important}

.wdt-tabella-chat .wdt-source-mapping-row {display:grid;grid-template-columns:minmax(100px,1fr) minmax(100px,1fr) minmax(100px,1fr);gap:10px;align-items:center;margin:10px 0;}
.wdt-tabella-chat .wdt-source-mapping-row input:not([type=checkbox]),.wdt-tabella-chat .wdt-source-mapping-row select {width:100%;min-width:0;}
@media(max-width:700px){.wdt-tabella-chat .wdt-source-mapping-row {grid-template-columns:1fr;}}

.wdt-chat-references li {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.wdt-chat-references button {border:0;border-radius:14px;padding:9px 12px;color:var(--wdt-color-text,#24334b);background:var(--wdt-color-field,#e9eef6);cursor:pointer;text-align:left;font:inherit;}
.wdt-chat-references a {background:transparent;padding:4px;font-size:12px;}
.wdt-chat-draft > p > code {display:inline-block;padding:8px 12px;border-radius:10px;background:var(--wdt-color-field,#e9eef6);color:var(--wdt-color-text,#24334b);}
/* Source attachments belong to the conversation, not the surrounding wizard. */
body.wpdt-c .wdt-source-panel { padding:16px; margin:12px 0; border-radius:16px; background:var(--wdt-color-field,#eef2f8); text-align:left; }
body.wpdt-c .wdt-source-panel[hidden] { display:none; }
body.wpdt-c .wdt-source-panel h3 { font:500 16px/1.4 Geist,sans-serif !important; margin:0 0 10px !important; }
body.wpdt-c .wdt-source-panel label { display:block; font:400 12px/1.5 Geist,sans-serif; min-width:0; margin:0; }
body.wpdt-c .wdt-source-panel :is(input,select) { box-sizing:border-box; width:100%; padding:10px 12px; border:1px solid var(--wdt-color-border,#ccd4e0); border-radius:10px; background:var(--wdt-color-surface,#fff); color:var(--wdt-color-text,#172338); font:400 14px/1.4 Geist,sans-serif; }
body.wpdt-c .wdt-source-bar { display:flex; align-items:flex-end; gap:8px; }
body.wpdt-c .wdt-source-bar label { flex:1; }
body.wpdt-c .wdt-source-panel button { border:0; border-radius:999px; padding:10px 14px; background:var(--wdt-color-surface,#fff); color:var(--wdt-color-action,#0068bd); font:500 13px/1.4 Geist,sans-serif; cursor:pointer; }
body.wpdt-c .wdt-source-panel button:hover { box-shadow:0 0 0 2px #83a4ed40; }
body.wpdt-c .wdt-source-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
body.wpdt-c .wdt-source-actions button:first-child { background:var(--wdt-color-action,#0068bd); color:var(--wdt-color-surface,#fff); }
body.wpdt-c .wdt-source-panel p:empty { display:none; }
body.wpdt-c .wdt-source-options { margin:10px 0; }
body.wpdt-c .wdt-source-options summary { cursor:pointer; font-size:12px; color:var(--wdt-color-muted,#53627a); }
body.wpdt-c .wdt-source-options label { margin-top:8px; }
body.wpdt-c .wdt-source-review .wdt-editor-grid { max-height:240px; overflow:auto; }
body.wpdt-c .wdt-source-review > header h2 { font:500 18px/1.4 'Space Grotesk',sans-serif !important; margin:0; }
body.wpdt-c .wdt-source-review > button { margin:8px 8px 0 0; }
body.wpdt-c .wdt-source-review .wdt-editor-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
@media(max-width:600px) { body.wpdt-c .wdt-source-bar { flex-wrap:wrap; } body.wpdt-c .wdt-source-bar label { flex-basis:100%; } }
body.wpdt-c .wdt-source-panel [hidden] { display:none !important; }
/* Source selection and review belong to the conversation, before its reply box. */
body.wpdt-c .wdt-tabella-conversation > .wdt-source-panel { grid-column:1; }
body.wpdt-c .wdt-tabella-conversation.wdt-has-source { display:flex; flex-direction:column; gap:12px; }
body.wpdt-c .wdt-tabella-conversation.wdt-has-source > * { width:100%; min-width:0; box-sizing:border-box; }
body.wpdt-c .wdt-tabella-conversation.wdt-has-source .wdt-chat-log { max-height:300px; }

/* Shared plan progress stays in the conversation beside every native draft adapter. */
.wdt-tabella-conversation > .wdt-chat-plan { grid-column:1; margin:14px 0; padding:16px; border-radius:16px; background:var(--wdt-color-field,#e8edf5); color:var(--wdt-color-text,#172337); text-align:left; }
.wdt-chat-plan[hidden] { display:none!important; }
.wdt-chat-plan ol { margin:12px 0; padding-left:22px; }
.wdt-chat-plan li { padding:5px 0; font-size:13px; line-height:1.5; }
.wdt-chat-plan li span { overflow-wrap:anywhere; }
.wdt-chat-plan li small { display:inline-block; margin-inline-start:8px; padding:2px 7px; border-radius:8px; color:var(--wdt-color-muted,#52657c); background:#889ab318; font-size:11px; }
.wdt-chat-plan li[data-state="completed"] small { color:var(--wdt-color-text,#172337); background:#31b89030; }
.wdt-chat-plan li[data-state="awaiting_review"] small { color:var(--wdt-color-text,#172337); background:#599bff30; }
.wdt-chat-plan p { margin:10px 0 0; font-size:12px; color:var(--wdt-color-muted,#52657c); }

/* Native editor draft appearance controls, scoped to Tabella admin chat. */
body.wpdt-c .wdt-live-appearance-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:12px; margin-bottom:12px; border-radius:14px; background:var(--wdt-color-field,#e8edf5); }
body.wpdt-c .wdt-live-appearance-controls[hidden] { display:none!important; }
body.wpdt-c .wdt-live-appearance-controls label { display:flex; align-items:center; gap:8px; margin:0; font-size:13px; }
body.wpdt-c .wdt-live-appearance-controls p { flex-basis:100%; margin:0; font-size:12px; line-height:1.5; color:var(--wdt-color-muted,#52657c); }
body.wpdt-c .wdt-live-appearance-controls button { font-size:12px; }

/* Data reviews remain part of the conversation, with explicit persistence. */
.wdt-row-review { margin-block: 16px; padding: 16px; border-radius: 16px; background: var(--wdt-surface-alt, rgba(120,140,180,.12)); }
.wdt-row-review h3 { margin: 0 0 12px; font-size: 1rem; }
.wdt-row-review details { padding-block: 8px; }
.wdt-row-review summary { cursor: pointer; font-weight: 600; }
.wdt-row-review dl { display: grid; grid-template-columns: minmax(90px,1fr) minmax(0,2fr); gap: 8px 16px; font-size: .9em; }
.wdt-row-review dd { margin: 0; overflow-wrap: anywhere; }
.wdt-row-review-deletes { margin-top: 12px; padding: 12px; border: 1px solid #d63638; border-radius: 12px; background: rgba(214,54,56,.08); }
.wdt-row-review-deletes h4 { margin: 0 0 6px; color: #d63638; font-size: .95rem; }
.wdt-row-review-deletes label { display: block; margin-top: 10px; font-weight: 600; }
.wdt-row-review-deletes label input { margin-right: 8px; }
.wdt-row-review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.wdt-tabella-shortcodes{margin:.5em 0;padding:0;list-style:none}
.wdt-tabella-shortcodes li{display:flex;flex-wrap:wrap;align-items:center;gap:.4em;margin:.25em 0}
.wdt-tabella-shortcodes code{overflow-wrap:anywhere;user-select:all}
