.preview-menu{position:fixed;z-index:1000;background:white;border:1px solid #aaa;box-shadow:0 4px 18px #0003;padding:4px;min-width:190px}
.preview-menu button{display:block;width:100%;padding:10px;text-align:left;border:0;background:white;cursor:pointer}.preview-menu button:hover{background:#ffeadc}
#categories [draggable=true]{cursor:grab}#categories .drop-before{border-top:3px solid #ed7c2b}#categories .drop-inside{outline:2px solid #ed7c2b}#categories .drop-after{border-bottom:3px solid #ed7c2b}
.preview-editor-dialog{width:min(900px,95vw);max-height:90vh;overflow:auto;border:1px solid #aaa;border-radius:8px;padding:24px}.preview-editor-dialog::backdrop{background:#0006}.preview-editor-dialog form{display:grid;gap:12px}.preview-editor-dialog textarea{min-height:100px}.preview-editor-dialog .actions{display:flex;gap:12px;position:sticky;bottom:0;background:white;padding:10px}.preview-editor-dialog button{padding:10px;border:1px solid #bbb;cursor:pointer}.preview-editor-dialog button[type=submit]{background:#ed7c2b;color:white}.preview-editor-status{padding:6px;color:#804000;font-size:13px}

/* Keep admin controls aligned and retain scrolling with the standard product columns. */
#catalogView:has(.preview-list-actions){min-width:0;max-width:100%}
#catalogView:has(.preview-list-actions) #products{width:100%;min-width:0;max-width:100%;max-height:70vh;overflow:auto;scrollbar-gutter:stable}
.preview-list-actions,.preview-image-actions,.preview-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.preview-list-actions{margin:10px 0}
.preview-editor-dialog .preview-row-actions{flex-wrap:nowrap}
.preview-editor-dialog .preview-row-actions button{margin:0;height:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex:none}
.preview-editor-dialog .detail-specs td:last-child{width:144px;vertical-align:middle}
.preview-editor-dialog .preview-image-actions button{margin:0;white-space:nowrap;min-height:40px}
.preview-image-actions input[type=file]{width:auto;min-width:200px;flex:1}
.preview-bulk-field{display:flex;align-items:center;gap:12px}
.preview-bulk-field input[type=checkbox]{width:auto}
.preview-bulk-field input[type=number],.preview-bulk-field select{width:150px;margin-left:auto}

/* Specification heading action and compact editable rows. */
.preview-spec-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.preview-spec-heading h3{margin:0}
.preview-editor-dialog .preview-spec-heading button{width:auto;margin:0 0 0 auto;white-space:nowrap}
.preview-editor-dialog .detail-specs td{padding:6px 10px}
.preview-editor-dialog .detail-specs input,.preview-editor-dialog .detail-specs textarea{box-sizing:border-box;height:36px;min-height:36px;padding:6px 10px;line-height:22px}
.preview-editor-dialog .detail-specs textarea{resize:vertical}
.preview-editor-dialog .preview-row-actions button{height:36px;min-height:36px;padding:6px 10px}
/* The form already provides 12px of gap: 88 + 12 = 100px. */
.preview-editor-dialog .preview-image-actions{margin-top:88px}

/* Keep source-picker actions visible on the search row. */
.preview-source-search{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.preview-source-search input{width:240px;max-width:100%;box-sizing:border-box;margin:0}
.preview-editor-dialog .preview-source-search button{width:auto;white-space:nowrap;margin:0}
.preview-editor-dialog .preview-source-search .preview-source-apply{margin-left:auto}
