*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #eef1f4;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.workbench {
  position: relative;
  width: min(100%, 1440px);
  margin: 0 auto;
  background: #f5f6f8;
  line-height: 0;
}

.workbench__shot {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* 热区层：与截图同尺寸叠放，用百分比定位 */
.hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hotspot {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

.hotspot:hover,
.hotspot:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.7);
  outline-offset: 2px;
  background: rgba(22, 119, 255, 0.08);
}

.toolbar-overlay .ant-btn:hover,
.toolbar-overlay .ant-btn:focus-visible {
  outline: none;
}

a.hotspot {
  display: block;
  text-decoration: none;
  color: inherit;
}

.overlay-root {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.overlay-root > * {
  pointer-events: auto;
}

/* —— 截图上叠加的真实按钮 —— */
.toolbar-overlay {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  background: #fff;
  line-height: normal;
  transform: translateY(-50%);
}

.ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 15px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.ant-btn:hover:not(:disabled) {
  color: #1677ff;
  border-color: #1677ff;
}

.ant-btn:disabled {
  color: rgba(0, 0, 0, 0.45);
  cursor: default;
  opacity: 1;
}

.ant-btn-primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}

.ant-btn-primary:hover {
  background: #4096ff;
  border-color: #4096ff;
  color: #fff;
}

.ant-btn__icon {
  font-size: 12px;
  line-height: 1;
}
