@import '../../styles/sizes.scss';

.pdfFieldItem {
  background: white;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

.pdfImageWrapper {
  &.drawing {
    cursor: crosshair;
  }
}

.placeholder {
  position: absolute;
  opacity: 0.5;
  inset: 0;
}

.drawingRectangle {
  position: absolute;
  outline: 1px solid #01aaad;
  z-index: 50;
  background-color: #01aaad4b;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;

  &.nonEditable {
    cursor: default;
    visibility: hidden;
  }

  &.edited {
    outline: 1px dotted #01aaad;
  }

  .resizeHandle {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border: 1px solid rgb(160, 160, 160);
    border-radius: 50%;
    cursor: nwse-resize;

    // Increase the area a bit so it's easier to click
    &::after {
      content: '';
      position: absolute;
      inset: -14px;
    }
  }

  .removeHandle {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -30px;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 1px solid rgb(160, 160, 160);
    border-radius: 50%;
    color: #e74c3c;
    font-size: 10px;
    cursor: pointer;
  }

  .userSelect {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: -60px;
    min-width: 193px;
    min-height: 30px;
    padding: 5px 0;
  }
}
