/* Holodepth — Mesh compression lab (Raw vs Draco, temsil süreleri, harici asset yok) */

figure.doc-material-demo + .doc-h3 {
  margin-top: 1.35rem;
}

.doc-material-demo {
  margin: 1.1rem 0 0;
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(94, 200, 255, 0.16);
  background: linear-gradient(
    165deg,
    rgba(10, 12, 22, 0.98) 0%,
    rgba(4, 6, 14, 0.99) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.doc-material-demo__hud {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 6, 12, 0.72);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.78rem;
}

.doc-material-demo__hud-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.doc-material-demo__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(140, 200, 255, 0.88);
}

.doc-material-demo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.2rem;
}

.doc-material-demo__viewport-wrap {
  position: relative;
  width: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  background: radial-gradient(
    ellipse 85% 70% at 50% 88%,
    rgba(46, 90, 140, 0.22) 0%,
    rgba(8, 10, 18, 0.96) 55%
  );
}

.doc-material-demo__viewport {
  position: absolute;
  inset: 0;
}

.doc-material-demo__viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.doc-material-demo__caption {
  margin: 0;
  padding: 0.7rem 0.85rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(170, 190, 220, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 8, 14, 0.45);
}

.doc-material-demo--mesh-compression-lab {
  border-color: rgba(120, 160, 255, 0.22);
}

.doc-material-demo--mesh-compression-lab .doc-material-demo__tag {
  color: rgba(160, 200, 255, 0.92);
}

.doc-mesh-lab__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.45rem 0.85rem;
  padding: 0.35rem 0 0.15rem;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: rgba(185, 200, 235, 0.95);
}

.doc-mesh-lab__metric-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(130, 150, 190, 0.88);
  margin-bottom: 0.12rem;
}

.doc-mesh-lab__metric-value {
  font-weight: 600;
  color: rgba(210, 225, 255, 0.98);
}

.doc-mesh-lab__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(30, 40, 70, 0.85);
  border: 1px solid rgba(100, 140, 220, 0.35);
  color: rgba(200, 220, 255, 0.95);
}

.doc-mesh-lab__pill--busy {
  border-color: rgba(255, 180, 80, 0.45);
  color: rgba(255, 210, 160, 0.98);
}

.doc-mesh-lab__segment {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(90, 110, 150, 0.45);
}

.doc-mesh-lab__segment button {
  margin: 0;
  border: 0;
  padding: 0.38rem 0.75rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(12, 16, 28, 0.95);
  color: rgba(170, 190, 220, 0.92);
}

.doc-mesh-lab__segment button[aria-pressed="true"] {
  background: linear-gradient(165deg, rgba(46, 120, 200, 0.45), rgba(100, 60, 180, 0.35));
  color: #fff;
}

.doc-mesh-lab__segment button:focus-visible {
  outline: 2px solid rgba(46, 231, 242, 0.65);
  outline-offset: 2px;
}

.doc-mesh-lab__group-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(130, 150, 190, 0.88);
  margin-bottom: 0.28rem;
}

.doc-mesh-lab__reload {
  border-radius: 8px;
  border: 1px solid rgba(46, 200, 255, 0.35);
  background: rgba(20, 40, 70, 0.65);
  color: rgba(220, 235, 255, 0.96);
  padding: 0.42rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.doc-mesh-lab__reload:hover {
  border-color: rgba(46, 231, 242, 0.55);
}

.doc-mesh-lab__reload:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.doc-material-demo--mesh-compression-lab label.doc-material-demo__checks {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  color: rgba(200, 210, 230, 0.92);
}

.doc-material-demo--mesh-compression-lab label.doc-material-demo__checks input {
  accent-color: #5ec8ff;
}

.doc-mesh-lab__bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.35rem;
  font-size: 0.68rem;
  color: rgba(165, 185, 220, 0.9);
}

.doc-mesh-lab__bars progress {
  width: 100%;
  height: 0.45rem;
  accent-color: #5ec8ff;
}

.doc-mesh-lab__viewport-wrap {
  position: relative;
}

.doc-mesh-lab__split-heads {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: none;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  pointer-events: none;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 230, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.doc-mesh-lab__viewport-wrap--split .doc-mesh-lab__split-heads {
  display: flex;
}

.doc-mesh-lab__split-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--mesh-lab-split-pct, 50) * 1%);
  transform: translateX(-50%);
  width: 28px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.doc-mesh-lab__split-glow {
  position: absolute;
  top: 4%;
  bottom: 4%;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(46, 231, 242, 0.55) 18%,
    rgba(200, 170, 255, 0.75) 50%,
    rgba(46, 231, 242, 0.55) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 14px rgba(46, 200, 255, 0.45),
    0 0 28px rgba(140, 100, 255, 0.25);
  pointer-events: none;
}

.doc-mesh-lab__split-handle {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: none;
  width: 22px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(120, 200, 255, 0.45);
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: rgba(230, 240, 255, 0.95);
  cursor: ew-resize;
  background: linear-gradient(
    165deg,
    rgba(18, 28, 48, 0.95) 0%,
    rgba(8, 12, 24, 0.92) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5) inset,
    0 4px 18px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.doc-mesh-lab__split-handle:hover {
  border-color: rgba(46, 231, 242, 0.75);
  color: #fff;
}

.doc-mesh-lab__split-handle:focus-visible {
  outline: 2px solid rgba(46, 231, 242, 0.75);
  outline-offset: 2px;
}

.doc-material-demo--mesh-compression-lab .doc-material-demo__viewport-wrap {
  min-height: 280px;
}

@media (max-width: 640px) {
  .doc-material-demo--mesh-compression-lab .doc-material-demo__viewport-wrap {
    min-height: 240px;
  }
}
