/* 3D model section on item pages + the model upload form. */

.mv-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  width: 100%;
  border: 1px solid #d5d9de;
  border-radius: 4px;
  background:
    linear-gradient(#f7f8fa, #eef1f4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
}
.mv-stage.mv-live {
  display: block;
}
.mv-stage.mv-live canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.mv-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3%;
  box-sizing: border-box;
}

.mv-activate {
  position: relative;
  font: inherit;
  font-size: 15px;
  padding: 10px 22px;
  border: 1px solid #8aa0b8;
  border-radius: 4px;
  background: #fff;
  color: #1a3550;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.mv-activate:hover {
  background: #f0f5fa;
}
.mv-activate[disabled] {
  opacity: 0.6;
  cursor: default;
}
.mv-cube {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  transform: rotate(-8deg) skewY(-6deg);
  display: inline-block;
}

.mv-hint {
  position: relative;
  font-size: 12.5px;
  color: #5b6774;
  margin: 0;
  padding: 3px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 4px;
}

.mv-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 2;
}
.mv-dims {
  font-size: 12px;
  color: #39485a;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #d5d9de;
  border-radius: 4px;
  padding: 3px 8px;
}
.mv-tools {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.mv-tools button {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #8aa0b8;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a3550;
  cursor: pointer;
}
.mv-tools button:hover {
  background: #f0f5fa;
}
.mv-tools button.on {
  background: #1a3550;
  color: #fff;
  border-color: #1a3550;
}
.mv-stage:fullscreen {
  background: #fff;
  max-height: none;
}

.mv-error {
  margin: 0;
  padding: 16px;
  font-size: 14px;
  color: #5b6774;
  text-align: center;
}

.mv-credit {
  font-size: 12.5px;
  color: #5b6774;
  margin: 8px 0 0;
}

.mv-sources {
  margin-top: 10px;
}
.mv-src-h {
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 4px;
}
.mv-sources ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
}
.mv-sources li {
  margin: 2px 0;
}

/* /cad hub gallery */
.cadhub .ch-lede {
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 46em;
  margin: 6px 0 18px;
}
.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0 26px;
}
.ch-card {
  display: block;
  border: 1px solid #d5d9de;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.ch-card:hover {
  box-shadow: 0 6px 18px rgba(26, 53, 80, 0.14);
  transform: translateY(-2px);
}
.ch-pic {
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(#f7f8fa, #e8ecf1);
  border-bottom: 1px solid #e3e7ec;
}
.ch-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 6%;
  box-sizing: border-box;
}
.ch-noshot {
  display: block;
  width: 34px;
  height: 34px;
  margin: 60px auto;
  border: 2px solid #b6c0cb;
  transform: rotate(-8deg) skewY(-6deg);
}
.ch-name {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  padding: 9px 12px 2px;
  color: #1a3550;
}
.ch-card:hover .ch-name {
  color: #0b5cad;
}
.ch-meta {
  display: block;
  font-size: 12px;
  color: #5b6774;
  padding: 0 12px 10px;
}

/* /cad/:id player page */
.cadplayer .cp-meta {
  font-size: 13.5px;
  color: #5b6774;
  margin: 4px 0 14px;
}
.cp-stage {
  aspect-ratio: 16 / 9;
  max-height: 560px;
}
.cp-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 6px;
}
.cp-dl {
  display: inline-block;
  border: 1px solid #8aa0b8;
  border-radius: 5px;
  padding: 9px 16px;
  text-decoration: none;
  color: #1a3550;
  font-size: 14.5px;
  font-weight: 600;
  background: #fff;
}
.cp-dl span {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: #5b6774;
  margin-top: 1px;
}
.cp-dl:hover {
  background: #f0f5fa;
}
.cp-dl-main {
  border-color: #0b5cad;
  background: #0b5cad;
  color: #fff;
}
.cp-dl-main span {
  color: #cfe2f3;
}
.cp-dl-main:hover {
  background: #094c8f;
}
.cp-dl-main span a,
.cp-dl span a {
  color: inherit;
}
.cp-note {
  font-style: italic;
}
.cp-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid #e3e7ec;
  font-size: 14px;
}

/* Upload form */
.mu-license {
  border: 1px solid #d5d9de;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0;
}
.mu-license legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 4px;
}
#bw-mu-form input[type='file'] {
  display: block;
  margin-top: 6px;
}
#bw-mu-form input[type='text'],
#bw-mu-form textarea {
  display: block;
  width: 100%;
  max-width: 480px;
  font: inherit;
  font-size: 14px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #c8ced5;
  border-radius: 3px;
}
