/* Image Compressor - tool-specific styles (built on shared tokens) */

.options-bar { margin-bottom: 20px; }

.opt-grid {
  display: grid;
  grid-template-columns: auto 1fr 220px;
  gap: 24px 32px;
  align-items: start;
}
@media (max-width: 820px) {
  .opt-grid { grid-template-columns: 1fr; gap: 20px; }
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}
.results-head .actions { gap: 8px; }

.file-list { gap: 12px; }

/* file row */
.file-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-surface);
  padding: 14px 16px;
}

.thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--r-input);
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.skeleton::after { border-radius: var(--r-input); }
.thumb .thumb-err {
  color: var(--danger);
  width: 22px;
  height: 22px;
}

.file-main { min-width: 0; }
.file-name {
  font-weight: 540;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.size-line { color: var(--text-2); }
.size-arrow { color: var(--text-3); padding: 0 2px; }
.saved-ok { color: var(--ok); }
.saved-warn { color: var(--danger); }

.file-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}
.file-note.is-error { color: var(--danger); }

.file-progress { margin-top: 8px; max-width: 240px; }

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* per-file "keep original" toggle */
.keep-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.keep-toggle input { width: auto; }

.dl-btn {
  padding: 7px 14px;
  font-size: 13px;
}
.dl-btn svg { width: 15px; height: 15px; }

.icon-remove {
  width: 32px;
  height: 32px;
}
.icon-remove svg { width: 15px; height: 15px; }

@media (max-width: 560px) {
  .file-row {
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "thumb main"
      "actions actions";
  }
  .thumb { width: 44px; height: 44px; grid-area: thumb; }
  .file-main { grid-area: main; }
  .row-actions { grid-area: actions; justify-content: flex-end; }
}
