/* Inspection views share the process clock; this sheet adds no motion. */
.case-visual.has-model-view {
  justify-content: flex-start;
  padding-top: 112px;
  padding-bottom: 40px;
}

.has-model-view .assembly-model {
  aspect-ratio: 1.55;
  min-height: 330px;
}

.has-model-view .model-toolbar {
  align-items: flex-start;
  top: 54px;
}

.model-operation-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 78%;
}

.has-model-view .model-toolbar #model-action {
  max-width: none;
  color: #f2f7fa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.has-model-view .model-toolbar .model-operation-detail {
  display: block;
  max-width: 470px;
  color: #bfd0dc;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
}

.model-view-info {
  position: relative;
  z-index: 1;
  margin: 0 24px;
  padding: 12px 0 0;
  border-top: 1px solid #7197ae38;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 20px;
}

.model-view-info[hidden],
.model-view-info [hidden] {
  display: none;
}

.model-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.model-legend-item,
.model-edge-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e0ebf2;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
}

.model-legend-item::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex: 0 0 11px;
}

.model-legend-stock::before {
  background: #445b70;
  border: 1px solid #8a9dac;
}

.model-legend-worked::before {
  background: #dce8ee;
  border: 1px solid #f0f7fb;
}

.model-legend-contact::before {
  background: #f8bf65;
  border: 1px solid #ffda9e;
}
.is-blueprint .model-legend-stock::before {
  background: #254e65;
}
.is-blueprint .model-legend-worked::before {
  background: #95cddd;
}
.is-blueprint .model-legend-contact::before {
  background: #e7b35e;
}

.model-contrast-note {
  color: #a4bacb;
  font-size: 9px;
  line-height: 1.5;
}

.model-drawing-title {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  border: 1px solid #7dcdf057;
  color: #bde6fa;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.055em;
}

.model-drawing-title > * {
  padding: 7px 10px;
}

.model-drawing-title strong {
  color: #e4f6ff;
  font-size: 10px;
  font-weight: 500;
}

.model-drawing-title > :nth-child(2) {
  border-left: 1px solid #7dcdf057;
}

.model-drawing-title > :last-child {
  grid-column: 1 / -1;
  border-top: 1px solid #7dcdf057;
  padding-top: 4px;
  padding-bottom: 4px;
  color: #a0c7de;
  font-size: 8px;
}

.model-edge-key::before {
  content: "";
  width: 18px;
  height: 2px;
  background: #7de5fa;
  box-shadow: 0 0 5px #7de5fa30;
}

.case-console.is-blueprint .case-visual.has-model-view {
  background: #09253c;
}

.is-blueprint .assembly-model {
  background-color: #09283f;
  background-image:
    linear-gradient(#83c6e715 1px, transparent 1px),
    linear-gradient(90deg, #83c6e715 1px, transparent 1px),
    linear-gradient(#83c6e709 1px, transparent 1px),
    linear-gradient(90deg, #83c6e709 1px, transparent 1px);
  background-size:
    140px 140px,
    140px 140px,
    28px 28px,
    28px 28px;
  background-position: center;
  border-top: 1px solid #75b8de2c;
  border-bottom: 1px solid #75b8de2c;
}

.is-blueprint .assembly-model::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid #a2d9f125;
  pointer-events: none;
}

.is-blueprint .model-part-label {
  border-color: #84cbea8a;
  background: #092a42f2;
  color: #e8f8ff;
  border-radius: 1px;
  box-shadow: none;
}

.is-blueprint .model-part-label::before {
  border-radius: 0;
  background: #80e5fa;
}

.is-blueprint .model-view-info {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.model-inspection-stage .assembly-model {
  background-image: radial-gradient(
    ellipse at 50% 53%,
    #38546665,
    transparent 66%
  );
}

.is-blueprint .model-inspection-stage .assembly-model {
  background-image:
    linear-gradient(#83c6e715 1px, transparent 1px),
    linear-gradient(90deg, #83c6e715 1px, transparent 1px),
    linear-gradient(#83c6e709 1px, transparent 1px),
    linear-gradient(90deg, #83c6e709 1px, transparent 1px);
}

@media (max-width: 580px) {
  .case-visual.has-model-view {
    padding-top: 140px;
    padding-bottom: 35px;
  }

  .has-model-view .assembly-model {
    aspect-ratio: 1.18;
    min-height: 300px;
  }

  .has-model-view .model-toolbar {
    top: 42px;
  }

  .model-operation-copy {
    max-width: calc(100% - 75px);
  }

  .has-model-view .model-toolbar #model-action {
    font-size: 11px;
  }

  .has-model-view .model-toolbar .model-operation-detail {
    font-size: 10px;
    line-height: 1.45;
  }

  .model-view-info {
    margin-left: 15px;
    margin-right: 15px;
    gap: 7px 12px;
  }

  .model-legend {
    gap: 7px 12px;
  }

  .model-legend-item,
  .model-edge-key {
    font-size: 9px;
    gap: 5px;
  }

  .model-drawing-title {
    grid-template-columns: 1fr;
    font-size: 8px;
  }

  .model-drawing-title > :nth-child(2) {
    border-left: none;
    border-top: 1px solid #7dcdf057;
  }
}
