/* The selected characters are mirrored visually; the real Range stays intact. */
html.has-lifted-selection::selection,
html.has-lifted-selection ::selection {
  background-color: transparent !important;
  color: transparent !important;
  text-shadow: none !important;
  text-decoration-color: transparent !important;
}
::highlight(selection-motion-source) {
  background-color: transparent;
  color: transparent;
  text-shadow: none;
  text-decoration-color: transparent;
}

.selection-motion-layer {
  position: fixed;
  inset: 0;
  z-index: 950;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}
.selection-motion-layer[hidden] { display: none !important; }
.selection-motion-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 160ms ease-out;
}
.selection-motion-group.is-active { transform: translateY(-3px); }
.selection-motion-group.is-settling {
  transform: translateY(0);
  transition: transform 650ms cubic-bezier(.22, 1, .36, 1);
}

.selection-motion__mark {
  position: absolute;
  z-index: 0;
  box-sizing: border-box;
  border-radius: 2px;
  background: #335AF6;
  box-shadow: 0 6px 12px rgba(51, 90, 246, .25);
  pointer-events: none;
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}
.selection-motion-group.is-settling .selection-motion__mark {
  background-color: transparent;
  box-shadow: 0 0 0 rgba(51, 90, 246, 0);
  transition: background-color 650ms cubic-bezier(.22, 1, .36, 1),
    box-shadow 650ms cubic-bezier(.22, 1, .36, 1);
}

.selection-motion__copy {
  position: absolute !important;
  z-index: 1;
  display: block !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
.selection-motion__cell {
  position: absolute;
  display: table;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  pointer-events: none;
}
.selection-motion__copy.selection-motion__copy--table-cell {
  position: static !important;
  display: table-cell !important;
}
.selection-motion__copy,
.selection-motion__copy * {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  translate: none !important;
  scale: none !important;
  rotate: none !important;
  animation: none !important;
  opacity: 1 !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-text-fill-color: currentColor !important;
  transition: color 650ms cubic-bezier(.22, 1, .36, 1) !important;
}
.selection-motion-group.is-active .selection-motion__copy,
.selection-motion-group.is-active .selection-motion__copy * { color: #FFFFFF !important; }

@media (prefers-reduced-motion: reduce) {
  .selection-motion-layer { display: none !important; }
  .selection-motion-group,
  .selection-motion__mark,
  .selection-motion__copy,
  .selection-motion__copy * { transition: none !important; }
  html.has-lifted-selection::selection,
  html.has-lifted-selection ::selection {
    background-color: #335AF6 !important;
    color: #FFFFFF !important;
  }
  ::highlight(selection-motion-source) {
    color: inherit;
    background-color: transparent;
    text-decoration-color: inherit;
  }
}
