/* Document editor (11/16), shared by the main window and the Client files pop-out (11/19). */
/* ---- Document editor (11/16) ---- */
.ded { position: fixed; inset: 0; z-index: 1200; background: rgba(4, 12, 24, 0.6); display: flex; align-items: center; justify-content: center; }
.ded-card { width: min(1200px, 96vw); height: min(860px, 94vh); display: flex; flex-direction: column; background: var(--card-bg); color: var(--text); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.ded-hd { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ded-file { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.ded-note { margin-left: auto; font-size: 13px; color: #2F7D1F; }
.ded-note.bad { color: #c0392b; }
.ded-close { border: none; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--text); }
.ded-body { flex: 1; min-height: 0; display: flex; }
.ded-thumbs { width: 150px; flex: none; overflow-y: auto; padding: 8px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; background: var(--bg-alt); }
.ded-th { border: 2px solid transparent; border-radius: 8px; background: var(--card-bg); padding: 4px; cursor: grab; }
.ded-th.on { border-color: var(--accent); }
.ded-th.off { opacity: .35; }
.ded-th.drag { opacity: .5; }
.ded-th img { display: block; max-width: 100%; max-height: 150px; margin: 0 auto; transition: transform .15s; }
.ded-th-bar { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.ded-th-bar span { flex: 1; }
.ded-th-bar button { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 13px; }
.ded-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; overflow: auto; }
.ded-stage { position: relative; display: inline-block; cursor: crosshair; user-select: none; }
.ded-big { display: block; max-width: 100%; max-height: calc(min(860px, 94vh) - 230px); box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.ded-box { position: absolute; border: 2px solid #E0702A; background: rgba(224, 112, 42, 0.14); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35); pointer-events: none; }
.ded-box[hidden] { display: none; }
.ded-help { font-size: 12.5px; color: var(--text-muted); margin: 8px 0 0; padding-left: 20px; display: grid; gap: 2px; }
.ded-help b, .ded-help i { color: var(--text); }
.ded-chips-lbl { font-size: 12px; color: var(--text-muted); margin-right: 4px; align-self: center; }
.ded-ft { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 10px 14px; border-top: 1px solid var(--border); }
.ded-tools, .ded-save, .ded-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ded-name { display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted); }
.ded-name input { width: 260px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--card-bg); color: var(--text); font: inherit; font-size: 13.5px; }
.ded-chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); cursor: pointer; font-weight: 700; font-size: 12px; }
.ded-chip:hover { border-color: var(--accent); color: var(--accent); }
.ded-save { margin-left: auto; }
.ded-save .ded-save-crop:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }

.ded-undo { margin-left: 6px; padding: 2px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
