/* pdffit 三个页面共用的样式 —— 叠在套件外壳 ui.css 之上。
   设计令牌沿用同一套 CSS 变量，所以和图片域看起来是一个工具。 */

/* ---------- 有序文件列表（可拖动排序） ---------- */
.files { display: flex; flex-direction: column; gap: 8px; }

.file {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 12px; box-shadow: var(--shadow);
  cursor: grab; transition: border-color .15s, opacity .15s; touch-action: pan-y;
}
.file:hover { border-color: var(--accent-line); }
.file.dragging { opacity: .38; cursor: grabbing; border-color: var(--accent); }
/* 插入位置用一条 3px 的实心边提示，比整块高亮更容易看清"会插到哪儿" */
.file.over-before { box-shadow: inset 0 3px 0 -1px var(--accent), var(--shadow); }
.file.over-after  { box-shadow: inset 0 -3px 0 -1px var(--accent), var(--shadow); }

.file .idx {
  flex: none; min-width: 24px; height: 24px; border-radius: 7px; padding: 0 5px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 600; display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.file .thumb {
  flex: none; width: 42px; height: 42px; border-radius: 8px; overflow: hidden;
  background: #EDEFF2; display: grid; place-items: center; font-size: 15px; color: var(--faint);
}
.file .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.file .body { flex: 1; min-width: 0; }
.file .name {
  font-size: 12.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file .meta { font-size: 11px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.file .acts { display: flex; gap: 5px; flex: none; }
.file .acts button {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 7px; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer;
  transition: all .13s; line-height: 1.4;
}
.file .acts button:hover { background: var(--panel-2); color: var(--text); }
.file .acts button.del:hover { color: var(--danger); border-color: #E9BDB6; background: #FDF3F1; }
.file .acts button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- PDF 预览 ---------- */
.pdfbox {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.pdfbox embed {
  width: 100%; height: 68vh; min-height: 460px; border: 0; display: block;
  background: #6E7278; /* 阅读器加载前先铺一层中灰，避免闪白 */
}
.pdfbox.busy embed { opacity: .5; }
.pdfbox .spin {
  position: absolute; left: 50%; top: 50%; margin: -15px 0 0 -15px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(43,92,230,.18); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: none;
}
.pdfbox.busy .spin { display: block; }
.pdfbox .empty {
  padding: 56px 24px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.9;
}
.pdfbox .empty b { color: var(--text); }

.viewbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.viewbar .spacer { flex: 1; }

/* ---------- 说明 / 提示行 ---------- */
.note {
  font-size: 11.5px; color: var(--faint); line-height: 1.6;
  margin-top: 9px;
}
.note.warn { color: #A15C00; }
.note a { color: var(--accent); }

/* 水印页「水印文字」下面那行小字：空白不提交时整行转危险色。
   特意用类而不是内联 style —— 见 watermark.html 里 #textDesc 的说明。 */
.seg-desc.danger { color: var(--danger); }

/* ---------- 数值 + 输入的小组合 ---------- */
.mini { display: flex; align-items: center; gap: 7px; }
.mini input[type=number] { width: 76px; }
.mini .unit { font-size: 12px; color: var(--faint); }
