/* Holodepth — Shadow map playground (tek viewport, HUD) */

.doc-material-demo--shadow-playground {
  margin: 1.1rem 0 0;
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(100, 140, 200, 0.22);
  background: linear-gradient(
    165deg,
    rgba(6, 12, 22, 0.98) 0%,
    rgba(4, 8, 16, 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--shadow-playground .doc-material-demo__tag {
  color: rgba(180, 220, 255, 0.95);
}

.doc-material-demo--shadow-playground .doc-material-demo__range {
  accent-color: #5ec8ff;
}

.doc-material-demo--shadow-playground .doc-material-demo__hud {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem 0.62rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 10, 18, 0.78);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.78rem;
}

.doc-material-demo--shadow-playground .doc-material-demo__hud-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
}

.doc-material-demo--shadow-playground .doc-material-demo__readout {
  font-weight: 600;
  color: rgba(200, 232, 255, 0.94);
  font-size: 0.76rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  flex: 1 1 12rem;
  max-width: min(100%, 22rem);
  text-align: right;
}

.doc-material-demo--shadow-playground .doc-material-demo__controls {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.doc-shadow-playground__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem 0.55rem;
  width: 100%;
}

.doc-shadow-playground__row--top {
  justify-content: flex-start;
}

.doc-shadow-playground__map-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.55rem;
  flex: 1 1 10rem;
  min-width: 0;
  max-width: min(100%, 20rem);
}

.doc-shadow-playground__map-block .doc-material-demo__group--map-size {
  min-width: 7.75rem;
  flex: 0 0 auto;
}

.doc-shadow-playground__map-block .doc-shadow-playground__select {
  width: auto;
  min-width: 7.5rem;
  max-width: 11rem;
}

.doc-shadow-playground__hint {
  flex: 1 1 100%;
  width: 100%;
  margin: 0.12rem 0 0;
  padding: 0;
  font-size: 0.64rem;
  line-height: 1.45;
  color: rgba(135, 168, 200, 0.88);
  font-weight: 500;
}

.doc-shadow-playground__hint-inline {
  display: inline-block;
  margin-left: 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(110, 165, 215, 0.82);
  cursor: help;
  user-select: none;
}

.doc-shadow-playground__row--sliders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.6rem, 1fr));
  gap: 0.32rem 0.5rem;
  align-items: end;
}

.doc-shadow-playground__row--sliders .doc-material-demo__group {
  min-width: 0;
}

.doc-material-demo--shadow-playground .doc-material-demo__group {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 7.25rem;
}

.doc-material-demo--shadow-playground .doc-material-demo__group--grow {
  flex: 1 1 8.5rem;
  min-width: 7.5rem;
}

.doc-material-demo--shadow-playground .doc-material-demo__group-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(150, 185, 215, 0.9);
}

.doc-material-demo--shadow-playground .doc-material-demo__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  width: 100%;
}

.doc-shadow-playground__checks-row {
  margin-top: 0.08rem;
  padding-top: 0.38rem;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.doc-material-demo--shadow-playground .doc-material-demo__checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.74rem;
  color: rgba(185, 210, 235, 0.92);
}

.doc-material-demo--shadow-playground .doc-material-demo__checks input {
  accent-color: #5ec8ff;
}

.doc-material-demo--shadow-playground .doc-shadow-playground__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: center;
}

.doc-shadow-playground__radios--with-label {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
  flex: 0 0 auto;
}

.doc-shadow-playground__radio-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
}

.doc-shadow-playground__radio-legend {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(150, 185, 215, 0.9);
}

.doc-material-demo--shadow-playground .doc-shadow-playground__radios label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.74rem;
  color: rgba(190, 215, 240, 0.92);
}

.doc-material-demo--shadow-playground input[data-shadow-dist]:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.doc-material-demo--shadow-playground .doc-shadow-playground__select {
  min-width: 0;
  width: 100%;
  max-width: 11rem;
  padding: 0.28rem 0.4rem;
  border-radius: 7px;
  border: 1px solid rgba(90, 120, 160, 0.35);
  background: rgba(8, 12, 22, 0.9);
  color: rgba(215, 228, 248, 0.95);
  font-size: 0.76rem;
}

.doc-material-demo--shadow-playground .doc-material-demo__viewport-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
  aspect-ratio: 16 / 9;
  background: #070a12;
}

.doc-material-demo--shadow-playground .doc-material-demo__viewport {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.doc-material-demo--shadow-playground .doc-material-demo__viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.doc-material-demo--shadow-playground .doc-material-demo__caption {
  margin: 0;
  padding: 0.7rem 0.85rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(200, 215, 230, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(4, 8, 16, 0.45);
}

@media (max-width: 640px) {
  .doc-material-demo--shadow-playground .doc-material-demo__viewport-wrap {
    min-height: 240px;
    aspect-ratio: 4 / 3;
  }

  .doc-material-demo--shadow-playground .doc-material-demo__readout {
    flex-basis: 100%;
    max-width: none;
    text-align: left;
  }
}
