/* interpolation.html — Kromatik Barycentric Büyüteç (doc-int)
   Sabit figure kutusu (data-flow / shader-pipeline ile aynı dil) */

.doc-int {
  margin: 1.15rem 0 1.25rem;
  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-int__top {
  padding: 0.75rem 0.9rem 0.9rem;
  background:
    radial-gradient(110% 85% at 50% 8%, rgba(196, 92, 255, 0.08) 0%, transparent 52%),
    rgba(5, 8, 18, 0.52);
  border-bottom: 1px solid rgba(110, 150, 210, 0.14);
}

.doc-int__stage {
  position: relative;
  margin: 0 auto;
  max-width: min(100%, 1180px);
  height: clamp(360px, 52vmin, 560px);
  min-height: 340px;
  border-radius: 14px;
  border: 1px solid rgba(110, 150, 210, 0.2);
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 55% at 50% 42%, rgba(196, 92, 255, 0.06) 0%, transparent 58%),
    rgba(5, 10, 22, 0.55);
  touch-action: none;
  cursor: crosshair;
}

.doc-int__stage.is-orbit {
  cursor: grab;
}

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

.doc-int__stage canvas[data-int-webgl] {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

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

.doc-int__badge,
.doc-int__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-int__chip {
  font-weight: 600;
  color: rgba(150, 220, 255, 0.88);
}

.doc-int__loupe {
  position: absolute;
  z-index: 6;
  width: 112px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

.doc-int__loupe[hidden] {
  display: none;
}

.doc-int__loupe.is-flip {
  flex-direction: column-reverse;
}

.doc-int__loupe-ring {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  overflow: hidden;
  background: rgba(4, 8, 16, 0.92);
  box-shadow:
    0 0 0 1px rgba(94, 200, 255, 0.4),
    0 0 18px rgba(94, 200, 255, 0.22),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.doc-int__loupe-ring canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.doc-int__loupe-tip {
  margin: 0;
  padding: 0.38rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(120, 190, 255, 0.32);
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(8px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  line-height: 1.35;
  color: rgba(210, 230, 255, 0.95);
  white-space: pre-line;
  max-width: 148px;
}

.doc-int__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;
  line-height: 1.5;
  color: rgba(255, 200, 210, 0.95);
}

.doc-int__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(196, 92, 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-int__desc:empty {
  display: none;
}

.doc-int__bottom {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.75rem 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(110, 150, 210, 0.12);
}

.doc-int__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-int__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-int__modes {
  display: grid;
  gap: 0.35rem;
}

.doc-int__radio {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.42rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(110, 150, 210, 0.14);
  background: rgba(8, 14, 28, 0.4);
  font-size: 0.8rem;
  color: rgba(200, 220, 245, 0.94);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.doc-int__radio:has(input:checked) {
  border-color: rgba(196, 92, 255, 0.5);
  background: rgba(196, 92, 255, 0.1);
  color: rgba(230, 245, 255, 0.98);
}

.doc-int__radio input {
  accent-color: #c45cff;
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.doc-int__radio-meta {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.64rem;
  font-weight: 500;
  color: rgba(150, 185, 230, 0.72);
}

.doc-int__radio:has(input:checked) .doc-int__radio-meta {
  color: rgba(220, 180, 255, 0.88);
}

.doc-int__controls {
  display: grid;
  gap: 0.45rem;
}

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

.doc-int__chk input {
  accent-color: #5ec8ff;
}

.doc-int__row {
  display: grid;
  grid-template-columns: 5.2rem 1fr 2.6rem;
  gap: 0.4rem;
  align-items: center;
}

.doc-int__lbl {
  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.75);
}

.doc-int__range {
  width: 100%;
  accent-color: #c45cff;
}

.doc-int__out {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  color: rgba(210, 228, 255, 0.9);
  text-align: right;
}

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

.doc-int__kv {
  display: grid;
  gap: 0.28rem;
}

.doc-int__kv-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(110, 150, 210, 0.1);
  font-size: 0.78rem;
}

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

.doc-int__kv-k {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(150, 185, 230, 0.72);
}

.doc-int__kv-v {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: rgba(210, 230, 255, 0.95);
  word-break: break-word;
}

.doc-int__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.doc-int__swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.45rem;
  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.62rem;
  color: rgba(200, 220, 245, 0.92);
  cursor: pointer;
}

.doc-int__swatch-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 8px currentColor;
}

.doc-int__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-int__caption strong {
  color: rgba(200, 220, 245, 0.95);
  font-weight: 700;
}

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

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

  .doc-int__loupe {
    width: 96px;
  }

  .doc-int__loupe-ring {
    width: 96px;
    height: 96px;
  }

  .doc-int__loupe-tip {
    max-width: 120px;
  }
}

@media (max-width: 560px) {
  .doc-int__stage {
    height: clamp(260px, 44vmin, 380px);
    min-height: 240px;
  }
}
