/**
 * Table Component Styles
 * WooCommerce to Shopify Sync Plugin
 * 
 * Table components for displaying tabular data.
 */

/* Base Table */
.w2ssyn-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--w2ssyn-bg-primary);
  font-size: var(--w2ssyn-font-size-base);
  line-height: var(--w2ssyn-line-height-normal);
}

/* Table Header */
.w2ssyn-table__header {
  background-color: var(--w2ssyn-primary);
  color: #ffffff;
}

.w2ssyn-table th {
  padding: var(--w2ssyn-spacing-md);
  text-align: left;
  font-weight: var(--w2ssyn-font-weight-semibold);
  font-size: var(--w2ssyn-font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--w2ssyn-primary-dark);
}

.w2ssyn-table__header th {
  color: #ffffff;
}

/* Table Body */
.w2ssyn-table tbody tr {
  border-bottom: 1px solid var(--w2ssyn-border-light);
  transition: background-color var(--w2ssyn-transition-fast);
}

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

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

.w2ssyn-table td {
  padding: var(--w2ssyn-spacing-md);
  color: var(--w2ssyn-text-primary);
  vertical-align: middle;
}

/* Table Striped */
.w2ssyn-table--striped tbody tr:nth-child(even) {
  background-color: var(--w2ssyn-bg-tertiary);
}

.w2ssyn-table--striped tbody tr:nth-child(even):hover {
  background-color: var(--w2ssyn-bg-secondary);
}

/* Table Bordered */
.w2ssyn-table--bordered {
  border: 1px solid var(--w2ssyn-border-color);
}

.w2ssyn-table--bordered th,
.w2ssyn-table--bordered td {
  border: 1px solid var(--w2ssyn-border-light);
}

/* Table Hover */
.w2ssyn-table--hover tbody tr {
  cursor: pointer;
}

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

/* Table Responsive */
.w2ssyn-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.w2ssyn-table-responsive .w2ssyn-table {
  min-width: 600px;
}

/* Table Compact */
.w2ssyn-table--compact th,
.w2ssyn-table--compact td {
  padding: var(--w2ssyn-spacing-xs) var(--w2ssyn-spacing-sm);
  font-size: var(--w2ssyn-font-size-sm);
}

/* Table Actions Column */
.w2ssyn-table__actions {
  white-space: nowrap;
  text-align: right;
}

.w2ssyn-table__actions .w2ssyn-btn {
  margin-left: var(--w2ssyn-spacing-xs);
}

/* Table Empty State */
.w2ssyn-table__empty {
  padding: var(--w2ssyn-spacing-2xl);
  text-align: center;
  color: var(--w2ssyn-text-secondary);
}

.w2ssyn-table__empty td {
  padding: var(--w2ssyn-spacing-2xl);
}

/* Table Loading State */
.w2ssyn-table--loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.w2ssyn-table--loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Table Footer */
.w2ssyn-table__footer {
  background-color: var(--w2ssyn-bg-secondary);
  border-top: 2px solid var(--w2ssyn-border-color);
}

.w2ssyn-table__footer td {
  padding: var(--w2ssyn-spacing-md);
  font-weight: var(--w2ssyn-font-weight-semibold);
}

