/* SVG Optimizer: result view in the stage. Uses the shared tokens and components; only layout lives here. */
.svgo-view {
  flex: 1;
  padding: var(--stage-pad);
}
.svgo-view[hidden] {
  display: none;
}
.svgo-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
}
.svgo-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.svgo-bar .file-name {
  flex: 1;
  min-width: 0;
}
.svgo-pick {
  min-width: 0;
  flex: 1;
  max-width: 20rem;
}
.svgo-sum {
  margin-left: auto;
}
.svgo-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}
.svgo-view .segmented {
  align-self: flex-start;
  max-width: 100%;
}
.svgo-view .segmented button {
  white-space: nowrap;
}
.svgo-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.svgo-pane {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  min-width: 0;
}
.svgo-pane figcaption {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 var(--space-1);
  font-size: var(--text-sm);
}
.svgo-canvas {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}
.svgo-canvas img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.svgo-code {
  min-height: 55vh;
}
.svgo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.svgo-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
  min-height: 3.5rem;
}

/* File cards open the result: same card, with hover, press and keyboard focus */
.file-card.is-openable {
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: transform var(--duration) ease-out;
}
.file-card.is-openable .file-thumb {
  transition: border-color var(--duration);
}
.file-card.is-openable:hover .file-thumb {
  border-color: var(--color-accent);
}
.file-card.is-openable:active {
  transform: scale(0.98);
}
.file-card.is-openable:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .file-card.is-openable {
    transition: none;
  }
  .file-card.is-openable:active {
    transform: none;
  }
}
@media (max-width: 720px) {
  .svgo-compare {
    grid-template-columns: 1fr;
  }
  .svgo-code {
    min-height: 40vh;
  }
}

/* Tighter option list; the box stays aligned with the first line of wrapped labels */
.panel-body > .check-row {
  padding-block: 0.125rem;
}

/* Decimal places: used only while "Round numbers" is on */
.panel-body > .segmented {
  margin-bottom: 0.5rem;
}
.segmented.is-disabled {
  opacity: 0.5;
}
.segmented.is-disabled button {
  cursor: not-allowed;
}
