/* ==========================================================================
   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;
  }
}

/* ==========================================================================
   asaasnfmpay /modules/addons/asaasnfmpay/nfse.php — DataTables overrides
   Body class .nt-page-asaas-nfse set by ntweb_theme.php hook.
   ========================================================================== */
.nt-page-asaas-nfse .table-container { overflow-x: auto; }

.nt-page-asaas-nfse .dataTables_wrapper {
  font-family: var(--font-body);
  color: var(--text-1);
}

.nt-page-asaas-nfse .dataTables_length,
.nt-page-asaas-nfse .dataTables_filter {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: var(--space-3);
}

.nt-page-asaas-nfse .dataTables_length select,
.nt-page-asaas-nfse .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-page-asaas-nfse .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-page-asaas-nfse table.dataTable,
.nt-page-asaas-nfse table.table-list {
  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-page-asaas-nfse table.dataTable thead th,
.nt-page-asaas-nfse table.table-list 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-page-asaas-nfse table.dataTable tbody td,
.nt-page-asaas-nfse table.table-list tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  background: transparent;
}

.nt-page-asaas-nfse table.dataTable tbody tr:hover td,
.nt-page-asaas-nfse table.table-list tbody tr:hover td {
  background: var(--card-hover);
}

.nt-page-asaas-nfse table.dataTable tbody tr.odd > *,
.nt-page-asaas-nfse table.dataTable tbody tr.even > * { background: transparent; }

.nt-page-asaas-nfse table.dataTable tbody tr:last-child td,
.nt-page-asaas-nfse table.table-list tbody tr:last-child td { border-bottom: 0; }

.nt-page-asaas-nfse table.dataTable td.dataTables_empty {
  text-align: center;
  padding: var(--space-6);
  color: var(--text-3);
  font-style: italic;
  background: transparent !important;
}

.nt-page-asaas-nfse .dataTables_info {
  font-size: var(--text-xs);
  color: var(--text-3);
  padding-top: var(--space-3);
}

.nt-page-asaas-nfse .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-page-asaas-nfse .dataTables_paginate .paginate_button.current,
.nt-page-asaas-nfse .dataTables_paginate .paginate_button.current:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.nt-page-asaas-nfse .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: var(--card-hover) !important;
  color: var(--text-1) !important;
}

.nt-page-asaas-nfse .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Bootstrap btn shims escopados — addon usa .btn-success (PDF) + .btn-warning (XML) + .btn-md */
.nt-page-asaas-nfse .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.nt-page-asaas-nfse .btn-md { padding: var(--space-2) var(--space-4); }
.nt-page-asaas-nfse .btn + .btn { margin-left: var(--space-2); }
.nt-page-asaas-nfse .btn:hover { transform: translateY(-1px); }

.nt-page-asaas-nfse .btn-success {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
}
.nt-page-asaas-nfse .btn-success:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  border-color: color-mix(in srgb, var(--accent) 85%, #000);
}

.nt-page-asaas-nfse .btn-warning {
  background: transparent;
  color: var(--accent-on-light) !important;
  border-color: var(--border);
}
.nt-page-asaas-nfse .btn-warning:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent) !important;
}

.nt-page-asaas-nfse .btn .fa,
.nt-page-asaas-nfse .btn .fas { font-size: 1em; line-height: 1; }

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