/* vec-types.html — Holografik Swizzle Matrix (doc-vsm) */

.doc-vsm {
  margin: 1.15rem 0 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(94, 180, 255, 0.26);
  background: linear-gradient(
    168deg,
    rgba(16, 22, 42, 0.82) 0%,
    rgba(10, 14, 28, 0.72) 48%,
    rgba(14, 22, 36, 0.78) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.42) inset,
    0 12px 38px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.doc-vsm__top {
  padding: 0.75rem 0.9rem 0.9rem;
  background:
    radial-gradient(110% 85% at 50% 8%, rgba(181, 108, 255, 0.08) 0%, transparent 52%),
    rgba(5, 8, 18, 0.52);
  border-bottom: 1px solid rgba(110, 150, 210, 0.14);
}

.doc-vsm__stage {
  position: relative;
  margin: 0 auto;
  max-width: min(100%, 1180px);
  height: clamp(380px, 54vmin, 580px);
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid rgba(110, 150, 210, 0.2);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(181, 108, 255, 0.06) 0%, transparent 58%),
    rgba(5, 10, 22, 0.55);
  touch-action: none;
  cursor: grab;
}

.doc-vsm__stage:active,
.doc-vsm__stage.is-dragging {
  cursor: grabbing;
}

.doc-vsm__stage.is-patch {
  cursor: crosshair;
}

.doc-vsm__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.doc-vsm__hud {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  pointer-events: none;
}

.doc-vsm__badge,
.doc-vsm__chip {
  padding: 0.32rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 190, 255, 0.22);
  background: linear-gradient(
    165deg,
    rgba(18, 28, 48, 0.55) 0%,
    rgba(10, 14, 28, 0.72) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(210, 235, 255, 0.92);
}

.doc-vsm__chip {
  font-weight: 600;
  color: rgba(150, 220, 255, 0.88);
}

.doc-vsm__code-float {
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  max-width: min(48%, 320px);
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(181, 108, 255, 0.32);
  background: rgba(6, 12, 24, 0.82);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.doc-vsm__code-float pre {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  line-height: 1.45;
  color: rgba(210, 230, 255, 0.95);
  white-space: pre-wrap;
}

.doc-vsm__error {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 90, 120, 0.35);
  background: rgba(80, 16, 28, 0.45);
  font-size: 0.82rem;
  color: rgba(255, 200, 210, 0.95);
}

.doc-vsm__desc {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(110, 150, 210, 0.14);
  border-left: 3px solid rgba(181, 108, 255, 0.55);
  background: rgba(8, 14, 28, 0.48);
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(185, 205, 235, 0.92);
}

.doc-vsm__bottom {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.95fr;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(110, 150, 210, 0.12);
}

.doc-vsm__panel {
  border-radius: 12px;
  border: 1px solid rgba(94, 200, 255, 0.14);
  background: rgba(8, 14, 28, 0.55);
  padding: 0.65rem 0.7rem 0.7rem;
  min-width: 0;
}

.doc-vsm__h {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(190, 208, 240, 0.9);
}

.doc-vsm__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.doc-vsm__mode {
  padding: 0.48rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(110, 150, 210, 0.14);
  background: rgba(8, 14, 28, 0.45);
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(150, 185, 230, 0.72);
  cursor: pointer;
}

.doc-vsm__mode.is-active {
  border-color: rgba(181, 108, 255, 0.5);
  background: rgba(181, 108, 255, 0.12);
  color: rgba(230, 245, 255, 0.98);
}

.doc-vsm__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.doc-vsm__preset {
  padding: 0.32rem 0.48rem;
  border-radius: 8px;
  border: 1px solid rgba(110, 150, 210, 0.18);
  background: rgba(6, 12, 22, 0.55);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.64rem;
  font-weight: 700;
  color: rgba(200, 220, 245, 0.92);
  cursor: pointer;
}

.doc-vsm__preset:hover {
  border-color: rgba(181, 108, 255, 0.4);
}

.doc-vsm__map {
  display: grid;
  gap: 0.28rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  color: rgba(185, 210, 240, 0.92);
}

.doc-vsm__map-row {
  display: grid;
  grid-template-columns: 2.2rem 1fr 2.4rem;
  gap: 0.35rem;
  align-items: center;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(110, 150, 210, 0.1);
}

.doc-vsm__map-row:last-child {
  border-bottom: 0;
}

.doc-vsm__map-k {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(150, 185, 230, 0.75);
}

.doc-vsm__map-v {
  color: rgba(220, 235, 255, 0.95);
}

.doc-vsm__chk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: rgba(200, 220, 245, 0.94);
  cursor: pointer;
}

.doc-vsm__chk input {
  accent-color: #b56cff;
}

.doc-vsm__hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(160, 190, 225, 0.8);
}

.doc-vsm__caption {
  margin: 0;
  padding: 0.65rem 0.9rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(155, 180, 220, 0.8);
}

.doc-vsm__caption strong {
  color: rgba(200, 220, 245, 0.95);
}

@media (max-width: 980px) {
  .doc-vsm__bottom {
    grid-template-columns: 1fr;
  }

  .doc-vsm__stage {
    height: clamp(300px, 48vmin, 460px);
    min-height: 280px;
  }

  .doc-vsm__code-float {
    max-width: min(58%, 240px);
  }
}

@media (max-width: 560px) {
  .doc-vsm__code-float {
    display: none;
  }
}
