/* 翻译页面的布局补充。基础色板与控件来自 /sites/_shared/dsh.css */

body.dsh-page { max-width: 1120px; }

/* ── 顶部 ───────────────────────────────────────────── */
.top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.top-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.top h1 { font-size: 20px; font-weight: 600; margin: 0; }
.top-left span { font-size: 13px; }
.top-right { display: flex; align-items: center; gap: 8px; }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dsh-dim); flex: none;
}
.dot-ok { background: #2e9e5b; }
.dot-bad { background: var(--dsh-danger); }

/* ── 工具条 ─────────────────────────────────────────── */
.bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 132px; }
.field label { font-size: 12px; color: var(--dsh-muted); }
.field select, .field input { min-width: 132px; }
.field-custom { flex: 1 1 220px; }
.field-action { margin-left: auto; flex-direction: row; gap: 8px; align-items: flex-end; }
.field-action .dsh-btn { height: 34px; min-width: 76px; }

/* ── 翻译双栏 ───────────────────────────────────────── */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.col { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--dsh-line);
  font-size: 13px; color: var(--dsh-muted);
}
.col-head-right { display: flex; align-items: center; gap: 10px; }

.dsh-textarea.src {
  border: none; border-radius: 0; background: var(--dsh-bg);
  min-height: 380px; resize: vertical; padding: 14px;
  font-size: 14px; line-height: 1.7; font-family: var(--dsh-font);
}

/* 译文是输出区，不是输入框：纯展示，可选中、可复制，不能编辑 */
.out {
  min-height: 380px; padding: 14px;
  font-size: 14px; line-height: 1.7; font-family: var(--dsh-font);
  white-space: pre-wrap; word-break: break-word;
  overflow: auto; color: var(--dsh-fg);
  user-select: text; cursor: text;
}

.btn-mini { height: 26px; padding: 0 10px; font-size: 12px; }

/* ── 提示条 ─────────────────────────────────────────── */
.msg {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--dsh-radius);
  border: 1px solid var(--dsh-line); background: var(--dsh-surface);
  font-size: 13px; white-space: pre-wrap;
}
.msg-bad { border-color: var(--dsh-danger); color: var(--dsh-danger); }
.msg-ok { color: var(--dsh-muted); }

/* ── 折叠面板 ───────────────────────────────────────── */
.panel { padding: 0; margin-top: 14px; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 13px 16px; border: none; background: none;
  color: var(--dsh-fg); font-size: 14px; font-weight: 600;
  font-family: var(--dsh-font); cursor: pointer; text-align: left;
}
.panel-head:hover { color: var(--dsh-brand); }
.panel-head span:last-child { font-weight: 400; }
.panel-body { padding: 0 16px 16px; border-top: 1px solid var(--dsh-line); }
.sub { margin-top: 14px; }
.sub h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--dsh-muted); }
.tip { font-size: 13px; line-height: 1.7; margin: 12px 0 0; }

/* ── 拖放区 ─────────────────────────────────────────── */
.drop {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px; border: 1px dashed var(--dsh-line); border-radius: var(--dsh-radius);
  color: var(--dsh-muted); font-size: 13px;
}
.drop.dragover { border-color: var(--dsh-brand); color: var(--dsh-brand); }

/* ── 格式说明 ───────────────────────────────────────── */
.fmt { margin-top: 10px; font-size: 13px; }
.fmt > summary { cursor: pointer; color: var(--dsh-muted); }
.fmt > summary:hover { color: var(--dsh-brand); }
.fmt pre { margin: 10px 0; font-size: 12px; line-height: 1.6; overflow: auto; }
.fmt code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; padding: 1px 4px; border: 1px solid var(--dsh-line); border-radius: 4px;
}
.raw { min-height: 88px; margin: 8px 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.row-gap { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ── 列表 ───────────────────────────────────────────── */
.list { margin-top: 10px; }
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius);
  margin-bottom: 6px; font-size: 13px; background: var(--dsh-bg);
}
.list-row .name { font-weight: 600; }
.list-row .note { color: var(--dsh-muted); font-size: 12px; }
.list-empty { color: var(--dsh-dim); font-size: 13px; padding: 6px 0; }
.glossary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  max-height: 220px; overflow: auto; font-size: 12px; margin-top: 8px;
}
.glossary-grid div {
  padding: 3px 8px; border-bottom: 1px solid var(--dsh-line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.glossary-grid .to { color: var(--dsh-muted); }

.hidden { display: none; }
