/* ==========================================================================
   DataTables overrides — NF-e e demais módulos WHMCS injetando UI via hook
   ClientAreaPageProductDetails. Cobre wrapper .nt-product-hook-output e
   tambem .nt-product-moduleclientarea para integracoes ModulesGarden.
   Usa tokens definidos em tokens.css.
   ========================================================================== */

.nt-product-hook-output .dataTables_wrapper,
.nt-product-moduleclientarea .dataTables_wrapper {
  background: var(--card-translucent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-family: var(--font-body);
  color: var(--text-1);
}

.nt-product-hook-output .dataTables_length,
.nt-product-hook-output .dataTables_filter,
.nt-product-moduleclientarea .dataTables_length,
.nt-product-moduleclientarea .dataTables_filter {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: var(--space-3);
}

.nt-product-hook-output .dataTables_length select,
.nt-product-hook-output .dataTables_filter input,
.nt-product-moduleclientarea .dataTables_length select,
.nt-product-moduleclientarea .dataTables_filter input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  color: var(--text-1);
  font-size: var(--text-sm);
}

.nt-product-hook-output .dataTables_filter input:focus,
.nt-product-moduleclientarea .dataTables_filter input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.nt-product-hook-output table.dataTable,
.nt-product-moduleclientarea table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--text-1);
  margin-top: var(--space-3) !important;
  margin-bottom: var(--space-3) !important;
}

.nt-product-hook-output table.dataTable thead th,
.nt-product-moduleclientarea table.dataTable thead th {
  background: var(--surface) !important;
  background-image: none !important;
  color: var(--text-3) !important;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--space-3) var(--space-4) !important;
  border-bottom: 1px solid var(--border);
  text-shadow: none;
  text-align: left;
}

.nt-product-hook-output table.dataTable tbody td,
.nt-product-moduleclientarea table.dataTable tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  background: transparent;
}

.nt-product-hook-output table.dataTable tbody tr:hover td,
.nt-product-moduleclientarea table.dataTable tbody tr:hover td {
  background: var(--card-hover);
}

.nt-product-hook-output table.dataTable tbody tr.odd > *,
.nt-product-hook-output table.dataTable tbody tr.even > *,
.nt-product-moduleclientarea table.dataTable tbody tr.odd > *,
.nt-product-moduleclientarea table.dataTable tbody tr.even > * {
  background: transparent;
}

.nt-product-hook-output table.dataTable tbody tr:last-child td,
.nt-product-moduleclientarea table.dataTable tbody tr:last-child td {
  border-bottom: 0;
}

.nt-product-hook-output table.dataTable td.dataTables_empty,
.nt-product-moduleclientarea table.dataTable td.dataTables_empty {
  text-align: center;
  padding: var(--space-6);
  color: var(--text-3);
  font-style: italic;
  background: transparent !important;
}

.nt-product-hook-output .dataTables_info,
.nt-product-moduleclientarea .dataTables_info {
  font-size: var(--text-xs);
  color: var(--text-3);
  padding-top: var(--space-3);
}

.nt-product-hook-output .dataTables_paginate .paginate_button,
.nt-product-moduleclientarea .dataTables_paginate .paginate_button {
  padding: var(--space-1) var(--space-3) !important;
  margin: 0 2px !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text-2) !important;
  font-size: var(--text-sm);
}

.nt-product-hook-output .dataTables_paginate .paginate_button.current,
.nt-product-hook-output .dataTables_paginate .paginate_button.current:hover,
.nt-product-moduleclientarea .dataTables_paginate .paginate_button.current,
.nt-product-moduleclientarea .dataTables_paginate .paginate_button.current:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.nt-product-hook-output .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
.nt-product-moduleclientarea .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: var(--card-hover) !important;
  color: var(--text-1) !important;
}

.nt-product-hook-output .dataTables_paginate .paginate_button.disabled,
.nt-product-moduleclientarea .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 640px) {
  .nt-product-hook-output .dataTables_wrapper,
  .nt-product-moduleclientarea .dataTables_wrapper {
    padding: var(--space-3);
  }
  .nt-product-hook-output .dataTables_length,
  .nt-product-hook-output .dataTables_filter,
  .nt-product-moduleclientarea .dataTables_length,
  .nt-product-moduleclientarea .dataTables_filter {
    float: none;
    text-align: left;
    width: 100%;
  }
  .nt-product-hook-output .dataTables_filter input,
  .nt-product-moduleclientarea .dataTables_filter input {
    width: 100%;
    box-sizing: border-box;
  }
  .nt-product-hook-output table.dataTable thead th,
  .nt-product-hook-output table.dataTable tbody td,
  .nt-product-moduleclientarea table.dataTable thead th,
  .nt-product-moduleclientarea table.dataTable tbody td {
    padding: var(--space-2) var(--space-3) !important;
  }
}
