/* These controls exist only in the editor preview, outside the document's text flow. */
[data-image-editing="true"] [data-docs-image] {
  cursor: grab;
}
[data-image-editing="true"] [data-docs-image]:focus-visible {
  outline: 2px solid #429aff;
}
.docs-image-controls {
  font: 13px/1.4 sans-serif;
  color: #f0f0f0;
}
.docs-image-selection {
  position: fixed;
  z-index: 1000;
  border: 2px solid #429aff;
  pointer-events: none;
  box-sizing: border-box;
}
.docs-image-resize {
  position: absolute;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid #429aff;
  border-radius: 2px;
  background: #fff;
  pointer-events: auto;
  touch-action: none;
}
.docs-image-resize.top-left {
  top: -9px;
  left: -9px;
  cursor: nwse-resize;
}
.docs-image-resize.top-right {
  top: -9px;
  right: -9px;
  cursor: nesw-resize;
}
.docs-image-resize.bottom-left {
  bottom: -9px;
  left: -9px;
  cursor: nesw-resize;
}
.docs-image-resize.bottom-right {
  bottom: -9px;
  right: -9px;
  cursor: nwse-resize;
}
.docs-image-toolbar {
  position: fixed;
  z-index: 1001;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: min(440px, calc(100vw - 16px));
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #429aff;
  border-radius: 5px;
  background: #242424;
  box-shadow: 0 3px 14px #0008;
}
.docs-image-toolbar label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.docs-image-toolbar button,
.docs-image-toolbar input,
.docs-image-toolbar select {
  min-height: 30px;
  border: 1px solid #666;
  border-radius: 3px;
  padding: 3px 5px;
  color: #f0f0f0;
  background: #343434;
  font: inherit;
}
.docs-image-toolbar input {
  width: 50px;
}
.docs-image-toolbar button {
  cursor: pointer;
}
.docs-image-toolbar button:hover {
  background: #484848;
}
.docs-image-toolbar :focus-visible {
  outline: 2px solid #7ab9ff;
  outline-offset: 2px;
}
.docs-image-hint {
  flex-basis: 100%;
  font-size: 11px;
  color: #ccc;
}
.docs-image-drop-line {
  position: fixed;
  z-index: 1000;
  height: 3px;
  background: #429aff;
  pointer-events: none;
}
.docs-image-drop-line[data-aligning="true"] {
  border: 2px solid #429aff;
  box-sizing: border-box;
  background: #429aff22;
}
.docs-image-drop-line span {
  position: absolute;
  bottom: 100%;
  left: 0;
  padding: 4px 6px;
  color: #fff;
  background: #205b96;
  border-radius: 3px 3px 0 0;
  font: 12px/1.4 sans-serif;
}
