.o2-image-field {
  background-color: $white;

  &.o2-image-field-large {
    .o2-image-field-editor {
      width: 400px;
      height: 320px;
    }
  }

  &.o2-image-field-medium {
    .o2-image-field-editor {
      width: 300px;
      height: 200px;
    }
  }

  &.o2-image-field-small {
    .o2-image-field-editor {
      width: 200px;
      height: 140px;
    }
  }
}

.o2-image-field-selected {
  display: flex;
  padding: 14px;
  border: $border;
}

.o2-image-field-unselected {
  font-size: 14px;
  .o2-image-field-add {
    margin-right: 6px;
  }
}

.o2-image-field-editor {
  position: relative;
  flex-shrink: 0;
  border: $border;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  button {
    @include reset-button;
    width: 35px;
    height: 35px;
    font-size: 20px;
    position: absolute;
    top: 4px;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    color: $black-light;
  }
  .o2-image-field-edit {
    background-color: $cream;
    right: 4px;
    &:hover {
      color: $blue;
      background-color: lighten($blue, 30%);
    }
  }

  .o2-image-field-remove {
    background-color: $cream;
    left: 4px;
    &:hover {
      color: $red;
      background-color: lighten($red, 30%);
    }
  }
}

.o2-image-field-datails {
  background-color: $cream;
  height: fit-content;
  width: 100%;
  margin-left: 14px;
  padding: 12px;

  & > div {
    margin-bottom: 8px;
  }

  b {
    font-weight: 700;
  }

  b,
  span {
    font-size: 12px;
  }
}
