/* The one stylesheet of the list standard (docs/LIST_STANDARD.md): a table with class `std-list`
   never scrolls sideways, has fixed column widths by data type, constant row height, and keeps the
   Action column last. Lists add no table CSS of their own. */
.std-list-wrap {
  overflow-x: hidden;
  min-height: 340px;
}
table.records-table.std-list {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.std-list th,
.std-list td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
  vertical-align: middle;
}
.std-list th {
  height: 40px;
}
.std-list td {
  height: 48px;
}
.std-list.two-line td {
  height: 60px;
}
.std-list small {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* column widths are set by listStandard.js from the content of each column */
.std-list th.c-money,
.std-list td.c-money,
.std-list th.c-count,
.std-list td.c-count,
.std-list th.c-action,
.std-list td.c-action {
  text-align: right;
}
.std-list td.c-status .badge,
.std-list td.c-status > * {
  vertical-align: middle;
}
/* the Action column is always last */
.std-list td.c-action .pdf-button,
.std-list td.c-action .icon-button {
  margin-left: auto;
}
/* low-priority columns give way instead of scrolling */
@media (max-width: 1320px) {
  .std-list .lp {
    display: none;
  }
}
@media (max-width: 760px) {
  .std-list .lp2 {
    display: none;
  }
}

.std-list th.c-action,
.std-list td.c-action {
  text-align: right;
}
.std-list-wrap.table-scroll {
  overflow-x: hidden;
}
.std-list td.c-action,
.std-list td.nowrap {
  white-space: normal;
}
.std-list td.c-action .compact,
.std-list td.nowrap .compact {
  margin: 2px 0 2px 4px;
}

/* Action buttons: small, short text, background by kind of operation */
.std-list td .act {
  display: flex;
  width: fit-content;
  margin: 3px 0 3px auto;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-height: 0;
  min-width: 76px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}
.std-list td .act-neutral {
  background: var(--brand-100);
  border-color: var(--brand-200);
  color: var(--brand-700);
}
.std-list td .act-neutral:hover {
  background: var(--brand-200);
}
.std-list td .act-ok {
  background: #e6f4ec;
  border-color: #bfe0cd;
  color: #17703f;
}
.std-list td .act-ok:hover {
  background: #d3ecdf;
}
.std-list td .act-danger {
  background: #fbe9e7;
  border-color: #f0c9c5;
  color: #a3302b;
}
.std-list td .act-danger:hover {
  background: #f6d5d2;
}
.std-list td .act:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Reset keeps its place when it is not needed, so the filters never move (docs/LIST_STANDARD.md §2) */
.lk-toolbar .lk-reset {
  min-width: 48px;
  text-align: center;
}
.lk-toolbar .lk-reset[hidden] {
  display: inline-block !important;
  visibility: hidden;
}

/* Status bar in a card header: joined buttons with their counts (the always-visible status filter) */
.seg-bar {
  display: inline-flex;
  border: 1px solid var(--brand-200);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.seg-bar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.seg-bar button + button {
  border-left: 1px solid var(--brand-200);
}
.seg-bar button:hover {
  background: var(--brand-50);
}
.seg-bar button.selected {
  background: var(--brand-100);
  color: var(--brand-800);
  font-weight: 650;
}
.seg-bar button b {
  font-weight: 650;
  font-size: 12px;
  color: var(--brand-600);
}

/* a card header with a title and a status bar: title, then the bar, the count at the far right */
.records-card-heading > .seg-bar {
  margin-left: auto;
}
.heading-sep {
  width: 1px;
  height: 24px;
  margin: 0 14px;
  background: var(--brand-200);
  flex: none;
}

/* the right side of a list's card header: status bar, a thin line, the row count, CSV and Help */
.heading-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}
.heading-right > .seg-bar {
  margin-left: 0;
}
.heading-right #record-count,
.heading-right .records-scope {
  margin: 0;
  white-space: nowrap;
}
.heading-right .help-button {
  margin-left: 0;
}
.std-list td .act + .act {
  margin-top: 4px;
}
.std-list td .act-view {
  background: #f1f1f6;
  border-color: #dcdce8;
  color: #44446f;
}
.std-list td .act-view:hover {
  background: #e6e6ef;
}
.std-list td .act-edit {
  background: #e4edfb;
  border-color: #c2d6f3;
  color: #1f4f99;
}
.std-list td .act-edit:hover {
  background: #d5e3f8;
}

/* icon-only action buttons (View, Edit, Delete, Save, Accept, Reject): side by side, tooltip carries the word */
.std-list td .act.act-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  margin: 2px 0 2px 6px;
}
.std-list td .act.act-icon svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.std-list td .act.act-icon + .act {
  margin-top: 2px;
}

/* The pager of a list that is paged in the browser. */
.auto-pager:empty {
  display: none;
}
.auto-pager .pager {
  padding: 12px 22px;
}
