/* Compact table styling for trade-history */
.trade-history-table table {
  font-size: 0.8rem;
  border-collapse: collapse;
  width: 100%;
}

.trade-history-table th,
.trade-history-table td {
  padding: 0.3rem 0.4rem;
  white-space: nowrap;
  text-align: center !important;
}

.trade-history-table .toggle-cols {
  display: inline-block;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #0366d6;
  user-select: none;
}

.trade-history-table .toggle-cols:hover {
  text-decoration: underline;
}

/* Collapsed by default: hide columns 4-8 */
.trade-history-table.columns-collapsed th:nth-child(n+4):nth-child(-n+8),
.trade-history-table.columns-collapsed td:nth-child(n+4):nth-child(-n+8) {
  display: none !important;
}

/* Expanded: show all columns */
.trade-history-table.columns-expanded th:nth-child(n+4):nth-child(-n+8),
.trade-history-table.columns-expanded td:nth-child(n+4):nth-child(-n+8) {
  display: table-cell !important;
}

/* Hide less important columns on smaller screens (when expanded) */
@media (max-width: 900px) {
  .trade-history-table th:nth-child(5),
  .trade-history-table td:nth-child(5),
  .trade-history-table th:nth-child(8),
  .trade-history-table td:nth-child(8) {
    display: none;
  }
}

@media (max-width: 700px) {
  .trade-history-table th:nth-child(4),
  .trade-history-table td:nth-child(4),
  .trade-history-table th:nth-child(6),
  .trade-history-table td:nth-child(6) {
    display: none;
  }
}
