/* The Reels / Stories preset makes the canvas 9:16, which at the shared
   `width: 100%` rule would run far past the viewport. Cap the height and
   let the width follow from the canvas's own aspect ratio instead. */
#previewCanvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.quality-toggle {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.quality-toggle input[type='radio'] {
  display: none;
}

.quality-toggle label {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  transition: all var(--transition);
}

.quality-toggle input[type='radio']:checked + label {
  background: var(--color-signal);
  border-color: var(--color-signal);
  color: var(--color-on-signal);
}

.quality-toggle label:hover {
  border-color: var(--color-signal);
  color: var(--color-text);
}

.quality-toggle input[type='radio']:focus-visible + label {
  outline: 2px solid var(--color-signal);
  outline-offset: 2px;
}

/* Initial hidden state. These were `display: none` attributes on the markup, which
   the CSP blocks now that style-src has no 'unsafe-inline'. ID selectors so the
   inline display the JS writes when it shows them still wins. */
#progressContainer,
#messageContainer {
  display: none;
}
