/* R8.13 Manual upload and prompt helper. Scoped to media controls only. */
.manual-image-tool{display:grid;gap:16px;min-width:0;padding:18px;background:#fff;border:1px solid #cad6e5;border-radius:12px;color:#182a3f}
.manual-image-tool *{box-sizing:border-box;min-width:0}
.manual-image-tool [hidden]{display:none!important}
.manual-image-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.manual-image-heading h4{margin:0;font-size:17px;color:#16324f}
.manual-image-tool p{margin:0;line-height:1.7;overflow-wrap:anywhere}
.manual-image-tool small{display:block;color:#52647a;line-height:1.65;font-size:13px}
.manual-image-tool label{font-weight:650;line-height:1.6;font-size:14px}
.manual-image-tool input:not([type=hidden]),.manual-image-tool select{width:100%;min-height:44px;padding:10px 12px;border:1px solid #7a8aa0;border-radius:8px;background:#fff;color:#182a3f;font:inherit}
.manual-image-tool input[type=file]{font-size:14px;padding:8px;max-width:100%;overflow:hidden}
.manual-image-tool input::file-selector-button{font:inherit;padding:8px 12px;background:#edf3ff;color:#16324f;border:1px solid #7a8aa0;border-radius:6px;margin-right:10px}
.manual-image-tool textarea{width:100%;min-height:130px;max-height:380px;padding:12px;border:1px solid #7a8aa0;border-radius:8px;resize:vertical;font:14px/1.7 system-ui,sans-serif;background:#f8fafc;color:#182a3f;overflow-wrap:anywhere}
.manual-image-tool button,.manual-image-tool a.secondary{min-height:44px;max-width:100%;width:auto;padding:10px 14px;border-radius:8px;font-size:14px;line-height:1.5;white-space:normal;justify-self:start}
.manual-image-tool :is(button,input,select,textarea,summary):focus-visible{outline:3px solid #1d4ed8;outline-offset:3px}
.manual-image-intro,.manual-final-note{font-size:14px;color:#52647a}
.manual-image-empty{padding:16px;background:#f6f8fc;border:1px dashed #7a8aa0;border-radius:8px;font-size:14px;line-height:1.7}
.manual-image-preview{margin:0;padding:12px;border:1px solid #cad6e5;border-radius:9px;background:#f6f8fc;display:grid;gap:10px}
.manual-image-preview img{display:block;width:100%;max-height:400px;object-fit:contain;border-radius:6px}
.manual-image-preview figcaption{font-size:13px;color:#52647a;line-height:1.6}
.manual-image-form,.manual-image-upload,.manual-prompt-form,.manual-prompt-version,.manual-short-prompt{display:grid;gap:10px;margin:0;min-width:0}
.manual-image-form{border:1px solid #b3c7ef;background:#f1f5ff;padding:14px;border-radius:8px}
.manual-dropzone{display:grid;gap:10px;padding:18px;border:1px dashed #7a8aa0;border-radius:9px;background:#f7f9fd}
.manual-dropzone.is-dragover{border-color:#1d4ed8;outline:2px solid #1d4ed8;background:#edf3ff}
.manual-dropzone p{color:#52647a;font-size:14px}
.manual-media-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.manual-local-preview{padding:12px;border:1px solid #cad6e5;border-radius:8px;background:#fff}
.manual-local-preview img{display:block;margin:0 auto 10px;max-width:100%;max-height:260px;object-fit:contain}
.manual-image-tool [role=status]{font-size:13px;line-height:1.65;color:#52647a}
.manual-image-tool [role=status].is-error{color:#b42318;background:#fef0ee;padding:10px;border-radius:6px}
.manual-prompt-panel{border-top:1px solid #dce4ef;padding-top:14px}
.manual-prompt-panel>summary{display:flex;justify-content:space-between;gap:10px;align-items:center;cursor:pointer;font-weight:650;min-height:44px;flex-wrap:wrap;color:#16324f}
.manual-prompt-panel>summary:before{content:'▸';margin-right:3px}
.manual-prompt-panel[open]>summary:before{content:'▾'}
.manual-prompt-body{display:grid;gap:16px;padding-top:12px}
.manual-prompt-body>p{font-size:14px}
.manual-short-prompt{border:1px solid #cad6e5;padding:12px;border-radius:8px}
.manual-short-prompt>summary{cursor:pointer;font-size:14px;min-height:36px;color:#16324f}
.manual-prompt-form{padding-top:16px;border-top:1px solid #dce4ef}
.manual-final-note{border-top:1px solid #dce4ef;padding-top:12px}
@media(max-width:600px){.manual-image-tool{padding:12px;gap:14px}.manual-dropzone{padding:12px}.manual-image-tool input:not([type=hidden]),.manual-image-tool select,.manual-image-tool textarea{font-size:16px}.manual-image-heading{align-items:flex-start}.manual-media-actions{gap:8px}.manual-image-tool button{padding:10px 12px}}
@media(prefers-reduced-motion:reduce){.manual-image-tool *{scroll-behavior:auto!important}}

/* Outrank the older global text-button minimum without altering other pages. */
.ui-theme .manual-image-tool .text-button{min-height:44px}
