
/* 재단 창 — 원문(사장님 화면 2026-09-03)은 묶음 테두리 없이 이름줄 + 항목이다 */
.trim-block { display: flex; flex-direction: column; gap: 6px; }
.trim-legend { color: var(--text-dim); font-size: 12px; }
.trim-backdrop .trim-preview[hidden] { display: none; }
/* 확인·취소를 오른쪽 위에 세로로 (원문 재단·캔버스 크기 창) */
.resize-form { position: relative; }
.resize-form .dlg-side {
  position: absolute; top: 0; right: 0; display: flex; flex-direction: column; gap: 8px; width: 92px;
}
.resize-form .dlg-side .primary-btn, .resize-form .dlg-side .ctx-btn { width: 92px; min-width: 92px; }
.trim-backdrop .resize-form { padding-right: 108px; }

/* 이미지 복제 창 (사장님 화면 2026-09-03) — 이름 칸 하나와 체크 하나, 단추는 오른쪽 위 */
.dup-modal { width: 470px; }
.dup-modal .resize-form { padding-right: 108px; }
.dup-src-row, .dup-as-row { display: flex; align-items: center; gap: 8px; }
.dup-label { color: var(--text-dim); font-size: 12px; flex: none; }
.dup-src { color: var(--text); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dup-form input.dup-name { flex: 1 1 auto; min-width: 0; }
.dup-merged-row { margin-top: 2px; }

/* 캔버스 크기 창 — 위에 현재 크기·새 크기 블록 (사장님 화면 2026-09-03) */
.resize-current { display: flex; flex-direction: column; gap: 3px; }
.resize-block-head, .resize-new-head { color: var(--text); font-size: 12px; }
.resize-block-head .resize-cur-bytes, .resize-new-head .resize-new-bytes { color: var(--text-dim); }
.resize-cur-dims { display: flex; flex-direction: column; gap: 2px; color: var(--text-dim); font-size: 12px; padding-left: 14px; }
.resize-cur-dims > div { display: flex; gap: 8px; }
.resize-cur-dims > div > span { flex: 0 0 38px; text-align: right; }
.resize-cur-dims b { color: var(--text); font-weight: 400; }
.resize-new-head[hidden] { display: none; }
.resize-current[hidden] { display: none; }
.resize-backdrop .resize-form { padding-right: 108px; }
.dim-row select.opt-select { margin-left: 6px; }

/* 캔버스 크기 창 — 폭·높이는 [이름][칸][단위] 한 줄이다 (사장님 화면 2026-09-03) */
.resize-backdrop .resize-form:has(.resize-current:not([hidden])) .dim-row {
  flex-direction: column; align-items: stretch; gap: 8px;
}
.resize-backdrop .resize-form:has(.resize-current:not([hidden])) .dim-row > div {
  flex-direction: row; align-items: center; gap: 8px;
}
.resize-backdrop .resize-form:has(.resize-current:not([hidden])) .dim-row > div > label {
  flex: 0 0 52px; text-align: right; color: var(--text-dim);
}
.resize-backdrop .resize-form:has(.resize-current:not([hidden])) .dim-row > div > input {
  flex: 0 0 110px; width: 110px;
}
.resize-backdrop .resize-form:has(.resize-current:not([hidden])) .dim-row select.opt-select {
  flex: 0 0 130px; margin-left: 0;
}
/* 단추는 폼 오른쪽 위에 (원문 배치) */
.resize-foot { position: absolute; top: 14px; right: 14px; }
.resize-backdrop .modal { position: relative; }

.resize-relative-row, .resize-extend-row { white-space: nowrap; }
.resize-backdrop .resize-form:has(.resize-current:not([hidden])) .resize-extend { flex: 0 0 160px; }

.resize-extend-swatch {
  flex: 0 0 34px; width: 34px; height: 22px; border: 1px solid var(--line); border-radius: 2px; background: #000;
}
/* 투명이면 색이 없다 — 바둑판으로 보여 준다 */
.resize-extend-swatch.is-none {
  background-image: linear-gradient(45deg, #888 25%, transparent 25%, transparent 75%, #888 75%),
                    linear-gradient(45deg, #888 25%, #bbb 25%, #bbb 75%, #888 75%);
  background-size: 10px 10px; background-position: 0 0, 5px 5px;
}
.resize-cur-dims > div { white-space: nowrap; }

/* 이미지 크기 창 (사장님 화면 2026-09-03) */
.modal.resize-modal:has(.resize-imgsize:not([hidden])) { width: 470px; }
.resize-imgsize { display: flex; flex-direction: column; gap: 7px; }
.resize-imgsize[hidden], .resize-resample-row[hidden], .resize-upscale[hidden] { display: none; }
.resize-size-head { color: var(--text); font-size: 12px; }
.resize-size-head .resize-img-bytes { color: var(--text-dim); }
.resize-dims-row, .resize-fit-row { display: flex; align-items: center; gap: 8px; }
.resize-side-label { flex: 0 0 92px; text-align: right; color: var(--text-dim); font-size: 12px; }
.resize-dims-val { color: var(--text); font-size: 12px; }
.resize-fit-row .resize-fit { flex: 1 1 auto; min-width: 0; }
.resize-resample-row { display: flex; align-items: center; gap: 8px; }
.resize-resample-row .resize-rs-method { flex: 1 1 auto; min-width: 0; }
.resize-upscale { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.resize-upscale-note { color: var(--text-dim); font-size: 11.5px; margin: 0; }
.link-btn { background: none; border: none; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-align: left; }
.link-btn:hover { text-decoration: underline; }
/* 이미지 크기 창도 폭·높이가 [이름][칸][단위] 한 줄이다 */
.resize-backdrop .resize-form:has(.resize-imgsize:not([hidden])) .dim-row { flex-direction: column; align-items: stretch; gap: 8px; }
.resize-backdrop .resize-form:has(.resize-imgsize:not([hidden])) .dim-row > div { flex-direction: row; align-items: center; gap: 8px; }
.resize-backdrop .resize-form:has(.resize-imgsize:not([hidden])) .dim-row > div > label { flex: 0 0 92px; text-align: right; color: var(--text-dim); }
.resize-backdrop .resize-form:has(.resize-imgsize:not([hidden])) .dim-row > div > input { flex: 0 0 110px; width: 110px; }
.resize-backdrop .resize-form:has(.resize-imgsize:not([hidden])) .dim-row select.opt-select { flex: 1 1 auto; margin-left: 0; }
.resize-res-row { display: flex; align-items: center; gap: 8px; }
.resize-res-row > label { flex: 0 0 92px; text-align: right; color: var(--text-dim); }
.resize-res-row > input { flex: 0 0 110px; width: 110px; }
.resize-res-row .resize-res-unit { flex: 1 1 auto; min-width: 0; }

.resize-dims-row, .resize-fit-row, .resize-resample-row, .resize-res-row { white-space: nowrap; }
.resize-resample-row > .opt-check { flex: 0 0 auto; }
.resize-dims-val { white-space: nowrap; }

/* 목록이 화살표만 남게 줄어들었다 — 최소 폭을 준다 */
.resize-backdrop .resize-form select.opt-select { min-width: 118px; }
.resize-fit-row .resize-fit, .resize-res-row .resize-res-unit, .resize-resample-row .resize-rs-method { min-width: 150px; }
.resize-size-head, .resize-block-head, .resize-new-head { white-space: nowrap; }

/* 생성형 업스케일 창 (사장님 화면 2026-09-03) */
.modal.ups-modal { width: 362px; }
.ups-form { display: flex; flex-direction: column; gap: 10px; }
.ups-label { color: var(--text-dim); font-size: 12px; }
.ups-out-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ups-ratio-col { display: flex; flex-direction: column; gap: 6px; }
.ups-ratio-col .ups-ratio { min-width: 92px; }
.ups-size-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ups-size { color: var(--text); font-size: 12.5px; }
.ups-cost { color: var(--text-dim); font-size: 11.5px; }
.ups-warn { color: var(--red, #e06c6c); font-size: 11.5px; margin: 0; }
.ups-warn[hidden] { display: none; }
