.block {
  width: 100%;
  margin: 1px 0;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  // subpixel padding to prevent margin collapse
  // padding: 0.1px 0;
  padding: 0;

  // increase the mouseover area of each block
  &::before {
    content: '';
    position: absolute;
    width: 152px;
    height: 100%;
    left: -152px;
  }

  // &:hover {}

  // &:focus {}

  //&.isDragging {
  //   opacity: 0.5;
  // }
}

.block-body {
  width: 100%;
  padding: 3px 2px;

  &.image {
    margin: 0 0 8px 0;
    padding: 0;
  }
}

.plus-handle {
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: -44px;
  border-radius: 3px;
  color: rgb(195, 194, 192);
  transition: all 0.2s ease;
  z-index: 1;
  cursor: grab;
  display: none;

  &:hover {
    background: rgba(190, 190, 190, 0.3);
  }

  &.visible {
    display: block;
  }

  svg {
    width: 24px;
    height: 24px;
    padding: 2px;
    pointer-events: none;
  }
}

.drag-handle {
  position: absolute;
  isolation: isolate;
  // width might be 19px
  width: 18px;
  height: 24px;
  top: 3px;
  left: -20px;
  border-radius: 3px;
  color: rgb(195, 194, 192);
  transition: all 0.2s ease;
  z-index: 1;
  cursor: grab;
  display: none;

  &:hover {
    background: rgba(190, 190, 190, 0.3);
  }

  &.visible {
    display: block;
  }

  svg {
    width: 18px;
    height: 24px;
    padding: 0px 0px;
    pointer-events: none;
  }
}

.handle-tooltip {
  position: absolute;
  display: inline-block;
  height: auto;
  top: 32px;
  // left: 0px;
  transform: translateX(-50%) translateX(10px);
  background: rgba(0, 0, 0, 1);
  border-radius: 3px;
  padding: 4px 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0px 0px 0px 1px rgba(15, 15, 15, 5%), 0px 3px 6px rgba(15, 15, 15, 10%);
  z-index: 1;
  user-select: none;
  display: none;

  &.visible {
    display: block;
  }
}

.handle-tooltip-text {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgb(130, 129, 127);
  // line-height: 1;
  margin-bottom: 0;
}

.handle-tooltip-text > span {
  color: rgb(231, 231, 231);
}

// BLOCK BODY STYLES
[contenteditable]:focus:empty:after {
  content: attr(placeholder);
  color: rgb(175, 174, 172);
  opacity: 1;
  transition: all 0.2s ease;
}

.h1 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  
  &.block-body {
    margin-top: 2rem;  
  }
}

.h2 {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1px;

  &.block-body {
    margin-top: 1rem;  
  }
}

.h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1px;

  &.block-body {
    margin-top: 0.5rem;  
  }
}

.paragraph {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 4px;
}

.quote-wrapper {
  margin-top: 4px;
  margin-bottom: 4px;

  border-left: 3px solid black;
  padding-left: 14px;
  padding-right: 14px;
  width: 100%;

  &.block-body {
    margin-top: 0.5rem;  
  }
}

.quote {
  max-width: 100%;
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  caret-color: rgb(55, 53, 47);
  padding-left: 2px;
  padding-right: 2px;
}

.block-body-bulleted-list {
  width: 100%;
  display: flex;
  padding: 3px 2px;
}

.bulleted-list-pseudo {
  width: 24px;
  height: 24px;
  text-align: center;;
}

.bulleted-list-pseudo::before {
  content: '•';
}

.bulleted-list {
  min-width: 1px;
}

.block-body-numbered-list {
  width: 100%;
  display: flex;
  padding: 3px 2px;
}

.numbered-list-pseudo {
  width: 24px;
  height: 24px;
  text-align: center;
}

.numbered-list-pseudo::before {
  content: '1.';
}

.numbered-list {
  min-width: 1px;
}

.block-body-todo {
  display: flex;
  padding-left: 2px;
}

.todo-control {
  width: 24px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 2px;
  // margin-right: 4px;
  cursor: pointer;

  > .todo-bg {
    width: 16px;
    height: 16px;
    background: transparent;
    user-select: none;

    &:hover {
      background: rgba(55, 53, 47, 0.08);
    }
  }
}

.checkbox-wrapper {
  width: 16px;
  height: 16px;
  cursor: pointer;
  user-select: none;
  transition: 0.2s;
}

.check-wrapper {
  width: 16px;
  height: 16px;
  background: rgb(46, 170, 220);
  transition: 0.2s;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.todo {
  padding: 3px 2px;
  font-size: 1rem;
}

.block-body-code {
  width: 100%;
  background: rgb(247, 246, 243);
  margin: 4px 0;
}

.code {
  width: 100%;
  display: flex;
  overflow-x: auto;
}

.code-inner {
  text-align: left;
  font-size: 85%;
  font-family: "SFMono-Regular", "Menlo", "Consolas", "PT Mono", "Liberation Mono", Courier, monospace;
  line-height: 1.5;
  tab-size: 2;
  flex-grow: 1;
  flex-shrink: 1;
  padding: 34px 16px 32px 32px;
  min-height: 1em;
  color: rgb(55, 53, 47);
  // white-space: pre;
  white-space: pre-wrap;
}

.block-body-divider {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  padding-top: 3px;
  margin-bottom: 3px;
}

.divider {
  width: 100%;
  height: 13px;
  padding: 3px 0;
  display: flex;
  align-items: center;
}

.divider-line {
  width: 100%;
  height: 1px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.09);
}

.image-block-wrapper {
  width: 100%;
  border-radius: 3px;
  // margin: 4px 0;
  margin: 8px 0;
}

.block-image {
  display: block;
  width: 100%;
}

.image-upload-icon {
  width: 26px;
  height: 26px;
  margin-right: 12px;
  margin-top: 1px;
  color: rgba(55, 53, 47, 0.4);
}

.image-upload-text {
  user-select: none;
}

input[type='file'].image-upload-input {
  display: none;
}

.image-upload-label {
  width: 100%;
  padding: 12px 36px 12px 12px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  color: rgba(55, 53, 47, 0.6);
  background: rgb(240, 239, 236);

  &:hover {
    background: rgb(227, 226, 223);
  }
}

.callout {
  width: 100%;
  padding: 24px;
  background: rgba(190, 190, 190, 0.3);
}