/* 根节点需可命中图元；点空白取消选中由 PisellFloorMapLayout 的 map-area onClick 处理 */
.pisell-floor-map-layout-editable-item-layer {
  cursor: default;
  pointer-events: auto;
}

.pisell-floor-map-layout-editable-item {
  cursor: move;
  outline: none;
  pointer-events: auto;
  /* 避免触控时浏览器滚动/缩放抢走 gesture，保证可连续收到 pointermove */
  touch-action: none;

  &-selected {
    /* 实际层级由 TSX 内联 zIndex（SELECTED_ITEM_STACK_Z + item.zIndex）控制 */
    outline: 3px solid var(--fmap-primary, #1677ff);
    outline-offset: 0;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--fmap-primary, #1677ff) 25%, transparent);
  }

  /** 已锁定：选中描边改为警告色，与未锁定区分 */

  &-selected-lock {
    outline-color: #d48806;
    box-shadow: 0 0 0 1px rgba(212, 136, 6, 0.28);
  }

  &-inner {
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
  }
}

.pisell-floor-map-layout-editable-resize-handle {
  width: 20px;
  height: 20px;
  margin: -10px;
  background: var(--fmap-primary, #1677ff);
  border: 1px solid #fff;
  border-radius: 2px;
  cursor: nwse-resize;
  pointer-events: auto;
  touch-action: none;
  z-index: 3;

  &-nw {
    left: 0;
    top: 0;
    cursor: nwse-resize;
  }

  &-ne {
    right: 0;
    top: 0;
    cursor: nesw-resize;
  }

  &-se {
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
  }

  &-sw {
    left: 0;
    bottom: 0;
    cursor: nesw-resize;
  }
}

.pisell-floor-map-layout-edit-quick-actions {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 10px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid #e8eaed;
  /* 高于同图元内缩放点 (3)，并贴近选中项栈顶，避免被内部子 stacking 盖住 */
  z-index: 100000;
  pointer-events: auto;
  touch-action: manipulation;

  &--locked {
    border-color: rgba(212, 136, 6, 0.45);
    background: #fffbf0;
  }

  /* 无边框、更大图标按钮（antd 类名在运行环境可能为 pisell-lowcode-*） */

  .pisell-lowcode-btn,
  .ant-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    box-shadow: none !important;
    line-height: 1;

    .pisell-lowcode-btn-icon,
    .anticon {
      font-size: 22px;
    }
  }
}
