/* @group Tables */

/* @group Sorter */

.tablesorter-default .header,
.tablesorter-default .tablesorter-header {
  background-position: center right;
  background-repeat: no-repeat;
  background-size: 8px 4px;
  cursor: pointer;
}

.tablesorter-default thead .headerSortUp,
.tablesorter-default thead .tablesorter-headerSortUp,
.tablesorter-default thead .tablesorter-headerAsc {
  background-image: var(--icon-table-sort-up);
  border-block-end: var(--color-table-sort-border) 2px solid;
}

.tablesorter-default thead .headerSortDown,
.tablesorter-default thead .tablesorter-headerSortDown,
.tablesorter-default thead .tablesorter-headerDesc {
  background-image: var(--icon-table-sort-down);
  border-block-end: var(--color-table-sort-border) 2px solid;
}

.tablesorter-default thead .sorter-false {
  background-image: none;
  cursor: default;
}

/* @end */

/* @group Shared */

th {
  font-weight: normal;
  font-style: normal;
}

td {
  min-width: 16px;
  vertical-align: middle;
}

table td.disabled {
  opacity: 0.5;
  filter: grayscale(100%);
  pointer-events: none;
}

table .centre {
  display: flex;
  flex-flow: row nowrap;
  place-content: stretch center;
  align-items: center;
}

table .right {
  text-align: end;
}

/* @end */

/* @group Main */

#main table .drag_handle {
  background-image: url("/assets/tables/controls/drag_handle-fcfce398.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: move;
  touch-action: none;
}

#main table a:not(.button) {
  color: var(--color-text);
}

#main table a:not(.button):hover {
  color: var(--color-accent-bright);
}

#main table th,
#main table td {
  padding: var(--ui-table-cell-block) var(--ui-table-cell-inline);
}

#main table tbody tr {
  border-block-start: 1px solid var(--color-border-subtle);
}

#main table th {
  font-family: var(--ui-font-family);
  font-weight: var(--ui-weight-medium);
  font-style: normal;
  text-align: start;
}

#main table input[type='checkbox'] {
  position: relative;
  width: 16px;
  height: 16px;
  margin: calc(var(--ui-space-unit) / 2) 0 0;
  padding: 0;
  background-color: var(--color-toolbar);
  border: 2px solid var(--color-text-muted);
  appearance: none;
}

#main table input[type='checkbox']:checked {
  background-image: url("/assets/forms/check_mark_9b9b9b-f345a458.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 8px;
}

#main table.full {
  width: 100%;
}

@media (width >= 0) and (width <= 767px) {
  #main table.responsive {
    width: 100%;
  }

  #main table.responsive thead {
    display: none;
  }

  #main table.responsive tbody tr {
    display: flex;
    flex-flow: row wrap;
    place-content: stretch center;
    align-items: center;
    padding-block-start: var(--ui-space-2);
    padding-block-end: var(--ui-space-3);
    text-align: center;
  }

  #main table.responsive tbody td.break {
    display: block;
    width: 100%;
    padding: 1px;
  }

  #main table.responsive td {
    padding: var(--ui-space-1);
  }

  #main table.responsive td:empty {
    display: none;
  }

  #main table.responsive td.drag_handle {
    display: block;
    box-sizing: border-box;
    padding-block-start: var(--ui-space-3);
    padding-block-end: var(--ui-space-3);
  }

  #main table.responsive td .icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
    background-size: 48px 48px;
  }

  #main table.responsive td.name {
    font-family: var(--ui-font-family);
    font-size: var(--ui-font-size-lead);
    font-weight: var(--ui-weight-medium);
  }

  #main table.responsive td .multiple_buttons {
    display: flex;
    flex-flow: row wrap;
    place-content: stretch center;
    align-items: center;
  }

  #main table.responsive td .button,
  #main table.responsive td .link {
    box-sizing: border-box;
    min-width: 100px;
    min-height: var(--ui-control-height);
    margin: var(--ui-space-1) 3px;
    padding-inline-end: var(--ui-space-2);
    padding-inline-start: var(--ui-space-2);
    font-family: var(--ui-font-family);
    font-size: var(--ui-font-size-small);
    font-weight: var(--ui-weight-medium);
    border-radius: var(--ui-radius-control);
  }

  #main table.responsive td .link {
    border: 1px solid var(--color-input-border);
    transition: color var(--ui-duration-feedback) var(--ui-ease-feedback), border-color var(--ui-duration-feedback) var(--ui-ease-feedback);
  }

  #main table.responsive td a.link {
    width: auto;
    overflow: visible;
    color: var(--color-text-muted);
    line-height: 16px;
    text-indent: 0;
    white-space: normal;
  }

  #main table.responsive td .link:hover,
  #main table.responsive td link:focus {
    box-shadow: none;
  }

  #main table.responsive td .link:active:hover {
    box-shadow: none;
  }

  #main table.responsive td a.link::before {
    padding-inline-end: var(--ui-space-1);
    font-size: var(--ui-font-size-small);
    transition: color var(--ui-duration-feedback) var(--ui-ease-feedback), border-color var(--ui-duration-feedback) var(--ui-ease-feedback);
  }

  #main table.responsive td a.link.negative,
  #main table.responsive td a.link.negative::before {
    color: var(--color-negative);
    border-color: var(--color-negative);
  }

  #main table.responsive td a.link.negative:hover {
    color: var(--color-negative-state-one);
    border-color: var(--color-negative);
  }

  #main table.responsive td .label::before {
    margin-inline-end: var(--ui-space-1);
    content: attr(data-label);
  }
}

