/**
 * Transcoding process lab — JPG vs KTX2 pipeline (öğretici simülasyon)
 */

figure.doc-transcoding-process-lab {
  border-color: rgba(46, 200, 190, 0.24);
}

.doc-transcoding-process-lab .doc-material-demo__tag {
  color: rgba(140, 225, 230, 0.98);
}

.doc-txp-lab__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  padding: 0 0.95rem 0.85rem;
  box-sizing: border-box;
}

@media (min-width: 880px) {
  .doc-txp-lab__body {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    padding: 0 1rem 0.95rem;
  }

  .doc-txp-lab__body > .doc-txp-lab__side {
    flex: 0 0 min(44%, 23rem);
    max-width: min(44%, 23rem);
  }

  .doc-txp-lab__body > .doc-material-demo__viewport-wrap {
    flex: 1 1 auto;
    min-height: 260px;
    aspect-ratio: auto;
    min-width: 0;
  }
}

.doc-txp-lab__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.doc-txp-lab__fieldset {
  margin: 0;
  padding: 0.55rem 0.65rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.doc-txp-lab__fieldset legend {
  padding: 0 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 210, 255, 0.9);
}

.doc-txp-lab__fieldset label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: rgba(200, 210, 230, 0.95);
  cursor: pointer;
}

.doc-txp-lab__fieldset label:first-of-type {
  margin-top: 0.35rem;
}

/* Pipeline seçenekleri — aktif olan :has ile vurgu */
.doc-txp-lab__pipeline-label {
  flex-wrap: wrap;
  align-items: flex-start;
  margin-left: -0.05rem;
  margin-right: -0.05rem;
  padding: 0.4rem 0.5rem 0.45rem;
  border-radius: 9px;
  border: 1px solid transparent;
  transition:
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.doc-txp-lab__opt {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.doc-txp-lab__opt-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.95);
}

.doc-txp-lab__opt-chain {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(175, 195, 225, 0.92);
}

.doc-txp-lab__fieldset:has(input[value="jpg"]:checked) .doc-txp-lab__pipeline-label--jpg {
  border-color: rgba(255, 150, 110, 0.45);
  background: rgba(60, 28, 18, 0.32);
  box-shadow:
    0 0 0 1px rgba(255, 120, 80, 0.12) inset,
    0 0 18px rgba(255, 130, 90, 0.2);
}

.doc-txp-lab__fieldset:has(input[value="ktx2"]:checked) .doc-txp-lab__pipeline-label--ktx2 {
  border-color: rgba(80, 220, 200, 0.42);
  background: rgba(12, 48, 44, 0.28);
  box-shadow:
    0 0 0 1px rgba(46, 200, 190, 0.14) inset,
    0 0 18px rgba(46, 200, 190, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .doc-txp-lab__pipeline-label {
    transition: none;
  }
}

.doc-txp-lab__worker-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(165, 190, 220, 0.88);
}

.doc-txp-lab__stats {
  margin: 0;
  padding: 0.6rem 0.7rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 10, 20, 0.55);
  font-size: 0.78rem;
  line-height: 1.45;
}

.doc-txp-lab__stats dt {
  margin: 0.35rem 0 0;
  font-weight: 600;
  color: rgba(150, 190, 255, 0.9);
}

.doc-txp-lab__stats dt:first-child {
  margin-top: 0;
}

.doc-txp-lab__stats dd {
  margin: 0.1rem 0 0;
  color: rgba(200, 210, 230, 0.95);
}

.doc-txp-lab__dd--hero {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(230, 240, 255, 0.98);
}

.doc-txp-lab__badges {
  position: absolute;
  right: 0.55rem;
  bottom: 0.48rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  pointer-events: none;
}

.doc-txp-lab__badge {
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 8, 16, 0.72);
  color: rgba(200, 220, 250, 0.92);
}

.doc-txp-lab__badge--warn {
  border-color: rgba(255, 170, 90, 0.35);
  color: rgba(255, 200, 160, 0.95);
}

.doc-txp-lab__badge--ok {
  border-color: rgba(80, 220, 160, 0.35);
  color: rgba(160, 255, 210, 0.95);
}

.doc-txp-lab__viewport-frame {
  position: relative;
}

.doc-txp-lab__hint {
  position: absolute;
  left: 0.5rem;
  bottom: 0.42rem;
  margin: 0;
  pointer-events: none;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(195, 210, 235, 0.72);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.65);
}

.doc-txp-lab__status {
  font-size: 0.72rem;
  color: rgba(170, 210, 230, 0.9);
}

.doc-txp-lab__status--error {
  color: #ff8a8a;
}

@media (prefers-reduced-motion: reduce) {
  .doc-transcoding-process-lab .doc-material-demo__viewport canvas {
    filter: none;
  }
}
