/* The video compressor (/video-compressor), on the foundation, tool.css and the video checker's drop tile (video.css):
   the editor is the file and three choices between hairlines; the well shows the compressed video when it is made,
   a bar while it is; under it, where it fits, its numbers, Download MP4 and the pennant. */
.compressor .editor { border-radius: 12px; transition: background .15s ease-out, box-shadow .15s ease-out; }
.compressor .editor.drop { background: var(--muted); box-shadow: 0 0 0 12px var(--muted); }

.set { margin-top: 24px; }
.set .name { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set .name:empty, .set .facts:empty { display: none; }
.set .facts { margin: 4px 0 0; font-size: 14.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.set .head { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.set .head:has(.name:empty) { display: none; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--muted-foreground); }
.field > span:first-child { flex: none; }
.sizes { display: flex; align-items: center; gap: 8px; }
.num { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-foreground); }
.num input {
  width: 64px; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--muted); text-align: right;
  font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--foreground);
}
.num input::placeholder { font-weight: 400; color: var(--muted-foreground); }
.num input:focus-visible { outline: 2px solid var(--foreground); outline-offset: 0; }

/* The well: the compressed video at its own shape, never wider than the well. */
.compressor .stage { min-height: 360px; flex-direction: column; gap: 16px; }
.compressor .stage video { display: block; max-width: 100%; max-height: 560px; border-radius: 10px; background: #000; }
.compressor .stage video[hidden], .compressor .stage progress { display: none; }
.compressor .stage.working progress { display: block; }
.compressor .stage.working .empty, .compressor .stage.done .empty { display: none; }
.stage progress { width: min(360px, 80%); height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--background); appearance: none; }
.stage progress::-webkit-progress-bar { background: var(--background); }
.stage progress::-webkit-progress-value { background: var(--primary, #c8321e); }
.stage progress::-moz-progress-bar { background: var(--primary, #c8321e); }
.stage .empty { margin: 0; font-size: 16px; color: var(--muted-foreground); text-align: center; }

/* Where the file fits: one line each, green when it does. */
.fits { grid-column: 1 / -1; margin: 20px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.fits:empty { display: none; }
.fits li { position: relative; padding: 6px 0 6px 22px; font-size: 15.5px; line-height: 1.45; color: var(--foreground); }
.fits li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 10px; height: 10px; border-radius: 999px; background: var(--success); }
.fits li.no::before { background: var(--destructive); }

.compressor .result { align-items: center; }
.acts { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; justify-content: flex-end; }
.acts [hidden] { display: none; }
.numbers.bad { color: var(--destructive); }
.checked { margin-top: var(--space-5); font-size: 15px; color: var(--muted-foreground); }

@media (max-width: 1119px) {
  .compressor .editor { position: static; }
}
@media (max-width: 759px) {
  .compressor .stage { min-height: 200px; padding: 20px; }
  .fits { grid-template-columns: 1fr; }
  .compressor .result { flex-direction: column; align-items: stretch; }
  .acts { flex-direction: column; align-items: stretch; }
  .field { flex-wrap: wrap; padding: 10px 0; }
}
