/* Enlarged drawings cover page content while keeping normal page scrolling. */
.mc-diagram-zoom {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: visible;
  cursor: zoom-in;
}

.mc-diagram-zoom--expanded {
  max-width: none;
  z-index: 2147483646;
  background: #fff;
  user-select: none;
}

body.mc-diagram-dragging,
body.mc-diagram-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

/* Keep numbered-part details usable above the enlarged drawing. */
body.mc-diagram-zoom-active #mc-info {
  z-index: 2147483647 !important;
}

.mc-diagram-zoom [id^="hot-"],
.mc-diagram-zoom [id^="hot-"] * {
  cursor: pointer;
}

.mc-diagram-zoom > .mc-diagram-zoom__toggle {
  position: absolute;
  top: max(20px, 3%);
  right: max(20px, 3%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #222;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
  line-height: 1;
}

.mc-diagram-zoom > .mc-diagram-zoom__toggle:hover {
  background: transparent;
  color: #555;
}

.mc-diagram-zoom > .mc-diagram-zoom__toggle:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}

html body .mc-diagram-zoom__toggle > svg {
  display: block;
  width: 28px !important;
  height: 28px !important;
  max-width: none !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media print {
  .mc-diagram-zoom__toggle { display: none !important; }
  .mc-diagram-zoom--expanded { width: 100% !important; }
  html body .mc-diagram-zoom--expanded > svg {
    width: 100% !important;
    height: auto !important;
  }
}
