/* Jedan okvir za sve sadržajne tabele. Tokeni --ink/--bg/--btn-* dolaze
   iz statičkih strana; ispod 820 px sajt prelazi na tamnu paletu. */
.tablewrap,
.table-scroll,
.overflow-x-auto:has(> table) {
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid color-mix(in srgb, var(--ink, #1a1a1a) 22%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg, #e2dcd5) 90%, var(--ink, #1a1a1a) 10%);
  box-sizing: border-box;
}

body table {
  width: max(100%, max-content);
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14.5px;
  line-height: 1.45;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.tablewrap > table,
.table-scroll > table,
.overflow-x-auto > table {
  min-width: 100%;
}

body table caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
  padding: 14px 16px 4px;
}

body table thead th {
  background: var(--btn-bg, #1a1a1a) !important;
  color: var(--btn-ink, #e2dcd5) !important;
  text-align: left;
  text-transform: uppercase;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid transparent !important;
  vertical-align: bottom;
  white-space: normal;
}

body table tbody th,
body table td {
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14.5px !important;
  font-weight: 450;
  color: inherit !important;
  background: transparent;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--ink, #1a1a1a) 12%, transparent) !important;
  vertical-align: top;
}

body table tbody th {
  font-weight: 700;
}

body table tbody tr:nth-child(even) > th,
body table tbody tr:nth-child(even) > td {
  background: color-mix(in srgb, var(--ink, #1a1a1a) 5%, transparent);
}

body table tbody tr:last-child > th,
body table tbody tr:last-child > td {
  border-bottom: 0 !important;
}

body table.cene th:not(:first-child),
body table.cene td:not(:first-child) {
  text-align: right;
}

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

@media (max-width: 820px) {
  .tablewrap,
  .table-scroll,
  .overflow-x-auto:has(> table) {
    border-color: rgba(245, 245, 245, 0.22);
    background: #141414;
  }

  body table thead th {
    background: #f5f5f5 !important;
    color: #0a0a0a !important;
  }

  body table tbody th,
  body table td {
    border-bottom-color: rgba(245, 245, 245, 0.12) !important;
  }

  body table tbody tr:nth-child(even) > th,
  body table tbody tr:nth-child(even) > td {
    background: rgba(245, 245, 245, 0.06);
  }
}
