/* ============================================================
   tool.css — 转换器专属组件(在 ds- 设计系统之上)
   命名沿用 BEM:.tool- 前缀
   ============================================================ */

/* ---------- 拖放区 ---------- */
.tool-drop {
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: var(--color-bg-soft);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.tool-drop.is-dragover {
  border-color: var(--color-brand-coral);
  background: var(--color-bg-tint-coral);
  transform: scale(1.01);
}
.tool-drop__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-bg-tint-sky);
  color: var(--color-accent-sky-600);
}
.tool-drop__icon svg { width: 28px; height: 28px; }
.tool-drop__hint {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-caption);
}

/* ---------- 阶段容器 ---------- */
.tool-stage { margin-top: var(--space-6); }
.tool-stage[hidden] { display: none; }

/* ---------- 源视频预览 ---------- */
.tool-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 720px) {
  .tool-preview { grid-template-columns: 1fr; }
}
.tool-preview video {
  width: 100%;
  border-radius: var(--radius-lg);
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.tool-file__name {
  font-weight: 600;
  color: var(--color-text-strong);
  word-break: break-all;
}
.tool-file__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-caption);
  margin-top: var(--space-1);
  font-variant-numeric: tabular-nums;
}

/* ---------- 裁剪滑杆 ---------- */
.tool-trim { margin-top: var(--space-5); }
.tool-trim__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-2);
}
.tool-trim__row label {
  font-size: var(--fs-caption);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.tool-trim__row input[type="range"] { width: 100%; accent-color: var(--color-brand-coral); }
.tool-trim__readout {
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: var(--space-2);
}

/* ---------- 参数行 ---------- */
.tool-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (max-width: 560px) {
  .tool-opts { grid-template-columns: 1fr; }
}
.tool-opts select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font: inherit;
}
.tool-estimate {
  margin-top: var(--space-3);
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.tool-estimate.is-warn { color: var(--color-status-warning); }

/* ---------- 动作区 / 进度 ---------- */
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
  align-items: center;
}
.tool-btn-busy.is-busy { opacity: 0.7; pointer-events: none; }

.tool-progress { margin-top: var(--space-6); }
.tool-progress progress {
  width: 100%;
  height: 10px;
  accent-color: var(--color-brand-coral);
}
.tool-progress__label {
  margin-top: var(--space-2);
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
}

/* ---------- 结果 ---------- */
.tool-result { margin-top: var(--space-6); }
.tool-result__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 640px) {
  .tool-result__grid { grid-template-columns: 1fr; }
}
.tool-result img,
.tool-result canvas {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  image-rendering: auto;
}
.tool-result__stats {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  margin: var(--space-2) 0 var(--space-4);
}
.tool-platform-fit h4 { margin: 0 0 var(--space-2); }
.tool-platform-fit ul { list-style: none; padding: 0; margin: 0; }
.tool-platform-fit li { padding: var(--space-1) 0; font-size: var(--fs-body-sm); }

/* ---------- 对比表 / 支持表(内容页共用) ---------- */
.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body-sm);
  margin: var(--space-5) 0;
}
.tool-table th,
.tool-table td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}
.tool-table th {
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-text-muted);
}
.tool-table td { font-variant-numeric: tabular-nums; }
.tool-table .yes { color: var(--color-status-success); font-weight: 600; }
.tool-table .no { color: var(--color-status-danger); font-weight: 600; }
.tool-table .part { color: var(--color-status-warning); font-weight: 600; }
