/* Video to GIF - tool-specific styles.
   Reuses shared tokens/classes; only what tools.css lacks lives here. */

/* ---- source preview ---- */
.source { margin-bottom: 20px; display: flex; flex-direction: column; gap: 14px; }
.src-top { display: flex; align-items: flex-start; gap: 12px; }
.src-name-wrap { min-width: 0; flex: 1; }
.src-name {
  font-weight: 540;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.src-meta { margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.src-video {
  width: 100%;
  max-height: 420px;
  border-radius: var(--r-input);
  background: #000;
}

.q-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.q-remove:hover { color: var(--text); border-color: var(--text-3); }
.q-remove svg { width: 15px; height: 15px; }

/* ---- options ---- */
.options { margin-bottom: 20px; display: flex; flex-direction: column; gap: 20px; }

.opt-label { font-size: 13px; font-weight: 540; color: var(--text-2); margin-bottom: 8px; }
.trim-block { display: flex; flex-direction: column; }

.trim-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 640px;
}
.trim-input-row { display: flex; gap: 8px; align-items: stretch; }
.trim-input-row input { flex: 1; min-width: 0; }
.btn-mini {
  flex-shrink: 0;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.opt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: flex-start;
}
.opt-grid .segmented { flex-wrap: wrap; }
.width-field { min-width: 150px; }
.width-field select { width: auto; min-width: 140px; }

.quality-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.quality-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.engine-note { margin-left: 4px; }

.convert-progress { display: flex; flex-direction: column; gap: 8px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-progress-pct { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); min-width: 40px; text-align: right; }

/* ---- engine error ---- */
.engine-error { margin-bottom: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.engine-error-msg { color: var(--danger); font-size: 14px; }

/* ---- result ---- */
.result { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.result-img {
  max-width: 100%;
  max-height: 420px;
  border-radius: var(--r-input);
  border: 1px solid var(--border);
  background:
    repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 0 / 20px 20px;
}
.result-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.result-note { font-size: 13px; color: var(--text-2); max-width: 60ch; }
.result-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .trim-row { grid-template-columns: 1fr; }
  .trim-input-row { flex-direction: column; }
  .btn-mini { padding: 8px 12px; }
  .opt-grid { gap: 18px; }
}
