/* Common table styles */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  background-color: var(--white-color);
}

.table th {
  background-color: var(--primary-color);
  color: var(--text-color);
  font-weight: 600;
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 5;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table td {
  padding: var(--spacing-md);
  vertical-align: middle;
  transition: background-color 0.2s ease;
  max-width: unset;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table tbody tr:hover {
  background-color: var(--secondary-color);
}

/* Table wrapper styles */
.scrollable-table-wrapper {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-height: 70vh;
  overflow: auto;
  background-color: var(--white-color);
}

/* Table scroll container */
.table-scroll-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

.vertical-scroll {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table responsive wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--spacing-md);
}

/* Sticky header styles */
.sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  color: var(--text-color);
  background-color: var(--primary-color);
  border-bottom: none;
}

/* Sticky footer styles */
.sticky-footer tfoot td,
.sticky-footer tfoot th {
  position: sticky;
  bottom: 0;
  background-color: var(--primary-color);
  z-index: 4;
  border-top: 1px solid var(--border-color);
}

/* Wide table styles */
.wide-table {
  min-width: 100%;
}

/* Summary table styles */
.summary-table {
  font-size: 0.9rem;
}

.summary-table td,
.summary-table th {
  vertical-align: middle;
  white-space: nowrap;
  padding: var(--spacing-sm) var(--spacing-md);
  line-height: 1.2;
}

/* Summary row styles */
.summary-row th {
  font-weight: bold;
  background-color: var(--primary-color);
  border-top: 1px solid var(--border-color);
}

/* Table dark theme */
.table-dark {
  background-color: var(--primary-color);
  color: var(--text-color);
}

/* Table striped styles */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--tertiary-color);
}

/* Table bordered styles */
.table-bordered {
  border: none;
}

.table-bordered th,
.table-bordered td {
  border: none;
}

/* Table small styles */
.table-sm th,
.table-sm td {
  padding: var(--spacing-sm);
}

/* Table hover effect */
.table-hover tbody tr:hover {
  background-color: var(--secondary-color);
}

/* DataTables specific styles */
.display {
  width: 100% !important;
}

.nowrap {
  white-space: nowrap;
}

/* Responsive table styles */
@media (max-width: 768px) {
  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: var(--spacing-sm);
  }

  .scrollable-table-wrapper {
    max-height: 50vh;
  }
}

/* Table footer styles */
.table tfoot td,
.table tfoot th {
  font-weight: 600;
  background-color: var(--primary-color);
  color: var(--text-color);
  border-top: none;
  border-bottom: none;
}

/* Table row styles */
.table tbody tr {
  transition: all 0.2s ease;
}

/* Table cell alignment */
.table td.text-right,
.table th.text-right {
  text-align: right;
}

.table td.text-center,
.table th.text-center {
  text-align: center;
}

/* Table cell padding */
.table td.p-0,
.table th.p-0 {
  padding: 0;
}

/* Table cell border */
.table td.border-0,
.table th.border-0 {
  border: 0;
}

/* Table cell background */
.table td.bg-light,
.table th.bg-light {
  background-color: var(--tertiary-color);
}

/* Table cell text color */
.table td.text-muted,
.table th.text-muted {
  color: var(--text-color);
  opacity: 0.7;
}

/* Table cell font weight */
.table td.fw-bold,
.table th.fw-bold {
  font-weight: 600;
}

/* Table cell font size */
.table td.small,
.table th.small {
  font-size: 0.85rem;
}

/* Table cell font style */
.table td.text-italic,
.table th.text-italic {
  font-style: italic;
}

/* Table cell text decoration */
.table td.text-underline,
.table th.text-underline {
  text-decoration: underline;
}

/* Table cell text transform */
.table td.text-uppercase,
.table th.text-uppercase {
  text-transform: uppercase;
}

/* Table cell text truncate */
.table td.text-truncate,
.table th.text-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
} 