/* FSR (Frequency Super Resolution) — 50/50 top, 2×2 grid, insight footer */

.az-fsr-demo {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.az-fsr-error {
  margin: 0;
  padding: 12px 14px;
  color: #ffb4b4;
  font-size: 12px;
}

.az-fsr-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 12%, rgba(118, 216, 255, 0.08), transparent 38%),
    #06070a;
}

/* Original | Controls — half / half */
.az-fsr-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: center;
  padding: 14px 16px 10px;
  min-width: 0;
}

.az-fsr-view--orig {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.az-fsr-view--orig figcaption {
  text-align: left;
}

.az-fsr-controls {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
}

.az-fsr-control-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
}

.az-fsr-label {
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.az-fsr-select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 12px;
}

.az-fsr-select--grow {
  width: 100%;
}

.az-fsr-budget {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-top: 4px;
}

.az-fsr-budget-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.az-fsr-budget-head output {
  color: var(--cyan);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.az-fsr-budget input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.az-fsr-hint {
  margin: 2px 0 0;
  color: var(--soft);
  font-size: 11px;
  line-height: 1.45;
}

/* 2×2 results */
.az-fsr-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 6px 16px 12px;
  min-width: 0;
}

.az-fsr-view {
  margin: 0;
  min-width: 0;
}

.az-fsr-view figcaption {
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.az-fsr-frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 180px;
  max-height: 280px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.az-fsr-frame--orig {
  min-height: 220px;
  max-height: 320px;
}

.az-fsr-frame canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 2px;
  image-rendering: auto;
}

/* Footer metrics — own row at bottom */
.az-fsr-insight {
  margin: 0;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}

.az-fsr-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 3, 5, 0.72);
  backdrop-filter: blur(8px);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

@media (max-width: 720px) {
  .az-fsr-top {
    grid-template-columns: 1fr;
  }

  .az-fsr-frame,
  .az-fsr-frame--orig {
    min-height: 160px;
    max-height: 240px;
  }
}
