/* Table */
.table-container {
  overflow-x: var(--table-overflow);
}

/* Table base */
.table {
  min-width: var(--table-min-width);
  border-collapse: var(--table-border-collapse);
  overflow-x: auto;
}

/* Table header */
.table-header {
  background: var(--table-header-bg);
  border-bottom: var(--table-header-border-bottom);
}

/* Table header cell */
.table-header-cell {
  padding: var(--table-header-cell-padding);
  text-align: var(--table-header-cell-text-align);
  font-size: var(--table-header-cell-font-size);
  font-weight: var(--table-header-cell-font-weight);
  color: var(--table-header-cell-color);
}

/* Table body */
.table-body {
  background: var(--table-body-bg);
}

.table-body tr {
  border-bottom: var(--table-body-row-divide);
}

.table-body tr:last-child {
  border-bottom: none;
}

/* Table row */
.table-row {
  transition: var(--table-body-row-transition);
}

.table-row:hover {
  background: var(--table-body-row-hover-bg);
}

/* Table striped */
.table-striped .table-body tr:nth-child(even) {
  background: var(--table-body-row-striped-bg);
}

.table-striped .table-body tr:nth-child(odd) {
  background: var(--table-body-row-bg);
}

/* Table cell */
.table-cell {
  padding: var(--table-body-row-cell-padding);
  white-space: var(--table-body-row-cell-white-space);
  font-size: var(--table-body-row-cell-font-size);
  font-weight: var(--table-body-row-cell-font-weight);
  color: var(--table-body-row-cell-color);
}

/* Table select */
.table-select-header,
.table-select-cell {
  width: var(--table-header-cell-select-width);
}

.table-select-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Table select checkbox component */
.table-select-checkbox {
  /* Rimuove il wrapper del checkbox per centrare solo l'input */
  margin: 0;
}

.table-select-checkbox .checkbox-wrapper {
  margin: 0;
}

.table-select-checkbox .custom-checkbox {
  /* Nasconde il testo della label per le checkbox delle tabelle */
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-select-checkbox .form-control-label {
  display: none;
}

/* Table header content */
.table-header-content {
  display: flex;
  align-items: center;
}

/* Table sort link */
.table-sort-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease-in-out;
  cursor: pointer;
}

.table-sort-link:hover {
  color: var(--color-gray-700, #374151);
}

.table-header-text {
  margin-right: var(--table-header-cell-sort-icon-margin-left);
}

/* Table sort icon */
.table-sort-icon {
  margin-left: var(--table-header-cell-sort-icon-margin-left);
  color: var(--table-header-cell-sort-icon-color);
  border-radius: 0.25rem;
  padding: 0.25rem;
  transition: color 0.15s ease-in-out;
}

.table-sort-icon:hover {
  color: var(--table-header-cell-sort-icon-hover-color);
}

.table-sort-icon-svg {
  width: var(--table-header-cell-sort-icon-size);
  height: var(--table-header-cell-sort-icon-size);
}

/* Table actions header */
.table-actions-header {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Table footer */
.table-footer {
  background: var(--table-footer-bg);
  border-top: var(--table-footer-border-top);
  padding: var(--table-footer-padding);
}

/* Table pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Table pagination mobile */
.table-pagination-mobile {
  display: flex;
  flex: 1;
  justify-content: space-between;
  background: var(--table-header-bg);
}

@media (min-width: 640px) {
  .table-pagination-mobile {
    display: none;
  }
}

/* Table pagination desktop */
.table-pagination-desktop {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .table-pagination-desktop {
    display: flex;
  }
}

/* Table pagination button */
.table-pagination-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: var(--table-footer-pagination-button-padding);
  border: var(--table-footer-pagination-button-border);
  font-size: var(--table-footer-pagination-button-font-size);
  font-weight: var(--table-footer-pagination-button-font-weight);
  color: var(--table-footer-pagination-button-color);
  background: var(--table-footer-pagination-button-bg);
  transition: background-color 0.15s ease-in-out;
}

.table-pagination-button:first-child {
  border-top-left-radius: var(--table-footer-pagination-border-radius);
  border-bottom-left-radius: var(--table-footer-pagination-border-radius);
}

.table-pagination-button:last-child {
  border-top-right-radius: var(--table-footer-pagination-border-radius);
  border-bottom-right-radius: var(--table-footer-pagination-border-radius);
}

.table-pagination-button:hover {
  color: var(--table-footer-pagination-button-state-hover-color);
  background: var(--table-footer-pagination-button-state-hover-bg);
}

.table-pagination-button.is-active {
  color: var(--table-footer-pagination-button-state-active-color);
  background: var(--table-footer-pagination-button-state-active-bg);
}

.table-pagination-button.ellipsis {
  color: var(--color-neutral-400, #9ca3af);
  cursor: default;
  pointer-events: none;
}

/* Table pagination text */
.table-pagination-text {
  font-size: var(--table-footer-pagination-text-font-size);
  color: var(--table-footer-pagination-text-color);
}

.table-pagination-current,
.table-pagination-total {
  font-weight: var(--table-footer-pagination-current-font-weight);
}

/* Table action button */
.table-action-button {
  color: var(--table-action-button-color);
  transition: var(--table-action-button-transition);
}

.table-action-button:hover {
  color: var(--table-action-button-hover-color);
}
