/* GIF to Frames only: info bar, frame grid and export panel. Shared components come from main.css. */
.frames-editor { min-width: 0; }
.frames-editor .stage-col { position: static; }
.frames-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.frames-info dl { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 4px 0; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.frames-info dl > div { padding: 8px 14px; border-left: 1px solid var(--line); }
.frames-info dl > div:first-child { border-left: 0; }
.frames-info dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.frames-info dd { margin: 0; font: 700 16px/1.3 var(--display); color: var(--ink); white-space: nowrap; }
.frames-file { margin: 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.frames-info .btn-link { margin: 0; }

.frames-scan { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: var(--mat-tint); }
.frames-scan p { margin: 0; font-size: 14px; }
.frames-scan progress, .frames-job progress { grid-column: 1 / -1; width: 100%; accent-color: var(--mat); }

/* The grid is a scrolling box; only visible cells exist (see virtual-grid.js). */
.frames-grid { position: relative; height: min(600px, 68vh); min-height: 320px; overflow-y: auto; overflow-x: hidden; padding: 0; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); scrollbar-color: var(--mat) var(--paper-2); overscroll-behavior: contain; }
.vgrid-spacer { position: relative; margin: 10px; }
.frame-cell { position: absolute; left: 0; top: 0; }
.frame-main { display: grid; grid-template-rows: 128px auto; height: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.frame-cell.is-selected .frame-main { border: 2px solid var(--mat); box-shadow: 0 0 0 3px var(--mat-soft); }
.frame-check { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; margin: 0; accent-color: var(--mat); cursor: pointer; z-index: 1; }
.frame-check:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.frame-thumb { display: grid; place-items: center; background: var(--checker); overflow: hidden; }
.frame-thumb img { display: block; max-width: 100%; max-height: 128px; object-fit: contain; image-rendering: auto; }
.frame-thumb img:not([src]) { width: 40%; height: 40%; border-radius: 6px; background: var(--line); animation: frames-pulse 1.2s ease-in-out infinite alternate; }
@keyframes frames-pulse { from { opacity: .45; } to { opacity: .9; } }
.frame-meta { display: grid; gap: 1px; padding: 7px 10px 8px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.frame-meta b { font-size: 14px; color: var(--ink); }
.frame-delay.is-fast { color: var(--warn); text-decoration: underline dotted; text-underline-offset: 2px; }
.frame-dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-dl { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 5px 10px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 12.5px var(--body); cursor: pointer; opacity: 0; transition: opacity .15s; }
.frame-dl svg { width: 14px; height: 14px; }
.frame-cell:hover .frame-dl, .frame-cell:focus-within .frame-dl, .frame-dl:focus-visible { opacity: 1; }
.frame-dl:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.frame-dl:hover { background: var(--mat); }
.frame-dl:disabled { cursor: progress; background: var(--muted); }
@media (hover: none) { .frame-dl { opacity: 1; } }

/* Export panel */
.frames-panel fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 14px; }
.frames-panel legend { font-weight: 700; margin-bottom: 8px; }
.frames-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frames-range label, .frames-scale { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.frames-panel input[type="number"], .frames-panel select { width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px; color: var(--ink); background: var(--card); font: inherit; font-weight: 400; }
.frames-panel input[type="number"]:invalid { border-color: var(--warn); }
.frames-select-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.frames-select-buttons .btn { min-height: 40px; padding: 8px 12px; font-size: 14.5px; }
.frames-selected { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--mat-tint); font-size: 14.5px; }
.frames-note { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.frames-job { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; }
.frames-job p { margin: 0; font-size: 14px; }
.frames-job .btn, .frames-scan .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.frames-result dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; }
.frames-result dt { font-weight: 700; }
.frames-result dd { margin: 0; overflow-wrap: anywhere; }
[data-status]:empty, [data-load-status]:empty { display: none; }

@media (max-width: 639px) {
  .frames-info dl { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .frames-info dl > div:nth-child(3) { border-left: 0; }
  .frames-info dl > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .frames-grid { height: 62vh; }
  .frame-main { grid-template-rows: 112px auto; }
  .frame-thumb img { max-height: 112px; }
}
@media (prefers-reduced-motion: reduce) { .frame-thumb img:not([src]) { animation: none; } .frame-dl { transition: none; } }

/* "vs Other Conversions": four cards as a 2 × 2 grid instead of 3 + 1. */
@media (min-width: 640px) { .features.frames-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
