/* =====================================================
   FILE: nui-tables.css
   VERSION: 202603281545

   SĀKUMA KOMENTĀRI:
   - Šis fails satur NUI paginatoru, tabulu wrapperus, sticky header,
     tabulu kopējo vizuālo stilu un mobilās/lielo ekrānu uzvedību.
   - Šeit NAV utility klašu kolonnām, tekstam, bildēm, badge un actions.
   - Tās dzīvo atsevišķā failā nui-table-utils.css.
   - Tabula vienmēr paliek komponenta/konteinera platumā un mobilajā
     nekolapsojas kartītēs.
   - Ja saturs ir platāks, līdz 1499px scrollējas wrapperis, nevis pati lapa.
   - Pie 1500px un vairāk horizontālais scroll tabulai netiek lietots.
===================================================== */

/* =====================================================
   PAGINATOR
===================================================== */

.nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: 100%;
}

.nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start > a.item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 28px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, .55);
  text-decoration: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start > a.item:hover {
  color: #000;
  background: rgba(0, 0, 0, .04);
}

.nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start > a.item.active {
  color: #000;
  font-weight: 600;
  border-bottom: 2px solid var(--logo-red, #c8102e);
}

.nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start > a.item.active:hover {
  background: rgba(0, 0, 0, .04);
}

@media (max-width: 480px) {
  .nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start {
    gap: 4px;
    flex-wrap: wrap;
  }

  .nui.flex.basic.menu.bordered.rounded.divided.white.inline.self-start > a.item {
    min-width: 24px;
    height: 26px;
    font-size: 13px;
  }
}

/* =====================================================
   TABLE WRAPPER
===================================================== */

.nui-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nui-table-wrap > .nui.table {
  width: 100%;
  min-width: 100%;
}

/* Fallback, ja wrapper klase vēl nav uzlikta */
div:has(> table.nui.table) {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

div:has(> table.nui.table) > table.nui.table {
  width: 100%;
  min-width: 100%;
}

/* =====================================================
   TABLE BASE
===================================================== */

.nui.table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  background: #ffffff !important;
  border: 1px solid #cfd4dc !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  overflow: hidden;
}

.nui.table.celled,
.nui.table.bordered,
.nui.table.rounded {
  border: 1px solid #cfd4dc !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.nui.table th,
.nui.table td {
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

/* =====================================================
   STICKY HEADER
===================================================== */

.nui.table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  border: 0 !important;
  border-right: 1px solid #d1d5db !important;
  border-bottom: 4px solid #cfd4dc !important;
  vertical-align: middle;
  text-align: left;
  box-shadow: 0 1px 0 #cfd4dc;
}

.nui.table thead th:last-child {
  border-right: 0 !important;
}

/* =====================================================
   BODY CELLS
===================================================== */

.nui.table tbody td {
  padding: 20px 8px;
  color: rgba(0, 0, 0, .84);
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid #f2f2f2 !important;
  border-bottom: 3px solid #f2f2f2 !important;
  vertical-align: middle;
}

.nui.table tbody td:last-child {
  border-right: 0 !important;
}

.nui.table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* =====================================================
   STRIPED + HOVER + POINTER
===================================================== */

.nui.table tbody tr:nth-child(even) td {
  background: #fafafa !important;
}

.nui.table tbody tr {
  cursor: pointer;
  transition: background-color .12s ease;
}

.nui.table.selectable tbody tr:hover td,
.nui.table tbody tr:hover td {
  background: #f1f1f1 !important;
}

/* =====================================================
   MOBILE / SMALL SCREEN TABLE BEHAVIOUR
===================================================== */

@media (max-width: 900px) {
  .nui.table {
    display: table !important;
    width: 100%;
    min-width: 100%;
    max-width: none;
    overflow: visible !important;
  }

  .nui-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
  }

  .nui-table-wrap > .nui.table {
    width: max-content;
    min-width: 100%;
  }

  div:has(> table.nui.table) {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
  }

  div:has(> table.nui.table) > table.nui.table {
    width: max-content !important;
    min-width: 100% !important;
  }

  .nui.table th,
  .nui.table td {
    white-space: nowrap;
  }

  .nui.table thead th {
    font-size: 12px;
    padding: 6px 7px;
  }

  .nui.table tbody td {
    font-size: 13px;
    padding: 4px 7px;
  }
}

@media (max-width: 480px) {
  .nui.table.selectable tbody tr:hover td,
  .nui.table tbody tr:hover td {
    background: inherit !important;
  }

  .nui.table thead th {
    padding: 5px 6px;
  }

  .nui.table tbody td {
    padding: 3px 6px;
  }
}

/* =====================================================
   LARGE SCREEN FIX (NO HORIZONTAL SCROLL)
===================================================== */

@media (min-width: 1500px) {
  .nui-table-wrap {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .nui-table-wrap > .nui.table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  div:has(> table.nui.table) {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  div:has(> table.nui.table) > table.nui.table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  .nui.table th,
  .nui.table td {
    white-space: normal !important;
  }

  .nui.table thead th {
    padding: 10px 10px;
  }

  .nui.table tbody td {
    padding: 3px 8px;
  }
}