/**
 * Origin vs Geometry Offset Lab — Scanner Module · Three.js r170
 */

.doc-gltf-ool {
  --ool-cyan: #3db8c4;
  --ool-origin: #ffee55;
  --ool-center: #5ab4ff;
  --ool-border: rgba(255, 255, 255, 0.08);
  --ool-surface: rgba(255, 255, 255, 0.025);
  margin: 1rem 0 1.25rem;
  padding: 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--ool-border);
  background: linear-gradient(165deg, #080b12 0%, #0a1018 48%, #0c0e16 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.doc-gltf-ool.is-featured-preset {
  border-color: rgba(61, 184, 196, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 28px rgba(61, 184, 196, 0.06);
}

.doc-gltf-ool__hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--ool-border);
}

.doc-gltf-ool__tag {
  display: inline-flex;
  padding: 0.16rem 0.48rem;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ool-cyan);
  background: rgba(61, 184, 196, 0.1);
  border: 1px solid rgba(61, 184, 196, 0.28);
}

.doc-gltf-ool__hint {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(160, 172, 190, 0.82);
}

.doc-gltf-ool__grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.doc-gltf-ool__col {
  border-radius: 10px;
  border: 1px solid var(--ool-border);
  background: var(--ool-surface);
  overflow: hidden;
  width: 100%;
}

.doc-gltf-ool__col-title {
  margin: 0;
  padding: 0.52rem 0.62rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(160, 172, 190, 0.85);
  border-bottom: 1px solid var(--ool-border);
  background: rgba(0, 0, 0, 0.22);
}

.doc-gltf-ool__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
}

.doc-gltf-ool__preset {
  flex: 1 1 calc(25% - 0.4rem);
  min-width: 7.5rem;
  margin: 0;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font: 0.68rem/1.35 "JetBrains Mono", ui-monospace, monospace;
  color: rgba(180, 195, 220, 0.88);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.doc-gltf-ool__preset strong {
  display: block;
  font-size: 0.72rem;
  color: rgba(220, 230, 245, 0.95);
  margin-bottom: 0.15rem;
}

.doc-gltf-ool__preset-star {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: rgba(255, 238, 85, 0.85);
}

.doc-gltf-ool__preset.is-active {
  color: #e8f8fc;
  border-color: rgba(61, 184, 196, 0.45);
  background: rgba(61, 184, 196, 0.12);
  box-shadow: 0 0 16px rgba(61, 184, 196, 0.1);
}

.doc-gltf-ool__preset.is-featured.is-active {
  border-color: rgba(255, 238, 85, 0.45);
  background: linear-gradient(135deg, rgba(61, 184, 196, 0.12), rgba(255, 238, 85, 0.08));
}

.doc-gltf-ool__split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 0.75rem;
  padding: 0.75rem;
  align-items: start;
}

.doc-gltf-ool__info {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.doc-gltf-ool__analysis,
.doc-gltf-ool__flow-wrap {
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.doc-gltf-ool__analysis-title {
  margin: 0 0 0.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(154, 126, 200, 0.9);
}

.doc-gltf-ool__dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.doc-gltf-ool__dl-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font: 0.66rem "JetBrains Mono", ui-monospace, monospace;
  color: rgba(160, 172, 190, 0.85);
}

.doc-gltf-ool__dl-row dt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-weight: 500;
}

.doc-gltf-ool__dl-row dd {
  margin: 0;
  text-align: right;
}

.doc-gltf-ool__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.doc-gltf-ool__dot--origin {
  background: var(--ool-origin);
  box-shadow: 0 0 8px rgba(255, 238, 85, 0.55);
}

.doc-gltf-ool__dot--center {
  background: var(--ool-center);
  box-shadow: 0 0 8px rgba(90, 180, 255, 0.45);
}

.doc-gltf-ool__info-val {
  color: rgba(195, 232, 141, 0.92);
}

.doc-gltf-ool__info-val--warn {
  color: rgba(255, 160, 120, 0.92);
}

.doc-gltf-ool__explain {
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(160, 172, 190, 0.88);
}

.doc-gltf-ool__flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  font: 0.65rem "JetBrains Mono", ui-monospace, monospace;
}

.doc-gltf-ool__flow-node {
  padding: 0.22rem 0.45rem;
  border-radius: 4px;
  color: rgba(180, 195, 220, 0.88);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-gltf-ool__flow-node--hi {
  color: #e8f8fc;
  border-color: rgba(61, 184, 196, 0.35);
  background: rgba(61, 184, 196, 0.1);
}

.doc-gltf-ool__flow-arrow {
  color: rgba(160, 172, 190, 0.45);
  padding-left: 0.35rem;
  line-height: 1;
}

.doc-gltf-ool__json-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
}

.doc-gltf-ool__json-label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(160, 172, 190, 0.72);
}

.doc-gltf-ool__json {
  margin: 0;
  flex: 1;
  padding: 0.6rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
  font: 0.64rem/1.5 "JetBrains Mono", ui-monospace, monospace;
  color: rgba(195, 232, 141, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 8rem;
  overflow: auto;
}

.doc-gltf-ool__scene-wrap {
  position: relative;
  width: 100%;
  min-height: 360px;
  height: 40vh;
  max-height: 480px;
  background: radial-gradient(ellipse at 50% 35%, rgba(154, 126, 200, 0.07), transparent 62%),
    rgba(0, 0, 0, 0.42);
}

.doc-gltf-ool__scene-wrap [data-ool-mount] {
  position: absolute;
  inset: 0;
}

.doc-gltf-ool__mount {
  display: block;
  width: 100%;
  height: 100%;
}

.doc-gltf-ool__legend {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.35rem 0.45rem;
  border-radius: 5px;
  font: 0.62rem "JetBrains Mono", ui-monospace, monospace;
  color: rgba(160, 172, 190, 0.82);
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.doc-gltf-ool__legend strong {
  color: #fff6cc;
}

.doc-gltf-ool__scene-hud {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  padding: 0.28rem 0.45rem;
  border-radius: 5px;
  font: 0.62rem "JetBrains Mono", ui-monospace, monospace;
  color: rgba(195, 232, 141, 0.88);
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.doc-gltf-ool__scene-engage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 18, 0.55);
  z-index: 2;
}

.doc-gltf-ool:not(.is-touch-gated) .doc-gltf-ool__scene-engage,
.doc-gltf-ool.is-orbit-engaged .doc-gltf-ool__scene-engage {
  display: none;
}

.doc-gltf-ool__engage-btn,
.doc-gltf-ool__engage-exit {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(61, 184, 196, 0.35);
  font-size: 0.72rem;
  color: #e8f8fc;
  background: rgba(61, 184, 196, 0.12);
  cursor: pointer;
}

.doc-gltf-ool__engage-exit {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
}

.doc-gltf-ool__caption {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(160, 172, 190, 0.88);
}

@media (max-width: 720px) {
  .doc-gltf-ool__preset {
    flex: 1 1 calc(50% - 0.4rem);
  }

  .doc-gltf-ool__split {
    grid-template-columns: 1fr;
  }
}
