/* Which text a drag, a long press or Ctrl+A can select.
 *
 * Application chrome is not selectable: the ribbon and its menus, the phone bars, status bars, outlines and
 * navigation panes, pane headers and tabs, and every button. A drag that starts on a label must not leave the label
 * highlighted, and Ctrl+A in a document must select the document and nothing around it.
 *
 * Text a person may want to copy stays selectable: fields, editable content, dialog bodies (About, error details)
 * and anything marked .ao-selectable. An application adds its own chrome to this list in its stylesheet when the
 * shell's class names do not cover it.
 *
 * Buttons, labels, summaries and the button, tab and menu roles are chrome only outside a document. Inside one
 * (editable content, whatever its contenteditable value, or an element an app marks .ao-document, such as a mail
 * message or a rendered Markdown file) they are the document's own text, an imported form control for example, and
 * stay selectable. */

.ribbon,
.ribbon-tabs,
.ribbon-panel,
.ribbon-menu,
.group-more-menu,
.style-menu,
.phone-top,
.phone-bar,
.phone-sheet,
.status-bar,
.statusbar,
.doc-panel-header,
.pane-handle,
.pane-tabs,
.document-tabs,
.outline-list,
.outline-tree,
.modal-header,
.modal-footer,
.ao-close-guard-actions,
.ao-file-bar-actions,
:is(
  button,
  summary,
  label,
  [role="button"],
  [role="tab"],
  [role="tablist"],
  [role="toolbar"],
  [role="menu"],
  [role="menubar"],
  [role="menuitem"],
  [role="menuitemcheckbox"],
  [role="menuitemradio"]
):not(:is([contenteditable], .ao-document) *) {
  -webkit-user-select: none;
  user-select: none;
}

/* Fields and editable text inside chrome (the font size box, a find field) keep working as text. */
input,
textarea,
[contenteditable]:not([contenteditable="false"]),
.ao-selectable,
.about-facts {
  -webkit-user-select: text;
  user-select: text;
}
