
/* Standalone file editor dialog. Reuses the existing server-side read/save/version API. */
.fm-editor-dialog{border:0;border-radius:19px;padding:0;width:min(1080px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:92dvh;overflow:auto;background:#fff;color:var(--text);box-shadow:0 28px 100px rgba(17,23,39,.32)}
.fm-editor-dialog::backdrop{background:rgba(8,15,32,.60)}
.fm-editor-dialog .fm-details{margin:0;border:0;border-radius:0;min-width:0;padding:19px 22px}
.fm-editor-dialog .fm-details-top{margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.fm-editor-dialog .fm-details-top strong{font-size:15px;flex:1;min-width:0;word-break:break-word}
.fm-editor-dialog .fm-details-top>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fm-editor-dialog .fm-details-top .btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center}
.fm-editor-dialog .fm-editor{height:min(59dvh,680px);min-height:220px;resize:vertical;font-size:13px;line-height:1.6;white-space:pre;overflow:auto}
.fm-editor-dialog .fm-image{max-height:70dvh}
.fm-editor-dialog .fm-edit-actions{margin-top:12px;gap:10px}
.fm-editor-dialog .fm-edit-actions>span{flex:1;min-width:150px}
.fm-editor-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fm-editor-buttons .btn{min-height:38px}
.fm-editor-dialog .fm-feedback{padding:0;min-height:0;margin-top:9px}
.fm-versions{display:grid;gap:8px;margin:14px 0 0;padding:12px;border:1px solid #e2e6f0;border-radius:12px;background:#f7f8fc}
.fm-versions[hidden]{display:none}
.fm-version-row{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:9px 0;border-bottom:1px solid #e6e9f0}
.fm-version-row:last-child{border-bottom:0}
.fm-version-row span{font-size:11px;color:#4b5363}
.fm-version-row .btn{flex:0 0 auto}
.fm-editor-dialog .fm-editor:read-only{background:#343b49}
.fm-filebuttons [data-edit]{border-color:#cecff5;color:#3b40a1;background:#f9f9ff;font-weight:750}
@media(max-width:640px){
 .fm-editor-dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:96dvh;border-radius:14px}
 .fm-editor-dialog .fm-details{padding:12px}
 .fm-editor-dialog .fm-details-top{gap:12px;align-items:flex-start}
 .fm-editor-dialog .fm-details-top>div{width:100%}
 .fm-editor-dialog .fm-details-top .btn{flex:1}
 .fm-editor-dialog .fm-editor{height:55dvh;min-height:180px;font-size:12px;padding:10px}
 .fm-editor-dialog .fm-edit-actions{align-items:stretch;flex-direction:column}
 .fm-editor-buttons{width:100%}
 .fm-editor-buttons .btn{flex:1;min-height:43px}
 .fm-version-row{align-items:flex-start}
}

.fm-encodingbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 12px}
.fm-encodingbar label{font-size:11px;font-weight:750;color:#555e70}
.fm-encodingbar select{min-height:35px;border:1px solid #dce0e8;border-radius:9px;background:#fff;padding:6px 10px;font-size:11px;max-width:100%}
.fm-encodingbar small{font-size:10px;color:#777f8c;line-height:1.5;flex:1 1 190px}
@media(max-width:600px){.fm-encodingbar{align-items:stretch}.fm-encodingbar label{flex:1 1 100%}.fm-encodingbar select{width:100%}.fm-encodingbar small{flex:1 1 100%}}
