/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Claro styles for Tables.
 */

table {
  width: 100%;
  margin-block: var(--space-l);
  border-collapse: collapse;
}

.sticky-header {
  min-width: 0;
}

caption {
  text-align: start;
}

th {
  position: relative;
  box-sizing: border-box;
  height: var(--space-xl);
  padding: var(--space-xs) var(--space-m);
  text-align: start;
  color: var(--color-text);
  background: var(--color-gray-050);
  line-height: 1.25rem; /* 20px */
}

/* The actual sort link. */

.sortable-heading {
  padding: 0 var(--space-m);
}

.sortable-heading > a {
  display: block;
  padding-block: var(--space-xs);
  padding-inline: 0 1.5rem;
  -webkit-text-decoration: none;
  text-decoration: none;
  color: inherit;
}

.sortable-heading > a:focus,
.sortable-heading > a:hover {
  -webkit-text-decoration: none;
  text-decoration: none;
}

.sortable-heading > a:focus::before,
.sortable-heading > a:hover::before {
  border-color: inherit;
}

.sortable-heading > a:focus::after,
.sortable-heading > a:hover::after {
  opacity: 1;
}

.sortable-heading > a::before {
  position: absolute;
  z-index: 0;
  inset-block-start: 0;
  inset-inline-end: 1rem;
  inset-block-end: 0;
  inset-inline-start: 1rem;
  display: block;
  content: "";
  border-bottom: 0.125rem solid transparent;
}

.sortable-heading > a::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 1rem;
  width: 0.875rem;
  height: 1rem;
  margin-block-start: -0.5rem;
  content: "";
  opacity: 0.5;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  background-size: contain;
}

[dir="rtl"] :is(.sortable-heading > a::after) {
  /* Horizontally flip the element. */
  transform: scaleX(-1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e");
}

@media (forced-colors: active) {
  [dir="rtl"] :is(.sortable-heading > a::after) {
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  }
}

@media (forced-colors: active) {
  .sortable-heading > a::after {
    opacity: 1;
    background: linktext;
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  }
}

.sortable-heading.is-active > a {
  color: var(--color-absolutezero);
}

.sortable-heading.is-active > a::before {
  border-bottom: 0.1875rem solid var(--color-absolutezero);
}

.sortable-heading.is-active > a::after {
  content: none;
}

tr {
  border-bottom: 0.0625rem solid var(--color-gray-200);
}

tr:hover,
tr:focus-within {
  color: var(--color-text);
  background: var(--color-bgblue-hover);
}

tr.color-warning:hover,
tr.color-warning:focus {
  color: var(--color-text);
  background: #fdf8ed;
}

tr.color-error:hover,
tr.color-error:focus {
  color: var(--color-text);
  background: #fcf4f2;
}

tr,
.draggable-table.tabledrag-disabled tr {
  color: var(--color-text);
  background: var(--color-white);
}

thead tr {
  border: 0;
}

td {
  box-sizing: border-box;
  height: 4rem;
  padding: var(--space-xs) var(--space-m);
  text-align: start;
}

td .item-list ul {
  margin: 0;
}

td.is-active {
  background: none;
}

/**
 * Target every .form-element input that parent is a form-item of a table cell.
 * This ignores the filter format select of the textarea editor.
 */

td > .form-item {
  display: flex;
  align-items: center;
}

td > .form-item > .form-item__prefix {
  margin-inline-end: var(--space-xs);
  white-space: nowrap;
}

td > .form-item > .form-item__suffix {
  margin-inline-start: var(--space-xs);
  white-space: nowrap;
}

td > .form-item > .form-element,
td > .ajax-new-content > .form-item > .form-element,
td > .form-item > .claro-autocomplete,
td > .form-item > .claro-autocomplete > .form-element,
td > .ajax-new-content > .form-item > .claro-autocomplete,
td > .ajax-new-content > .form-item > .claro-autocomplete > .form-element {
  width: 100%;
}

td > .form-item > .form-element--type-select,
td > .ajax-new-content > .form-item > .form-element--type-select {
  width: max-content;
  min-width: 100%;
}

/* Win over table-file-multiple-widget. */

th.is-disabled.is-disabled {
  color: var(--input--disabled-fg-color);
}

/* Force browsers to calculate the width of a 'select all' <th> element. */

th.select-all {
  width: 1px;
}

/**
 * Captions.
 */

.caption {
  margin-block-end: 1.25rem; /* 20px */
}

tfoot {
  font-weight: bold;
}

tfoot tr:last-child {
  border-bottom: 0;
}

tfoot tr:first-child td {
  border-top: 0.0625rem solid var(--color-gray-500);
}

/**
 * Responsive table cells.
 */

th.priority-low,
th.priority-medium,
td.priority-low,
td.priority-medium {
  display: none;
}

@media screen and (min-width: 38em) {
  th.priority-medium,
  td.priority-medium {
    display: table-cell;
  }
}

@media screen and (min-width: 60em) {
  th.priority-low,
  td.priority-low {
    display: table-cell;
  }
}

.tabledrag-toggle-weight-wrapper {
  margin-block-start: var(--space-l);
  line-height: calc(28rem / 16);
}

.tabledrag-toggle-weight-wrapper + table,
.tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  margin-block-start: 0;
}
