.local-task-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; width:100%; max-width:var(--chat-content-max); margin:6px auto; font-size:12px; color:var(--lm-text-muted); }
.local-task-toolbar label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.local-task-toolbar select,.local-task-toolbar button { border:1px solid var(--lm-border); border-radius:16px; padding:5px 10px; background:var(--lm-surface); color:var(--lm-text); font:inherit; }
.local-task-dialog { width:min(540px, calc(100vw - 24px)); max-height:min(78vh, 680px); padding:0; border:1px solid var(--lm-border); border-radius:14px; background:var(--lm-surface); color:var(--lm-text); box-shadow:0 20px 60px #0004; overflow:auto; }
.local-task-dialog::backdrop { background:#0007; }
.image-batch-dialog { width:min(740px, calc(100vw - 24px)); max-height:88vh; }
.image-batch-dialog .local-task-fields { margin-top:12px; }
.image-batch-dialog .local-task-fields label { flex:1 1 145px; }
.image-batch-dialog [hidden] { display:none!important; }
.image-batch-prompt { display:flex; flex-direction:column; gap:6px; margin:14px 0 0; font-size:12px; }
.image-batch-prompt textarea { width:100%; box-sizing:border-box; min-height:100px; resize:vertical; border:1px solid var(--lm-border-input); border-radius:8px; padding:10px; background:var(--lm-surface); color:var(--lm-text); font:inherit; line-height:1.6; }
#imageBatchInputs { margin-top:14px; }
.image-batch-references { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:6px; max-height:200px; overflow:auto; margin-top:10px; }
.image-batch-references label { display:flex; gap:6px; align-items:center; font-size:12px; min-width:0; overflow-wrap:anywhere; padding:5px; }
.image-batch-history { margin-top:20px; border-top:1px solid var(--lm-border); }
.image-batch-card { margin:12px 0; padding:12px; border:1px solid var(--lm-border); border-radius:10px; overflow-wrap:anywhere; }
.image-batch-card h3 { margin:0 0 8px; font-size:14px; }
.image-batch-items { padding-left:22px; max-height:280px; overflow:auto; font-size:12px; }
.image-batch-items li { margin:8px 0; }
.image-batch-items button { margin-left:8px; }
.image-batch-dialog button:disabled { opacity:.5; cursor:default; }
.local-task-panel { padding:18px; }
.local-task-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.local-task-dialog-header h2 { margin:0; font-size:17px; }
.local-task-dialog-header button { width:30px; height:30px; border:0; border-radius:8px; background:transparent; color:var(--lm-text); font-size:24px; cursor:pointer; }
.local-task-dialog-header button:hover { background:var(--lm-primary-soft); }
.local-task-dialog-actions { display:flex; justify-content:flex-end; margin-top:16px; }
.local-task-dialog-actions button { border:0; border-radius:8px; padding:9px 16px; background:var(--lm-primary); color:#fff; font:inherit; cursor:pointer; }
.local-task-fields { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
.local-task-fields + .local-task-fields { margin-top:10px; }
.local-task-fields label { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--lm-text-muted); min-width:0; }
.local-task-fields select,.local-task-fields input { border:1px solid var(--lm-border-input); border-radius:7px; padding:7px 9px; max-width:100%; background:var(--lm-surface); color:var(--lm-text); font:inherit; font-size:12px; }
#localTaskDevice { max-width:240px; } #localTaskSeed { width:125px; }
.local-task-image-field { flex:1; min-width:160px!important; }
.local-task-fields button,.local-task-actions button,.local-task-pinned button { border:1px solid var(--lm-border); border-radius:8px; padding:7px 10px; background:var(--lm-surface); color:var(--lm-text); font:inherit; font-size:12px; cursor:pointer; }
#localTaskEnvironment { font-size:12px; line-height:1.5; margin:10px 0 0; overflow-wrap:anywhere; }
#localTaskClientDownload { font-size:12px; display:inline-block; margin-top:8px; } #localTaskClientDownload[hidden] { display:none; }
.local-task-note { font-size:11px; line-height:1.5; color:var(--lm-text-muted); margin:6px 0 0; }
#localTaskModelNote:not([hidden]) + .local-task-fields { margin-top:10px; }
#localTaskGenerate { margin-top:10px; }
.local-task-fields [hidden] { display:none!important; }
#localTaskModel { max-width:100%; }
#localTaskLicense { font-size:11px; display:inline-block; margin-top:6px; }
#localTaskLicense[hidden] { display:none; }
video.local-task-output { width:100%; cursor:auto; background:#111; }
#localTaskInputPreview { width:38px; height:38px; object-fit:contain; border-radius:6px; } #localTaskDimensions { font-size:11px; color:var(--lm-text-muted); }
.local-task-pinned { display:flex; gap:6px; flex-wrap:wrap; width:100%; max-width:var(--chat-content-max); margin:5px auto; }
.local-send-group { display:flex; align-items:center; gap:0; position:relative; border-radius:14px; background:var(--lm-primary); }
.local-send-group #sendBtn { width:38px; min-width:38px; height:36px; min-height:36px; border-radius:14px 0 0 14px; background:transparent; color:var(--lm-on-primary); border-color:transparent; }
.local-send-group #sendBtn:hover:not(:disabled),.local-send-group #sendBtn[data-mode="steer"] { background:var(--lm-primary-hover); color:var(--lm-on-primary); }
.local-send-group .composer-send:disabled { opacity:.5; }
.local-send-group .composer-send > i { width:20px; height:20px; font-size:17px; }
.local-task-settings { width:32px; height:40px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--lm-text); font-size:14px; cursor:pointer; }
.local-task-settings:hover { background:var(--lm-primary-soft); }
.local-task-menu-toggle { display:grid; place-items:center; width:28px; min-width:28px; height:36px; padding:0; border:0; border-left:1px solid color-mix(in srgb, var(--lm-on-primary) 28%, transparent); border-radius:0 14px 14px 0; background:transparent; color:var(--lm-on-primary); font-size:11px; cursor:pointer; }
.local-task-menu-toggle:hover:not(:disabled),.local-task-menu-toggle[aria-expanded="true"] { background:var(--lm-primary-hover); }
.local-task-menu-toggle:disabled { opacity:.5; cursor:default; }
.local-task-menu-toggle[hidden] { display:none; }
.local-send-group:has(.local-task-menu-toggle[hidden]) #sendBtn { border-radius:14px; }
#cameraInputBtn { display:inline-flex; width:auto; padding:0 8px; gap:4px; border-radius:20px; font-size:12px; white-space:nowrap; }
.local-task-menu { position:absolute; right:0; bottom:44px; z-index:60; padding:6px; min-width:166px; border:1px solid var(--lm-border); border-radius:12px; background:var(--lm-surface); box-shadow:0 6px 24px #0002; }
.local-task-menu button { display:block; width:100%; text-align:left; white-space:nowrap; border:0; border-radius:6px; background:transparent; color:var(--lm-text); padding:10px; font:inherit; font-size:13px; cursor:pointer; }
.local-task-menu button:hover,.local-task-menu button:focus { background:var(--lm-primary-soft); }
.local-task-fields .cloud-image-model { flex-basis:100%; }
.cloud-image-references { display:grid; gap:8px; margin-top:16px; font-size:12px; overflow-wrap:anywhere; }
.cloud-image-references label { display:flex; align-items:flex-start; gap:6px; }
.cloud-image-references p { margin:0; color:var(--lm-text-muted); }
.cloud-image-references input { flex-shrink:0; }
.cloud-image-bubble { width:min(600px,100%); min-width:0; white-space:normal; }
.cloud-image-gallery { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
.cloud-image-gallery > div { min-width:0; }
.cloud-image-card { width:100%; }
.cloud-image-gallery .local-task-output { width:100%; height:auto; }
.cloud-image-gallery a { border:1px solid var(--lm-border); border-radius:8px; padding:7px 10px; color:var(--lm-text); font-size:12px; text-decoration:none; }
#cloudImageStatus[data-state="warning"] { color:var(--lm-text); }
#cloudImageReferences[hidden] { display:none; }
@media(max-width:600px) { .cloud-image-gallery { grid-template-columns:minmax(0,1fr); } }
.local-send-group #sendBtn.local-task-send { display:flex; gap:6px; width:auto; padding:0 13px; font-size:12px; white-space:nowrap; }
.local-task-card { min-width:0; max-width:600px; }
.media-prompt-options { margin-top:16px; padding-top:14px; border-top:1px solid var(--lm-border); }
.media-prompt-options[hidden],.media-prompt-options [hidden] { display:none!important; }
.media-prompt-switch { display:flex; align-items:center; gap:6px; font-size:12px; margin:8px 0; }
.media-prompt-field { display:flex; flex-direction:column; gap:6px; margin-top:12px; font-size:12px; }
.media-prompt-field textarea { box-sizing:border-box; width:100%; min-width:0; resize:vertical; padding:9px; border:1px solid var(--lm-border-input); border-radius:8px; background:var(--lm-surface); color:var(--lm-text); font:inherit; line-height:1.55; }
.media-prompt-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.media-prompt-actions button { border:1px solid var(--lm-border); border-radius:7px; padding:7px 10px; background:var(--lm-surface); color:var(--lm-text); font:inherit; font-size:12px; cursor:pointer; }
.media-prompt-options button:disabled { opacity:.5; cursor:default; }
.media-prompt-audit { font-size:12px; margin:8px 0; color:var(--lm-text-muted); overflow-wrap:anywhere; }
.media-prompt-audit summary { cursor:pointer; }
.local-task-card strong { display:block; font-size:14px; }
.local-task-detail { font-size:13px; line-height:1.6; overflow-wrap:anywhere; margin:10px 0; }
.local-task-card progress { display:block; width:100%; height:7px; accent-color:var(--lm-primary); margin:12px 0; }
.local-task-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:12px; }
.local-task-output { display:block; max-width:100%; max-height:440px; border-radius:8px; object-fit:contain; cursor:zoom-in; margin-top:10px; }
#localTaskToolbar[hidden],#localTaskPanel[hidden],#localTaskUpscale[hidden],#localTaskGenerate[hidden],#localTaskMenu[hidden],#localTaskPinned[hidden],#localTaskSendLabel[hidden],#localTaskSettings[hidden] { display:none; }
@media(max-width:600px) { .local-task-panel { padding:14px; } .local-task-fields { gap:7px; } .local-task-fields label { flex:1 1 100px; } #localTaskDevice { max-width:100%; } .local-task-image-field { flex-basis:100%!important; } .local-task-note { font-size:10px; } .local-send-group #sendBtn.local-task-send { padding:0 10px; } }

/* Video delivery actions stay above details and billing. */
.cloud-video-main-actions { margin:10px 0; }
.cloud-video-main-actions button,.cloud-video-main-actions .cloud-video-download { min-height:40px; padding:9px 16px; border-radius:8px; font:inherit; font-size:14px; cursor:pointer; }
.cloud-video-main-actions button:first-child,.cloud-video-main-actions .cloud-video-download { border:1px solid var(--lm-primary); background:var(--lm-primary); color:var(--lm-on-primary); text-decoration:none; }
.cloud-video-main-actions .cloud-video-download { display:inline-flex; align-items:center; justify-content:center; }
.cloud-video-main-actions button:focus-visible,.cloud-video-download:focus-visible { outline:2px solid var(--lm-primary); outline-offset:3px; }

/* One settings window; parameter panels keep their inputs when switching tools. */
.tool-settings-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.tool-settings-header { flex:none; padding:18px 18px 12px; border-bottom:1px solid var(--lm-border); }
.tool-settings-header .local-task-dialog-header { margin-bottom:12px; }
.tool-settings-select { display:flex; align-items:center; gap:14px; font-size:13px; }
.tool-settings-select select { flex:1; min-width:0; padding:9px 12px; border:1px solid var(--lm-border); border-radius:8px; background:var(--lm-surface); color:var(--lm-text); font:inherit; }
.tool-settings-header .local-task-note { margin:10px 0 0; }
.tool-settings-body { min-height:0; overflow:auto; overscroll-behavior:contain; }
.tool-settings-panel[hidden], .tool-panel-heading[hidden] { display:none!important; }
.tool-settings-select select:disabled { opacity:.55; }
@media(max-width:600px) { .tool-settings-header { padding:14px; } .tool-settings-select { gap:10px; } }

.media-prompt-candidate { padding:10px; border:1px solid var(--lm-border); border-radius:8px; background:var(--lm-surface); }
.media-prompt-candidate .media-prompt-field { margin-top:0; }

.prompt-optimization-chat-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; margin-bottom:8px; border:1px solid var(--lm-border); border-radius:8px; color:var(--lm-text); background:var(--lm-surface); font-size:12px; }
.prompt-optimization-chat-bar[hidden] { display:none; }
.prompt-optimization-chat-bar[data-busy="true"] { border-color:var(--lm-primary); background:var(--lm-primary-soft); }
.prompt-optimization-chat-bar button:disabled { cursor:wait; opacity:.6; }
.prompt-optimization-chat-bar button { flex:none; border:1px solid var(--lm-border); border-radius:6px; padding:6px 9px; background:var(--lm-surface); color:var(--lm-text); cursor:pointer; }
