/* SVG Optimizer & Cleaner page styles, 2026-11-28.
   Uses tokens from /css/ft-shell-20261106.css and components from /css/ft-tool-20261106.css. */

.svgo-drop .ft-drop__label {
  min-height: 6.25rem;
  padding: var(--ft-space-3) var(--ft-space-4);
  gap: var(--ft-space-1);
}

.svgo-code {
  min-height: 9.5rem;
  font-family: var(--ft-font-mono);
  font-size: var(--ft-text-md);
  line-height: 1.45;
  tab-size: 2;
}

.svgo-code--out {
  min-height: 8.5rem;
}

.svgo-checks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-1);
}

.svgo-safety {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ft-space-2) var(--ft-space-3);
  min-height: 3rem;
  padding: var(--ft-space-2) var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface-2);
}

.svgo-safety__title {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-sm);
  font-weight: 650;
}

.svgo-safety__text {
  margin: 0;
  color: var(--ft-ink-2);
  font-size: var(--ft-text-sm);
  min-width: 0;
  overflow-wrap: anywhere;
}

.svgo-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 36rem) {
  .svgo-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.svgo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ft-space-3);
}

.svgo-toolbar .ft-segmented__option span {
  min-height: calc(var(--ft-target) - 2px);
  min-width: var(--ft-target);
}

.svgo-toolbar .ft-segmented__option {
  min-height: var(--ft-target);
  min-width: var(--ft-target);
  align-items: center;
}

.svgo-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-3);
}

@media (min-width: 23rem) {
  .svgo-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.svgo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--ft-space-2);
  min-width: 0;
  margin: 0;
  padding: var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
}

.svgo-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ft-space-1) var(--ft-space-2);
  min-width: 0;
}

.svgo-card__title {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-sm);
  font-weight: 650;
}

.svgo-card__bytes {
  color: var(--ft-ink-2);
  font-size: var(--ft-text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.svgo-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: var(--ft-space-3);
  overflow: hidden;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background-color: var(--ft-surface);
}

.svgo-compare[data-bg="checker"] .svgo-stage {
  background-color: var(--ft-surface);
  background-image:
    linear-gradient(45deg, var(--ft-surface-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--ft-surface-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--ft-surface-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--ft-surface-2) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.svgo-compare[data-bg="light"] .svgo-stage {
  background-color: #ffffff;
  background-image: none;
}

.svgo-compare[data-bg="dark"] .svgo-stage {
  background-color: #141c18;
  background-image: none;
}

.svgo-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(82% * var(--svgo-w-scale, 1));
  height: calc(82% * var(--svgo-h-scale, 1));
}

.svgo-compare[data-show-viewbox="true"] .svgo-frame {
  outline: 2px dashed var(--ft-accent);
  outline-offset: 0;
}

.svgo-compare[data-bg="dark"][data-show-viewbox="true"] .svgo-frame {
  outline-color: #7dd3a4;
}

.svgo-compare[data-bg="light"][data-show-viewbox="true"] .svgo-frame {
  outline-color: #1b6a4e;
}

.svgo-preview-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
}

.svgo-card__meta {
  margin: 0;
  min-height: 2.5em;
  color: var(--ft-ink-2);
  font-size: var(--ft-text-xs);
  line-height: 1.35;
  font-family: var(--ft-font-mono);
  overflow-wrap: anywhere;
}

.svgo-breakdown {
  margin: 0;
  color: var(--ft-ink-2);
  font-size: var(--ft-text-sm);
  line-height: 1.5;
}

.svgo-refused[hidden] {
  display: none;
}

.ft-tool .ft-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), minmax(0, 1fr)));
}

.ft-tool .ft-field {
  min-width: 0;
}

.ft-tool .ft-select {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (forced-colors: active) {
  .svgo-compare[data-show-viewbox="true"] .svgo-frame {
    forced-color-adjust: none;
    outline: 2px dashed Highlight;
  }
}

@media print {
  .svgo-stage {
    border-color: #999 !important;
    background: #fff !important;
  }
}
