/* Reusable table styles */

/* Base table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  border-bottom: 2px solid var(--input-border);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--input-border);
}

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

/* Cover thumbnail in table */
.table-cover {
  width: 120px;
  padding: 0.75rem 1rem !important;
}

.table-cover-link {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.table-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--placeholder-color);
  opacity: 0.5;
}

/* Title column */
.table-title {
  padding-left: 1rem !important;
  text-align: left;
}

.table-title-link {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--text-color);
  text-decoration: none;
}

.table-title-link:hover {
  text-decoration: underline;
}

.table-title-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--placeholder-color);
}

/* Author/subtitle in table */
.table-subtitle {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.table-subtitle-link {
  color: var(--placeholder-color);
  text-decoration: none;
}

.table-subtitle-link:hover {
  color: var(--text-color);
  text-decoration: underline;
}

/* Value column (right-aligned) */
.table-value {
  text-align: right;
  font-weight: 600;
  color: var(--text-color);
  font-size: 1.125rem;
  white-space: nowrap;
}

/* Date column */
.table-date {
  text-align: left;
  color: var(--placeholder-color);
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Status column */
.table-status {
  text-align: left;
  font-size: 0.875rem;
  white-space: nowrap;
}

.table-status-pending {
  color: #f59e0b;
}

.table-status-paid,
.table-status-completed {
  color: #10b981;
}

.table-status-processing {
  color: #3b82f6;
}

/* Rank column */
.table-rank {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  width: 80px;
}

/* Responsive */
@media (max-width: 768px) {
  .table-cover {
    width: 100px;
    padding: 0.5rem !important;
  }

  .table-cover-link {
    width: 60px;
    height: 60px;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }

  .table-value {
    font-size: 1rem;
  }

  .table-title-link,
  .table-title-text {
    font-size: 1rem;
  }

  .table-date,
  .table-status {
    font-size: 0.75rem;
  }

  .data-table th {
    font-size: 0.75rem;
  }

  .table-rank {
    font-size: 1.2rem;
    width: 60px;
  }
}

