/**
 * Tables Component
 * 
 * Styles for tables used in instructions and actions help sections.
 * Dependencies: variables.css
 */

/* === Table Card Wrapper === */
/* Shared wrapper for tables to get rounded corners + padding like create problem */
.table-card {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  /* Clip inner table corners */
  overflow: hidden;
}

/* Avoid double borders: let the card provide the border */
.table-card .table-like {
  border: 0;
}

/* === Shared Table Styles === */
/* Shared table styles (used by Instructions + Actions Help) */
.table-like {
  width: 100%;
  border-collapse: collapse;
  background: var(--background);
  border: 1px solid var(--border-color);
  table-layout: fixed;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.table-like th,
.table-like td {
  vertical-align: var(--table-valign, middle);
  line-height: 1.35;
}

.table-like th {
  padding: 0 var(--spacing-md) var(--spacing-xl);
  text-align: center;
  font-weight: 600;
  font-size: var(--table-header-size, var(--spacing-xl));
}

.table-like td {
  padding: var(--table-cell-vpad, var(--spacing-lg)) var(--spacing-md);
  font-size: var(--table-body-size, var(--font-size-lg));
}

.table-like th + th,
.table-like td + td {
  border-left: 1px solid var(--border-color);
}

.table-like tr + tr th,
.table-like tr + tr td {
  border-top: 1px solid var(--border-color);
}

/* === Instructions Table === */
/* Instructions: section-specific sizes via vars (same look as before) */
.instructions table {
  --table-header-size: var(--spacing-xl);
  --table-body-size: var(--font-size-lg);
  --table-cell-vpad: var(--spacing-lg);
  --table-valign: middle;
}

.instructions .instruction-section {
  padding: var(--instruction-section-padding) var(--spacing-md);
  text-align: left;
}

/* === Actions Help Table === */
/* Remove the card chrome for actions-help now that it is a table */
.actions-help {
  background: transparent;
  border: 0;
  padding: 0;
}

/* Actions-help table: same typography as instructions */
.actions-help table {
  --table-header-size: var(--spacing-xl);
  --table-body-size: var(--font-size-lg);
  --table-cell-vpad: var(--instruction-section-padding);
  --table-valign: middle;
}

/* Actions-help table tweaks and inert demo buttons */
.actions-help .btn-cell {
  text-align: center;
}

.actions-help .action-btn--demo {
  /* Ignore mouse */
  pointer-events: none;
  cursor: default;
}

.actions-help .action-btn--demo:hover {
  /* Cancel global button:hover filter */
  filter: none;
  background: var(--background-light);
}

/* === Keyboard Shortcut Tags === */
kbd {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--background-light);
  font-family: monospace;
  font-size: var(--font-size-sm);
  line-height: 1.2;
  white-space: nowrap;
}

/* === Table Column Widths === */
.actions-help-table col:nth-child(1) {
  width: 15%;
}

.actions-help-table col:nth-child(2) {
  width: 85%;
}

.instructions-table col:nth-child(1) {
  width: 40%;
}

.instructions-table col:nth-child(2) {
  width: 60%;
}

/* === Table Cell Content === */
.table-like td[data-pre-wrap],
.table-like .pre-wrap {
  white-space: pre-wrap;
}

