/**
 * KTX2 texture compare lab — HUD + iki sütun (kontrol / istatistik | görünüm)
 */

figure.doc-ktx2-texture-compare-lab {
  border-color: rgba(46, 200, 190, 0.22);
}

.doc-ktx2-texture-compare-lab .doc-material-demo__tag {
  color: rgba(140, 225, 230, 0.98);
}

.doc-ktx2-texture-compare-lab .doc-material-demo__hud {
  padding: 0.75rem 0.95rem 0.9rem;
}

.doc-ktx2-texture-compare-lab .doc-material-demo__viewport-wrap {
  min-height: 240px;
  aspect-ratio: 16 / 9;
}

.doc-ktx2-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-ktx2-lab__body {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    padding: 0 1rem 0.95rem;
  }

  .doc-ktx2-lab__body > .doc-ktx2-lab__side {
    flex: 0 0 min(42%, 22rem);
    max-width: min(42%, 22rem);
  }

  .doc-ktx2-lab__body > .doc-material-demo__viewport-wrap {
    flex: 1 1 auto;
    min-height: 260px;
    aspect-ratio: auto;
    min-width: 0;
  }
}

.doc-ktx2-lab__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.doc-ktx2-lab__mode {
  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-ktx2-lab__mode 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-ktx2-lab__mode 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-ktx2-lab__mode label:first-of-type {
  margin-top: 0.35rem;
}

.doc-ktx2-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-ktx2-lab__stats dt {
  margin: 0.45rem 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(150, 175, 210, 0.85);
}

.doc-ktx2-lab__stats dt:first-child {
  margin-top: 0;
}

.doc-ktx2-lab__stats dd {
  margin: 0.12rem 0 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(225, 232, 248, 0.98);
}

.doc-ktx2-lab__dd--hero {
  min-height: 2.35rem;
  line-height: 1.35;
}

.doc-ktx2-lab__dd--pipeline {
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.74rem;
  line-height: 1.45;
  color: rgba(185, 200, 225, 0.92);
}

.doc-ktx2-lab__mono--lg {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.doc-ktx2-lab__mono--good {
  color: #7ef0d4;
}

.doc-ktx2-lab__arr {
  display: inline-block;
  margin: 0 0.35rem;
  color: rgba(160, 180, 210, 0.75);
  font-weight: 600;
}

/* Kısa not / vurgu — abartısız köşe, okunaklı tipografi */
.doc-ktx2-lab__pill {
  display: inline-block;
  margin-left: 0.45rem;
  margin-top: 0.2rem;
  padding: 0.38rem 0.65rem 0.42rem;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 9px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-transform: none;
  color: rgba(232, 240, 252, 0.98);
  background: linear-gradient(
    125deg,
    rgba(6, 38, 34, 0.92) 0%,
    rgba(10, 42, 52, 0.9) 55%,
    rgba(14, 28, 52, 0.94) 100%
  );
  border: 1px solid rgba(70, 190, 175, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 4px 14px rgba(0, 0, 0, 0.25);
  vertical-align: middle;
}

.doc-ktx2-lab__dd--hero .doc-ktx2-lab__pill {
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 520px) {
  .doc-ktx2-lab__pill {
    display: block;
    margin-left: 0;
    margin-top: 0.4rem;
  }
}

/* Uzun CTA / açıklama satırları */
.doc-ktx2-lab__pill--wide {
  max-width: min(100%, 19rem);
  text-align: left;
}

@media (max-width: 520px) {
  .doc-ktx2-lab__pill--wide {
    max-width: 100%;
  }
}

@keyframes doc-ktx2-badge-cpu-pulse {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(255, 120, 70, 0.22),
      0 0 0 1px rgba(255, 140, 90, 0.35);
    border-color: rgba(255, 160, 90, 0.5);
  }
  50% {
    box-shadow:
      0 0 18px rgba(255, 100, 60, 0.38),
      0 0 0 1px rgba(255, 170, 110, 0.55);
    border-color: rgba(255, 185, 120, 0.65);
  }
}

@keyframes doc-ktx2-badge-gpu-glow {
  0%,
  100% {
    box-shadow:
      0 0 12px rgba(46, 231, 242, 0.22),
      0 0 0 1px rgba(80, 220, 190, 0.45);
  }
  50% {
    box-shadow:
      0 0 22px rgba(46, 231, 242, 0.38),
      0 0 0 1px rgba(120, 240, 220, 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-ktx2-lab__badge[data-ktx2-badge-cpu].doc-ktx2-lab__badge--on,
  .doc-ktx2-lab__badge[data-ktx2-badge-gpu].doc-ktx2-lab__badge--on {
    animation: none;
  }

  .doc-ktx2-lab__badge[data-ktx2-badge-cpu].doc-ktx2-lab__badge--on {
    box-shadow: 0 0 12px rgba(255, 120, 70, 0.25);
  }

  .doc-ktx2-lab__badge[data-ktx2-badge-gpu].doc-ktx2-lab__badge--on {
    box-shadow: 0 0 14px rgba(46, 231, 242, 0.28);
  }
}

.doc-ktx2-lab__viewport-frame {
  position: relative;
}

.doc-ktx2-lab__badges {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  max-width: 92%;
  pointer-events: none;
}

.doc-ktx2-lab__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.45rem 0.24rem;
  border-radius: 8px;
  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(0, 0, 0, 0.45);
  color: rgba(170, 185, 210, 0.75);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.doc-ktx2-lab__badge--off {
  opacity: 0.42;
}

.doc-ktx2-lab__badge--on {
  opacity: 1;
}

.doc-ktx2-lab__badge[data-ktx2-badge-cpu].doc-ktx2-lab__badge--on {
  color: #ffd4a8;
  border-color: rgba(255, 160, 90, 0.55);
  background: rgba(60, 28, 12, 0.55);
  animation: doc-ktx2-badge-cpu-pulse 2.6s ease-in-out infinite;
}

.doc-ktx2-lab__badge[data-ktx2-badge-gpu].doc-ktx2-lab__badge--on {
  color: #b8ffe8;
  border-color: rgba(80, 220, 190, 0.5);
  background: rgba(8, 40, 36, 0.55);
  animation: doc-ktx2-badge-gpu-glow 3s ease-in-out infinite;
}

.doc-ktx2-lab__status {
  font-size: 0.72rem;
  color: rgba(160, 210, 255, 0.9);
}

.doc-ktx2-lab__status--error {
  color: #ff8a8a;
}

.doc-ktx2-texture-compare-lab .doc-material-demo__caption {
  margin-top: 0.65rem;
}