@media (width >= 768px) {
  #main tbody tr:hover td {
    background-color: var(--color-toolbar-hover);
  }

  #main table.responsive th.break,
  #main table.responsive td.break {
    display: none;
  }

  #main table.responsive td .multiple_buttons {
    display: flex;
    flex-flow: column nowrap;
    place-content: stretch center;
    align-items: center;
  }

  #main table.responsive td .multiple_buttons .button {
    margin: 0 0 var(--ui-space-1);
  }

  #main table th.stretch {
    width: 100%;
  }

  table .link.negative:hover::before {
    color: var(--color-negative);
  }
}

/* @end */

/* @group Icons */

/* @group Font Icons */

/* An icon link in a table cell: its glyph is the link's only box. Its name
   is a block_visually_hidden span with the same words as its title (RULES
   §6, symbol-only controls). */
table .link {
  position: relative;
  display: flex;
  flex-flow: row nowrap;
  place-content: stretch center;
  align-items: center;
}

table .link::before {
  display: flex;
  flex-flow: row nowrap;
  place-content: stretch center;
  align-items: center;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  font: var(--ui-icon-weight) var(--ui-font-size-control) var(--ui-icon-font-family);
}

table .delete::before {
  content: var(--ui-icon-trash-can);
}

/* @end */

/* @group Image Icons */

table .icon {
  width: 16px;
  height: 16px;
  background-size: 16px;
}

table .icon.large {
  width: 32px;
  height: 32px;
  background-size: 32px;
}

.blog_post {
  background-image: url("/assets/tables/icons/blog_post-a1825ecf.svg");
}

.image_credit_icon {
  background-image: url("/assets/tables/icons/image_credit-945fd3f0.svg");
}

.image_source_icon {
  background-image: url("/assets/tables/icons/image_source-478bc404.svg");
}

.data_attribute_icon {
  background-image: url("/assets/tables/icons/data_attribute_icon-bead22ac.svg");
}

.code_fragment_icon {
  background-image: url("/assets/tables/icons/code_fragment_icon-ee56a7ef.svg");
}

.form_element {
  background-image: url("/assets/tables/icons/form_element-93b7200c.svg");
}

.pdf {
  background-image: url("/assets/tables/icons/pdf-c07a94fd.svg");
}

.png {
  background-image: url("/assets/tables/icons/png-869392e3.svg");
}

.tiff {
  background-image: url("/assets/tables/icons/tiff-616c23bf.svg");
}

.gif {
  background-image: url("/assets/tables/icons/gif-6ad1772a.svg");
}

.jpeg {
  background-image: url("/assets/tables/icons/jpeg-dc97b987.svg");
}

.mp4 {
  background-image: url("/assets/tables/icons/jpeg-dc97b987.svg");
}

.website_order {
  background-image: url("/assets/tables/icons/order-6593f0f1.svg");
}

.style_sheet_override_icon {
  background-image: url("/assets/tables/icons/style_sheet_override-ff84b1f2.svg");
}

.unknown {
  background-image: url("/assets/tables/icons/unknown-7f4c7cfd.svg");
}

.zip {
  background-image: url("/assets/tables/icons/zip-ae0fac48.svg");
}

/* @end */

/* @group Statuses */

table .valid,
table .invalid {
  display: block;
  width: 16px;
  height: 16px;
  margin-inline-end: auto;
  margin-inline-start: auto;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
  background-repeat: no-repeat;
}

table .valid {
  background-image: url("/assets/tables/status/valid-7cfc36b6.svg");
}

table .invalid {
  background-image: url("/assets/tables/status/invalid-35897382.svg");
}

/* @end */

/* @group Table Filter */

.table_filter_bar {
  display: flex;
  flex-flow: row wrap;
  place-content: stretch flex-start;
  align-items: center;
  gap: var(--ui-space-2);
  padding: var(--ui-space-2) 0 var(--ui-space-3);
}

.table_filter_bar select {
  max-width: 200px;
  margin: 0;
}

.table_filter_bar input[type='search'] {
  max-width: 160px;
  margin: 0;
}

.table_filter_count {
  margin-inline-start: auto;
  color: var(--color-text-muted);
  font-size: var(--ui-font-size-caption);
  font-variant-numeric: tabular-nums;
}

/* @end */

/* @end */

/* @end */

@media (any-pointer: coarse) {
  #main table.responsive td .button,
  #main table.responsive td .link,
  #panels table .link,
  #panels table .open {
    min-width: var(--ui-touch-target);
    min-height: var(--ui-touch-target);
  }
}

/* A filtered table holds the column widths it had with every row shown, so
   changing a filter moves no column. user_interface/tables/table_filter.js
   sets data-columns-held and the header shares. */
table[data-columns-held] {
  table-layout: fixed;
}

table[data-columns-held] > thead > tr > th {
  box-sizing: border-box;
  width: var(--column-share, auto);
}

/* Each filter select is as wide as its longest choice, whichever it shows. */
.table_filter_bar select {
  min-width: var(--filter-choice-width, 0);
}
