/* Native image dragging, including linked images. */
img, a:has(img) {
  -webkit-user-drag: none !important;
}

/* Script-disabled archive frames cannot cancel selection drag events.
   Prevent page selections there; leave form fields usable. */
@media (scripting: none) {
  html, body, body * {
    -webkit-user-select: none !important;
    user-select: none !important;
  }
  input, textarea, [contenteditable]:not([contenteditable="false"]),
  [contenteditable]:not([contenteditable="false"]) * {
    -webkit-user-select: text !important;
    user-select: text !important;
  }
}

/* Brick pages also block text selection to prevent native selection drags. */
html[data-disable-selection], html[data-disable-selection] body,
html[data-disable-selection] body * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
html[data-disable-selection] input,
html[data-disable-selection] textarea,
html[data-disable-selection] [contenteditable]:not([contenteditable="false"]),
html[data-disable-selection] [contenteditable]:not([contenteditable="false"]) * {
  -webkit-user-select: text !important;
  user-select: text !important;
}
