/* =====================================================
   FILE: nui-table-utils.css
   VERSION: 202603300005

   SĀKUMA KOMENTĀRI:
   - Šis fails satur NUI tabulu utility klases.
   - Šeit ir kolonu lomas, align, wrap/no-wrap, truncate,
     cell layout, thumbs, links, teksti, badge un action klases.
   - Šis fails nevada tabulas kopējo izskatu; tas dzīvo nui-tables.css.
   - LRF tabulām kolonu platumi tiek definēti atsevišķi zem .lrf-table,
     jo CF8 Table view ģenerē savas noklusējuma klases un vajag precīzāku mērķēšanu.
   - Thumbnail / foto kolonnai ir atsevišķs platuma bloks zem .lrf-table.
===================================================== */

.nui.header.lrf-table-title {
  margin-bottom: -30px !important;
}


/* =====================================================
   LRF TABLE COLUMN WIDTHS
   mērķēts tieši uz CF8 tabulu ar class="lrf-table"
===================================================== */

table.lrf-table th.col-icon,
table.lrf-table td.col-icon {
  width: 44px !important;
  min-width: 44px !important;
}

table.lrf-table th.col-check,
table.lrf-table td.col-check {
  width: 48px !important;
  min-width: 48px !important;
}

table.lrf-table th.col-photo,
table.lrf-table td.col-photo {
  width: 86px !important;
  min-width: 86px !important;
}

table.lrf-table th.col-status,
table.lrf-table td.col-status {
  width: 72px !important;
  min-width: 72px !important;
}

table.lrf-table th.col-date,
table.lrf-table td.col-date {
  width: 90px !important;
  min-width: 90px !important;
  white-space: nowrap !important;
}

table.lrf-table th.col-year,
table.lrf-table td.col-year {
  width: 78px !important;
  min-width: 78px !important;
  white-space: nowrap !important;
}

table.lrf-table th.col-code,
table.lrf-table td.col-code {
  width: 132px !important;
  min-width: 132px !important;
  white-space: nowrap !important;
}

table.lrf-table th.col-number,
table.lrf-table td.col-number {
  width: 128px !important;
  min-width: 128px !important;
  white-space: nowrap !important;
}

table.lrf-table th.col-short,
table.lrf-table td.col-short {
  width: 120px !important;
  min-width: 120px !important;
}

table.lrf-table th.col-medium,
table.lrf-table td.col-medium {
  width: 180px !important;
  min-width: 180px !important;
}

table.lrf-table th.col-long,
table.lrf-table td.col-long {
  width: 260px !important;
  min-width: 260px !important;
}

table.lrf-table th.col-name,
table.lrf-table td.col-name {
  width: 140px !important;
  min-width: 140px !important;
}

table.lrf-table th.col-club,
table.lrf-table td.col-club {
  width: 180px !important;
  min-width: 180px !important;
}

table.lrf-table th.col-email,
table.lrf-table td.col-email {
  width: 220px !important;
  min-width: 220px !important;
}

table.lrf-table th.col-actions,
table.lrf-table td.col-actions {
  width: 120px !important;
  min-width: 120px !important;
}

table.lrf-table th.col-actions-tight,
table.lrf-table td.col-actions-tight {
  width: 64px !important;
  min-width: 64px !important;
  white-space: nowrap !important;
}

table.lrf-table th.col-actions-wide,
table.lrf-table td.col-actions-wide {
  width: 160px !important;
  min-width: 160px !important;
}

table.lrf-table th.col-grow,
table.lrf-table td.col-grow {
  width: auto !important;
}


/* =====================================================
   COLUMN ROLE CLASSES
   vispārīgās utility klases
===================================================== */

.nui.table .col-icon {
  width: 1%;
  min-width: 40px;
}

.nui.table .col-check {
  width: 1%;
  min-width: 44px;
}

.nui.table .col-photo {
  width: 1%;
  min-width: 82px;
}

.nui.table .col-status {
  width: 1%;
  min-width: 96px;
}

.nui.table .col-date {
  width: 1%;
  min-width: 108px;
}

.nui.table .col-year {
  width: 1%;
  min-width: 72px;
}

.nui.table .col-code {
  width: 1%;
  min-width: 120px;
}

.nui.table .col-number {
  width: 1%;
  min-width: 96px;
}

.nui.table .col-short {
  min-width: 120px;
}

.nui.table .col-medium {
  min-width: 180px;
}

.nui.table .col-long {
  min-width: 260px;
}

.nui.table .col-name {
  min-width: 180px;
}

.nui.table .col-club {
  min-width: 180px;
}

.nui.table .col-email {
  min-width: 220px;
}

.nui.table .col-actions {
  width: 1%;
  min-width: 120px;
}

.nui.table .col-actions-tight {
  width: 1%;
  min-width: 84px;
}

.nui.table .col-actions-wide {
  width: 1%;
  min-width: 160px;
}

.nui.table .col-grow {
  width: 99%;
}


/* =====================================================
   TEXT ALIGN / VERTICAL ALIGN UTILITIES
===================================================== */

.nui.table .is-left,
.nui.table th.is-left,
.nui.table td.is-left {
  text-align: left !important;
}

.nui.table .is-center,
.nui.table th.is-center,
.nui.table td.is-center {
  text-align: center !important;
}

.nui.table .is-right,
.nui.table th.is-right,
.nui.table td.is-right {
  text-align: right !important;
}

