/* ===========================================
   MARKDOWN TABLE COMPONENT
   Clean, readable table styles
   =========================================== */

.markdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 0.95rem;
  background: var(--surface-color, white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.markdown-table thead {
  background: var(--accent-color, #2c3e50);
  color: white;
}

.markdown-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.markdown-table tbody tr {
  border-bottom: 1px solid var(--border-color, #e5e5e5);
  transition: background-color 0.2s ease;
}

.markdown-table tbody tr:last-child {
  border-bottom: none;
}

.markdown-table tbody tr:hover {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.02));
}

.markdown-table tbody td {
  padding: 12px 16px;
  vertical-align: top;
}

/* Striped rows variant */
.markdown-table.striped tbody tr:nth-child(even) {
  background-color: var(--stripe-bg, rgba(0, 0, 0, 0.02));
}

/* Compact variant */
.markdown-table.compact th,
.markdown-table.compact td {
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* Responsive: horizontal scroll on small screens */
@media (max-width: 768px) {
  .markdown-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .markdown-table th,
  .markdown-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* Dark theme support */
body.dark-theme .markdown-table,
body:not(.light-theme) .markdown-table {
  --surface-color: #1a1a1a;
  --accent-color: #3a4a5a;
  --border-color: #333;
  --hover-bg: rgba(255, 255, 255, 0.05);
  --stripe-bg: rgba(255, 255, 255, 0.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
