/* Zularich tables — FC Partners / LWFA layout, primary (#ad7f00) tokens */

.content-wrapper .zp-table-card,
.content-wrapper .card:has(.table),
.content-wrapper .card:has(.dataTables_wrapper) {
  min-width: 0;
  max-width: 100%;
}

.content-wrapper .zp-table-card .card-body,
.content-wrapper .card:has(.table) .card-body,
.content-wrapper .card:has(.dataTables_wrapper) .card-body {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.content-wrapper .card-outline {
  border-top: 3px solid var(--zp-primary, #ad7f00) !important;
}

.content-wrapper .card:has(.table),
.content-wrapper .card:has(.dataTables_wrapper) {
  border-top: 3px solid var(--zp-primary, #ad7f00);
}

.content-wrapper .card-header,
.content-wrapper .card-footer {
  background: transparent !important;
  border-color: var(--zp-outline-variant, #ddd5c4) !important;
  color: var(--zp-on-surface, #1f1a12);
}

.content-wrapper .card-header {
  padding: 1rem 1.25rem;
}

.content-wrapper .card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.content-wrapper .card-body > .table,
.content-wrapper .card-body > .table-responsive,
.content-wrapper .card-body > .dataTables_wrapper {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
}

.content-wrapper .card-body > .table-responsive > .table,
.content-wrapper .card-body > .dataTables_wrapper .table,
.content-wrapper .card-body > .dataTables_wrapper table.dataTable {
  margin-bottom: 0;
}

.content-wrapper .card-title {
  font-family: var(--zp-font-headline, "Sora", "Segoe UI", sans-serif);
  font-weight: 700;
  color: var(--zp-on-surface, #1f1a12) !important;
}

/* —— LWFA-style tables —— */
.content-wrapper .table {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  margin-bottom: 0;
  color: var(--zp-on-surface, #1f1a12);
  font-size: 0.875rem;
  font-family: var(--zp-font-body, "Inter", "Segoe UI", sans-serif);
  background: transparent;
  border-collapse: collapse;
}

.content-wrapper table.dataTable {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: auto !important;
}

.content-wrapper .table thead th,
.content-wrapper table.dataTable thead th,
.content-wrapper table.dataTable thead td {
  background: var(--zp-soft-bg, #faf8f2) !important;
  color: var(--zp-on-surface-variant, #6b6254) !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  border: 0 !important;
  border-bottom: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
  padding: 0.85rem 1rem !important;
  vertical-align: middle;
  white-space: nowrap;
  overflow: visible;
}

.content-wrapper table.dataTable thead > tr > th.sorting,
.content-wrapper table.dataTable thead > tr > th.sorting_asc,
.content-wrapper table.dataTable thead > tr > th.sorting_desc,
.content-wrapper table.dataTable thead > tr > th.sorting_asc_disabled,
.content-wrapper table.dataTable thead > tr > th.sorting_desc_disabled {
  padding-right: 1.85rem !important;
}

.content-wrapper .table td,
.content-wrapper .table th,
.content-wrapper table.dataTable td,
.content-wrapper table.dataTable th {
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--zp-outline-variant, #ddd5c4) 60%, transparent) !important;
  padding: 0.85rem 1rem !important;
  vertical-align: middle;
  background: transparent !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.content-wrapper .table tbody tr:last-child > *,
.content-wrapper table.dataTable tbody tr:last-child > * {
  border-bottom: 0 !important;
}

.content-wrapper .table-bordered,
.content-wrapper .table-bordered td,
.content-wrapper .table-bordered th {
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--zp-outline-variant, #ddd5c4) 60%, transparent) !important;
}

.content-wrapper .table-bordered thead th,
.content-wrapper .table-bordered thead td {
  border-bottom: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
}

.content-wrapper .table-striped tbody tr:nth-of-type(odd),
.content-wrapper .table-hover tbody tr:hover,
.content-wrapper table.dataTable tbody tr,
.content-wrapper table.dataTable.stripe tbody tr.odd,
.content-wrapper table.dataTable.display tbody tr.odd,
.content-wrapper table.dataTable.hover tbody tr:hover,
.content-wrapper table.dataTable.display tbody tr:hover,
.content-wrapper table.dataTable.stripe tbody tr.even,
.content-wrapper table.dataTable.display tbody tr.even {
  background-color: transparent !important;
}

.content-wrapper .table tfoot th,
.content-wrapper .table tfoot td {
  background: var(--zp-soft-bg, #faf8f2) !important;
  border: 0 !important;
  border-top: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
  color: var(--zp-on-surface-variant, #6b6254);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.75rem 1rem !important;
}

.content-wrapper .table a:not(.btn) {
  color: var(--zp-primary, #ad7f00);
  font-weight: 600;
}

.content-wrapper .table a:not(.btn):hover {
  text-decoration: none;
  color: var(--zp-primary-deep, #7a5a00);
}

.content-wrapper .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}

.content-wrapper .card-body > .table {
  width: max-content !important;
  min-width: 100% !important;
}

.content-wrapper .table td.admin-table-entity {
  white-space: normal;
  word-break: break-word;
  min-width: 10rem;
  max-width: 20rem;
}

.content-wrapper .table td.admin-table-actions,
.content-wrapper .table th.admin-table-actions {
  white-space: nowrap;
  width: 1%;
  text-align: right;
}

.content-wrapper .table td.admin-table-actions .btn + .btn {
  margin-left: 0.25rem;
}

.content-wrapper .admin-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.content-wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
.content-wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
  border: 0;
  background: var(--zp-primary, #ad7f00);
  box-shadow: none;
}

.content-wrapper table.dataTable > tbody > tr.child ul.dtr-details {
  width: 100%;
}

.content-wrapper table.dataTable > tbody > tr.child span.dtr-title {
  min-width: 7rem;
  color: var(--zp-on-surface-variant, #6b6254);
}

.content-wrapper .card:has(.table),
.content-wrapper .card:has(.dataTables_wrapper) {
  overflow: hidden;
}

.content-wrapper .dataTables_wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  color: var(--zp-on-surface-variant, #6b6254);
  font-size: 0.875rem;
  font-family: var(--zp-font-body, "Inter", "Segoe UI", sans-serif);
}

.content-wrapper .dataTables_wrapper .row {
  min-width: 0;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.content-wrapper .dataTables_wrapper .row > [class*="col-"] {
  min-width: 0;
  max-width: 100%;
}

.content-wrapper .dataTables_wrapper .row > .col-sm-12 {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
}

.content-wrapper .dataTables_wrapper .dataTables_scroll {
  width: 100% !important;
}

.content-wrapper .dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.content-wrapper .dataTables_wrapper .dataTables_scrollHead,
.content-wrapper .dataTables_wrapper .dataTables_scrollFoot {
  overflow: hidden !important;
  width: 100% !important;
}

.content-wrapper table.dataTable thead .sorting:before,
.content-wrapper table.dataTable thead .sorting:after,
.content-wrapper table.dataTable thead .sorting_asc:before,
.content-wrapper table.dataTable thead .sorting_asc:after,
.content-wrapper table.dataTable thead .sorting_desc:before,
.content-wrapper table.dataTable thead .sorting_desc:after,
.content-wrapper table.dataTable thead .sorting_asc_disabled:before,
.content-wrapper table.dataTable thead .sorting_asc_disabled:after,
.content-wrapper table.dataTable thead .sorting_desc_disabled:before,
.content-wrapper table.dataTable thead .sorting_desc_disabled:after {
  opacity: 0.35;
  bottom: 0.9em !important;
}

/* DataTables chrome */
.content-wrapper .dataTables_wrapper .dataTables_length,
.content-wrapper .dataTables_wrapper .dataTables_filter,
.content-wrapper .dataTables_wrapper .dataTables_info,
.content-wrapper .dataTables_wrapper .dataTables_paginate {
  padding: 0.85rem 1.25rem;
  color: var(--zp-on-surface-variant, #6b6254) !important;
}

.content-wrapper .dataTables_wrapper .dataTables_filter label,
.content-wrapper .dataTables_wrapper .dataTables_length label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 500;
  font-size: 0.84rem;
  color: var(--zp-on-surface-variant, #6b6254);
}

.content-wrapper .dataTables_wrapper .dataTables_filter input,
.content-wrapper .dataTables_wrapper .dataTables_length select {
  background: var(--zp-surface, #fff) !important;
  color: var(--zp-on-surface, #1f1a12) !important;
  border: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
  border-radius: 0.65rem !important;
  padding: 0.4rem 0.75rem !important;
  margin-left: 0.35rem;
  min-height: 2.25rem;
  box-shadow: none !important;
}

.content-wrapper .dataTables_wrapper .dataTables_filter input:focus,
.content-wrapper .dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--zp-primary, #ad7f00) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--zp-primary, #ad7f00) 22%, transparent) !important;
  outline: 0;
}

.content-wrapper .dataTables_wrapper .dt-buttons {
  padding: 0.85rem 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.content-wrapper .dataTables_wrapper .dt-buttons .btn {
  border-radius: 0.65rem !important;
  border: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
  background: var(--zp-surface, #fff) !important;
  color: var(--zp-on-surface, #1f1a12) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.4rem 0.75rem !important;
  box-shadow: none !important;
}

.content-wrapper .dataTables_wrapper .dt-buttons .btn:hover {
  background: var(--zp-surface-low, #f5f1e8) !important;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate {
  padding-bottom: 1.1rem;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button,
.content-wrapper .page-link {
  color: var(--zp-on-surface, #1f1a12) !important;
  background: var(--zp-surface, #fff) !important;
  border: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
  border-radius: 0.55rem !important;
  margin: 0 0.15rem;
  padding: 0.35rem 0.7rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.content-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.content-wrapper .page-item.active .page-link {
  background: var(--zp-primary, #ad7f00) !important;
  border-color: var(--zp-primary, #ad7f00) !important;
  color: #fff !important;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled),
.content-wrapper .page-link:hover {
  background: var(--zp-surface-low, #f5f1e8) !important;
  color: var(--zp-on-surface, #1f1a12) !important;
  border-color: var(--zp-outline-variant, #ddd5c4) !important;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.content-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.content-wrapper .page-item.disabled .page-link {
  opacity: 0.45;
  background: var(--zp-surface, #fff) !important;
  color: var(--zp-on-surface-variant, #6b6254) !important;
}

.content-wrapper .dataTables_wrapper .dataTables_processing {
  background: var(--zp-surface, #fff) !important;
  border: 1px solid var(--zp-outline-variant, #ddd5c4) !important;
  border-radius: 0.75rem !important;
  color: var(--zp-on-surface-variant, #6b6254) !important;
  box-shadow: none !important;
}

@media (max-width: 575.98px) {
  .content-wrapper .dataTables_wrapper .dt-buttons,
  .content-wrapper .dataTables_wrapper .dataTables_filter {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .content-wrapper .dataTables_wrapper .dataTables_filter label {
    width: 100%;
  }

  .content-wrapper .dataTables_wrapper .dataTables_filter input {
    flex: 1;
    width: 100% !important;
    margin-left: 0 !important;
  }
}