.nui.table .is-top,
.nui.table th.is-top,
.nui.table td.is-top {
  vertical-align: top !important;
}

.nui.table .is-middle,
.nui.table th.is-middle,
.nui.table td.is-middle {
  vertical-align: middle !important;
}

.nui.table .is-bottom,
.nui.table th.is-bottom,
.nui.table td.is-bottom {
  vertical-align: bottom !important;
}


/* =====================================================
   TEXT WRAP / OVERFLOW UTILITIES
===================================================== */

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

.nui.table .is-wrap,
.nui.table th.is-wrap,
.nui.table td.is-wrap {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}

.nui.table .is-break,
.nui.table th.is-break,
.nui.table td.is-break {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nui.table .is-truncate,
.nui.table th.is-truncate,
.nui.table td.is-truncate {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.nui.table .is-ellipsis,
.nui.table th.is-ellipsis,
.nui.table td.is-ellipsis {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.nui.table .is-multiline,
.nui.table th.is-multiline,
.nui.table td.is-multiline {
  white-space: normal !important;
  line-height: 1.3;
}

.nui.table .is-2line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nui.table .is-3line {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* =====================================================
   CELL LAYOUT UTILITIES
===================================================== */

.nui-cell-flex {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nui-cell-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nui-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.nui-cell-media {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nui-cell-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.nui-gap-xs {
  gap: 4px !important;
}

.nui-gap-sm {
  gap: 8px !important;
}

.nui-gap-md {
  gap: 12px !important;
}


/* =====================================================
   IMAGE / THUMB UTILITIES
===================================================== */

.nui-thumb {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #f3f4f6;
  flex: 0 0 auto;
}

.nui-thumb-photo {
  width: 44px;
  height: 66px;
  border-radius: 6px;
}

.nui-thumb-square {
  width: 44px;
  height: 44px;
}

.nui-thumb-round {
  border-radius: 999px;
}


/* =====================================================
   LINK UTILITIES
===================================================== */

.nui-link {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}

.nui-link:hover {
  color: var(--logo-red, #c8102e);
  text-decoration: none;
}

.nui-link-muted {
  color: rgba(0, 0, 0, .64);
}

.nui-link-muted:hover {
  color: var(--logo-red, #c8102e);
}

.nui-link-strong {
  font-weight: 600;
}

.nui-link-external {
  white-space: nowrap;
}


/* =====================================================
   TEXT UTILITIES
===================================================== */

.nui-text-main {
  color: rgba(0, 0, 0, .84);
}

.nui-text-muted {
  color: rgba(0, 0, 0, .56);
}

.nui-text-small {
  font-size: 12px;
  line-height: 1.3;
}

.nui-text-strong {
  font-weight: 600;
}


/* =====================================================
   BADGE / STATUS UTILITIES
===================================================== */

.nui-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  white-space: nowrap;
  background: #eef0f3;
  color: #222;
}

.nui-badge-success {
  background: #dcfce7;
  color: #166534;
}

.nui-badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.nui-badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.nui-badge-neutral {
  background: #eef0f3;
  color: #374151;
}


/* =====================================================
   ACTION UTILITIES
===================================================== */

.nui-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nui-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nui-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.nui-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nui-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
}

.nui-action-button {
  min-height: 34px;
}

.nui-action-save {
  white-space: nowrap;
}

.nui-action-danger {
  white-space: nowrap;
}


/* =====================================================
   MOBILE / SMALL SCREEN UTILITY ADJUSTMENTS
===================================================== */

@media (max-width: 900px) {
  table.lrf-table th.col-photo,
  table.lrf-table td.col-photo {
    width: 74px !important;
    min-width: 74px !important;
  }

  table.lrf-table th.col-name,
  table.lrf-table td.col-name,
  table.lrf-table th.col-club,
  table.lrf-table td.col-club,
  table.lrf-table th.col-medium,
  table.lrf-table td.col-medium {
    min-width: 160px !important;
  }

  table.lrf-table th.col-long,
  table.lrf-table td.col-long,
  table.lrf-table th.col-email,
  table.lrf-table td.col-email {
    min-width: 220px !important;
  }

  table.lrf-table th.col-actions,
  table.lrf-table td.col-actions {
    min-width: 110px !important;
  }

  .nui.table .col-photo {
    min-width: 72px;
  }

  .nui.table .col-name,
  .nui.table .col-club,
  .nui.table .col-medium {
    min-width: 160px;
  }

  .nui.table .col-long,
  .nui.table .col-email {
    min-width: 220px;
  }

  .nui.table .col-actions {
    min-width: 110px;
  }

  .nui.table .is-wrap,
  .nui.table .is-break,
  .nui.table .is-multiline {
    white-space: normal !important;
  }
}


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

@media (min-width: 1500px) {
  .nui.table .is-nowrap,
  .nui.table th.is-nowrap,
  .nui.table td.is-nowrap,
  .nui.table .is-truncate,
  .nui.table th.is-truncate,
  .nui.table td.is-truncate,
  .nui.table .is-ellipsis,
  .nui.table th.is-ellipsis,
  .nui.table td.is-ellipsis {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .nui.table .col-long,
  .nui.table .col-email,
  .nui.table .col-name,
  .nui.table .col-club,
  .nui.table .col-medium,
  .nui.table .col-code {
    min-width: 0 !important;
  }
}