/**
 * @file
 * Styles for tabledrag.
 * @see tabledrag.js
 */

body.drag {
  cursor: move;
}

tr.region-title {
  font-weight: var(--font-weight-700);
}

tr.region-message {
  color: var(--gray-300);
}

tr.region-populated {
  display: none;
}

tr.add-new .tabledrag-changed {
  display: none;
}

.draggable a.tabledrag-handle {
  cursor: move;
  overflow: hidden;
  text-decoration: none;
}

a.tabledrag-handle:hover {
  text-decoration: none;
}

a.tabledrag-handle .handle {
  background-color: var(--gray-500);
  height: 1em;
  margin: 0;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8h32v96H128V192c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V288h96v96H192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8H288V288h96v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6v32H288V128h32c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8h32v96H128V192c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V288h96v96H192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8H288V288h96v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6v32H288V128h32c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  width: 1em;
}

a.tabledrag-handle:hover .handle,
a.tabledrag-handle:focus .handle {
  background: var(--gray-900);
}

@media (forced-colors: active) {
  a.tabledrag-handle .handle,
  a.tabledrag-handle:hover .handle,
  a.tabledrag-handle:focus .handle {
    background: canvastext;
  }
}

.tabledrag-toggle-weight-wrapper {
  text-align: right;
}

.indentation {
  float: left;
  width: 20px;
  height: 1.7em;
  margin: -0.4em 0.2em -0.4em -0.4em;
  padding: 0.42em 0 0.42em 0.6em;
}

.draggable:hover {
  background-color: var(--gray-100);
}

.draggable.drag {
  background-color: var(--gray-200);
}

.draggable.drag-previous {
  background-color: var(--gray-300);
}

.drag-previous a {
  color: var(--gray-800); /* Ensure proper contrast. */
}

.draggable-table {
  width: 100%;
}

.draggable-table .form-item {
  -webkit-margin-before: 0;
  margin-block-start: 0;
}

.tablesort {
  vertical-align: middle;
}

.sticky-header {
  -webkit-border-after: 4px solid var(--ucla-blue);
  border-block-end: 4px solid var(--ucla-blue);
  margin: 0;
  z-index: 0;
}
