/*
 * HEIC to JPG tool styles. Extends the shared components in kit.css; only
 * layout specifics live here, all values come from the --kw-* tokens.
 */

.kw-hc__input,
.kw-hc__quality { min-width: 0; }

.kw-hc__files-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--kw-space-2);
}

.kw-hc__files {
  max-height: 264px;
  overflow-y: auto;
  padding-right: var(--kw-space-1);
}

.kw-hc__file { align-items: center; }
.kw-hc__state {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--kw-radius-full);
  background: var(--kw-surface-2);
  color: var(--kw-muted);
  font-size: var(--kw-fs-sm);
  font-weight: 700;
}
.kw-hc__file.is-waiting .kw-hc__state { color: var(--kw-primary-ink); background: var(--kw-primary-soft); }
.kw-hc__file.is-done .kw-hc__state {
  color: var(--kw-success);
  background: var(--kw-success-soft);
}
.kw-hc__file.is-error { border-color: color-mix(in srgb, var(--kw-danger) 45%, transparent); }
.kw-hc__file.is-error .kw-hc__state {
  color: var(--kw-danger);
  background: var(--kw-danger-soft);
}

.kw-hc__file-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
.kw-hc__file-name {
  overflow: hidden;
  font-weight: 500;
  font-size: var(--kw-fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kw-hc__file-meta {
  overflow: hidden;
  color: var(--kw-muted);
  font-size: var(--kw-fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kw-hc__file.is-error .kw-hc__file-meta { color: var(--kw-danger); }
.kw-hc__file.is-done .kw-hc__file-meta .kw-hc__arrow { color: var(--kw-success); font-weight: 600; }

.kw-hc__export {
  display: grid;
  gap: var(--kw-space-3);
  padding-top: var(--kw-space-2);
  border-top: 1px solid var(--kw-line);
}
.kw-hc__export .kw-hint { margin: 0; }
.kw-hc__live { display: grid; gap: var(--kw-space-3); }
.kw-hc__live .kw-alert p { margin: 0; }

@media (min-width: 768px) {
  .kw-hc {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--kw-space-6);
  }
  .kw-hc__input { grid-column: 1; grid-row: 1 / span 2; }
  .kw-hc__quality { grid-column: 2; align-self: start; }
  .kw-hc__export, .kw-hc__live { grid-column: 1 / -1; }
  .kw-hc__files { max-height: 320px; }
}

@media (max-width: 767px) {
  .kw-hc { display: grid; gap: var(--kw-space-5); }
  .kw-hc__export .kw-btn--primary { width: 100%; }
}

