@import './czi-vars.css';

.czi-image-resize-box {
  background-repeat: no-repeat;
  box-sizing: border-box;
  left: 0;
  position: absolute;
  top: 0;
  z-index: 1;
  box-shadow: 0 0 1px 1px var(--czi-selection-highlight-color-dark);
}

.czi-image-resize-box-image {
  background-color: #fff;
  height: 100%;
  left: 0;
  opacity: 0.2;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}

.czi-image-resize-box.left {
  bottom: auto;
  left: auto;
  right: 0;
  top: 0;
}

.czi-image-resize-box.top_left {
  bottom: 0;
  left: auto;
  right: 0;
  top: auto;
}

.czi-image-resize-box.top {
  bottom: 0;
  left: 0;
  right: auto;
  top: auto;
}

.czi-image-resize-box.top_right {
  bottom: 0;
  left: 0;
  right: auto;
  top: auto;
}

.czi-image-resize-box.right {
  bottom: auto;
  left: 0;
  right: auto;
  top: 0;
}

.czi-image-resize-box.bottom_right {
  bottom: auto;
  left: 0;
  right: auto;
  top: 0;
}

.czi-image-resize-box.bottom {
  bottom: auto;
  left: 0;
  right: auto;
  top: 0;
}

.czi-image-resize-box.bottom_left {
  bottom: auto;
  left: auto;
  right: 0;
  top: 0;
}

.czi-image-resize-box-control {
  height: 20px;
  position: absolute;
  width: 20px;
  z-index: 2;
}

.czi-image-resize-box-control.top_left {
  cursor: nw-resize;
  left: -10px;
  top: -10px;
}

.czi-image-resize-box-control.top {
  cursor: n-resize;
  left: 50%;
  margin-left: -10px;
  top: -10px;
}

.czi-image-resize-box-control.top_right {
  cursor: ne-resize;
  right: -10px;
  top: -10px;
}

.czi-image-resize-box-control.right {
  cursor: e-resize;
  margin-top: -10px;
  right: -10px;
  top: 50%;
}

.czi-image-resize-box-control.bottom_right {
  cursor: se-resize;
  bottom: -10px;
  right: -10px;
}

.czi-image-resize-box-control.bottom {
  cursor: s-resize;
  bottom: -10px;
  left: 50%;
  margin-left: -10px;
}

.czi-image-resize-box-control.bottom_left {
  cursor: sw-resize;
  bottom: -10px;
  left: -10px;
}

.czi-image-resize-box-control.left {
  cursor: w-resize;
  left: -10px;
  margin-top: -10px;
  top: 50%;
}

.czi-image-resize-box-control::after {
  background-color: var(--czi-selection-highlight-color-dark);
  border: solid 1px #fff;
  box-sizing: border-box;
  content: '';
  height: 10px;
  left: 5px;
  position: absolute;
  top: 5px;
  width: 10px;
}

.czi-image-resize-box-control::before {
  bottom: -10px;
  content: '';
  left: -10px;
  position: absolute;
  right: -10px;
  top: -10px;
}

@media only print {
  .czi-image-resize-box {
    display: none;
  }
}
