/* PMP canvas utility language — compact production controls with original CSS icons. */
.stage-options[role="toolbar"] {
  flex-wrap: nowrap;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(77, 105, 116, .22);
  border-radius: 14px;
  background: rgba(250, 253, 251, .94);
  box-shadow: 0 10px 28px rgba(34, 54, 65, .14), inset 0 1px 0 #fff;
  backdrop-filter: blur(14px);
}

.stage-options .canvas-utility {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  min-height: 40px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #38515b;
  background: transparent;
  box-shadow: none;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
}

.stage-options .canvas-utility:hover {
  border-color: rgba(20, 139, 132, .28);
  color: #075f5d;
  background: rgba(19, 158, 149, .08);
  transform: translateY(-1px);
}

.stage-options .canvas-utility:focus-visible {
  outline: 3px solid rgba(0, 155, 171, .26);
  outline-offset: 2px;
  border-color: #078f91;
}

.stage-options button.canvas-utility.active,
.stage-options button.canvas-utility[aria-pressed="true"] {
  border-color: rgba(5, 129, 128, .35);
  color: #075e5d;
  background: linear-gradient(145deg, #e2f7f3, #edf8f4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65), 0 3px 9px rgba(8, 112, 111, .12);
}

.canvas-tool-label {
  line-height: 1;
}

.canvas-tool-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  color: currentColor;
}

.icon-canvas-color {
  border: 2px solid currentColor;
  border-radius: 50%;
  background: conic-gradient(#13a99e 0 25%, #2a6db4 0 50%, #ef8c35 0 75%, #d44f78 0);
  box-shadow: inset 0 0 0 3px #fff;
}

.icon-canvas-color::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 6px;
  height: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: currentColor;
}

.icon-installation {
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.icon-installation::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 7px;
  background: linear-gradient(145deg, transparent 43%, currentColor 45% 56%, transparent 58%), linear-gradient(35deg, currentColor 0 48%, transparent 50%);
}

.icon-installation::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.icon-guides::before,
.icon-guides::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.icon-guides::before {
  top: 0;
  bottom: 0;
  left: 8px;
  width: 1.8px;
  box-shadow: -5px 3px 0 -0.4px currentColor, 5px 12px 0 -0.4px currentColor;
}

.icon-guides::after {
  top: 8px;
  right: 0;
  left: 0;
  height: 1.8px;
  box-shadow: 3px -5px 0 -0.4px currentColor, -4px 5px 0 -0.4px currentColor;
}

.icon-snap {
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px 2px 7px 7px;
}

.icon-snap::before,
.icon-snap::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 6px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
}

.icon-snap::before { left: -2px; }
.icon-snap::after { right: -2px; }

.icon-grid {
  border: 1.6px solid currentColor;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, transparent 0 4px, currentColor 4px 5.2px), repeating-linear-gradient(0deg, transparent 0 4px, currentColor 4px 5.2px);
}

.icon-margins {
  border: 1.7px solid currentColor;
  border-radius: 3px;
}

.icon-margins::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px dashed currentColor;
  border-radius: 1px;
}

.icon-fit {
  background:
    linear-gradient(currentColor,currentColor) left top/7px 1.7px no-repeat,
    linear-gradient(currentColor,currentColor) left top/1.7px 7px no-repeat,
    linear-gradient(currentColor,currentColor) right top/7px 1.7px no-repeat,
    linear-gradient(currentColor,currentColor) right top/1.7px 7px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/7px 1.7px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/1.7px 7px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/7px 1.7px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/1.7px 7px no-repeat;
}

.stage-options .canvas-color-control.canvas-utility {
  padding-left: 8px;
  cursor: default;
}

.canvas-color-control.canvas-utility input[type="color"] {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 1px;
  overflow: hidden;
  border: 1px solid rgba(51, 76, 85, .35);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.app-shell:not(.preview-mode):not(.design-only-fullscreen) .canvas-viewport {
  top: 112px;
}

@media (max-width: 1050px) {
  .stage-options[role="toolbar"] {
    max-width: calc(100% - 28px);
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .stage-options .canvas-utility {
    flex: 0 0 38px;
    width: 38px;
    padding: 0;
  }

  .stage-options .canvas-tool-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .stage-options .canvas-color-control.canvas-utility {
    flex-basis: 68px;
    width: 68px;
    padding: 0 6px;
  }
}

@media (prefers-contrast: more) {
  .stage-options[role="toolbar"],
  .stage-options .canvas-utility {
    border-color: currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-options .canvas-utility {
    transition: none;
  }
}
