/* Table Styles */
@import './variables.css';

/* Table Container */
.goods-table-container {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  background: white;
}

/* Table Scrollbar */
.goods-table-container::-webkit-scrollbar {
  height: 8px;
}

.goods-table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.goods-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.goods-table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Main Table */
.goods-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Table Header */
.goods-table th {
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  background: linear-gradient(to right, #1e40af, #3b82f6);
  color: white;
  text-align: left;
}

/* Table Cells */
.goods-table td {
  padding: 0.625rem 0.5rem;
  vertical-align: top;
  /* line-height: 1.4; */
  border-bottom: 1px solid #e5e7eb;
}

/* Table Rows */
.goods-table tbody tr {
  transition: background-color 0.2s ease;
  height: 3.5rem;
}

.goods-table tbody tr:hover {
  background-color: #f8fafc !important;
}

/* Table Row Height */
.goods-table tbody tr {
  height: 3.5rem;
}

/* Table Cell Content Alignment */
.goods-table td>span,
.goods-table td>div {
  display: flex;
  align-items: center;
  min-height: 1.5rem;
}

/* Table Header Column Widths */
.goods-table th:nth-child(1),
.goods-table td:nth-child(1) {
  width: 80px;
  min-width: 80px;
}

.goods-table th:nth-child(2),
.goods-table td:nth-child(2) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  word-wrap: break-word;
}

.goods-table th:nth-child(3),
.goods-table td:nth-child(3) {
  width: 120px;
  min-width: 120px;
}

.goods-table th:nth-child(4),
.goods-table td:nth-child(4) {
  width: 120px;
  min-width: 120px;
}

.goods-table th:nth-child(5),
.goods-table td:nth-child(5) {
  width: 80px;
  min-width: 80px;
}

.goods-table th:nth-child(6),
.goods-table td:nth-child(6) {
  width: 80px;
  min-width: 80px;
}

.goods-table th:nth-child(7),
.goods-table td:nth-child(7) {
  width: 220px;
  min-width: 220px;
  word-wrap: break-word;
}

.goods-table th:nth-child(8),
.goods-table td:nth-child(8) {
  width: 100px;
  min-width: 100px;
}

.goods-table th:nth-child(9),
.goods-table td:nth-child(9) {
  width: 80px;
  min-width: 80px;
}

/* Additional Columns */
.goods-table th:nth-child(10),
.goods-table td:nth-child(10) {
  width: 150px;
  min-width: 150px;
  vertical-align: middle;
}

.goods-table th:nth-child(11),
.goods-table td:nth-child(11) {
  width: 100px;
  min-width: 100px;
  vertical-align: middle;
}

/* Special Column Alignment */
.goods-table td:nth-child(2) {
  align-items: flex-start;
  vertical-align: middle;
}

.goods-table td:nth-child(7) {
  align-items: flex-start;
  vertical-align: middle;
}

/* Other Columns Alignment */
.goods-table td:nth-child(1),
.goods-table td:nth-child(3),
.goods-table td:nth-child(4),
.goods-table td:nth-child(5),
.goods-table td:nth-child(6),
.goods-table td:nth-child(8),
.goods-table td:nth-child(9) {
  vertical-align: middle;
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
  .goods-table th,
  .goods-table td {
    padding: 0.5rem 0.375rem;
    font-size: 0.8rem;
  }
  
  .goods-table th:nth-child(2),
  .goods-table td:nth-child(2) {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
  }
  
  .goods-table th:nth-child(7),
  .goods-table td:nth-child(7) {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
  }
  
  .goods-table th:nth-child(10),
  .goods-table td:nth-child(10) {
    width: 120px;
    min-width: 120px;
  }
  
  .goods-table tbody tr {
    height: 3.25rem;
  }
}

/* Table Icons */
.goods-table td i {
  vertical-align: middle;
}

/* Special Handling for Cells with Tags */
.goods-table td:has(.keyword-tag),
.goods-table td:has(.category-cell) {
  vertical-align: middle;
}