/************************************************
 * TABLE WRAPPER & CHILD ELEMENTS
 ************************************************/
.table-wrapper {
  width: calc(100% - 10px);
  margin: 5px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.table-scroll {
  overflow-x: auto;
  position: relative;
  flex: 1;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  white-space: nowrap;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

th {
  background-color: orange;
  color: white;
  font-weight: 500;
  position: sticky; /* keeps header stuck at the top on scroll */
  top: 0;
  z-index: 10;
}

.id-column {
  position: sticky;
  left: 0;
  background: #f3f4f6;
  z-index: 5;
  min-width: 120px;
  font-weight: 500;
}

th.id-column {
  z-index: 15;
  background: #1a365d; /* darker background for ID column header */
}

/* Hover effect */
tr:hover {
  background-color: #f8fafc;
}

/************************************************
 * DESCRIPTION ROWS
 ************************************************/
.description-row {
  display: none;
  background-color: #f8fafc;
}

.description-row.active {
  display: table-row;
}

.description-cell {
  padding: 16px 24px;
  white-space: normal;
  color: #4a5568;
  line-height: 1.5;
  background: #f8fafc;
}

/************************************************
 * EXPANDABLE ROWS
 ************************************************/
.expandable-row {
  cursor: pointer;
}

.expandable-row.active {
  background-color: #f1f5f9;
}

/* The little arrow icon */
.expand-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  border-radius: 50%;
  background-color: #e2e8f0;
  transition: transform 0.2s ease;
}

.expandable-row.active .expand-indicator {
  transform: rotate(180deg);
  background-color: #cbd5e1;
}

/************************************************
 * PRICE COLUMNS
 ************************************************/
.price {
  text-align: right;
}

/************************************************
 * PAGINATION
 ************************************************/
.pagination {
  padding: 16px;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
}

.pagination a {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #1a365d;
  text-decoration: none;
}

.pagination a:hover {
  background: #e2e8f0;
}

/************************************************
 * RESPONSIVE (max-width: 768px)
 ************************************************/
@media (max-width: 768px) {
  th,
  td {
    padding: 8px;
    font-size: 13px;
    width: auto;
  }

  /* TABLE WRAPPER (overrides for smaller screens) */
  .table-wrapper {
    background-color: #00c4ff; /* Another shade of blue */
    flex: 2 1 400px;
    padding: 1rem;
  }

  .table-wrapper table {
    width: 100%;
    border-collapse: collapse;
  }

  .table-wrapper th,
  .table-wrapper td {
    border: 1px solid #ccc;
    padding: 0.75rem;
    text-align: left;
  }
}
