/* Comparison Table Styles */
.comparison-table-wrapper {
    /* width: 100%; */ /* Removed to allow inline style to dominate more easily */
    padding: 0;
    margin: 0;
    background-color: var(--table-bg-color, #f5f5f5);
  }
  
  .comparison-table-container {
    width: 100%;
    overflow-x: auto;
  }
  
  .comparison-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0;
    background-color: transparent;
    /* border: none; */ /* Replaced by specific border settings below */
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #c0c0c0; /* Made border more visible */
    border-radius: 0;
    box-shadow: none;
    table-layout: fixed; /* Added for table width control */
  }
  
  /* Title cell (first column header) */
  .comparison-table-title-cell {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    vertical-align: top;
    padding: 20px;
    position: relative;
  }
  
  .comparison-table-title-wrapper {
    text-align: left;
  }
  
  .comparison-table-title {
    margin: 0 0 8px 0;
    padding: 0;
    font-weight: bold;
    line-height: inherit; /* Changed from 1.2 to inherit from parent TH */
    color: var(--title-color, #333333);
    font-size: var(--title-size, 32px);
    text-align: left; /* Ensure title text is aligned left */
  }
  
  .comparison-table-subtitle {
    margin: 0;
    padding: 0;
    font-weight: normal;
    line-height: inherit; /* Changed from 1.4 to inherit from parent TH */
    color: var(--subtitle-color, #666666);
    font-size: var(--subtitle-size, 18px);
  }
  
  /* Header cells (excluding title cell) */
  .comparison-table-header-cell.comparison-table-product-header {
    background-color: var(--header-bg-color, #ff6600);
    color: var(--header-text-color, #ffffff);
    font-size: var(--header-font-size, 18px);
    text-align: var(--header-alignment, center);
    padding: 20px 15px;
    font-weight: bold;
    vertical-align: top; /* Changed from middle to top */
    border: none;
    border-radius: 0;
    box-shadow: none;
    white-space: pre-line; /* Allows line breaks in header text */
    line-height: inherit; /* Changed from 1.3 to allow inline style on TH to control */
    overflow-wrap: break-word; /* Added for text wrapping */
    word-break: break-word; /* Added for text wrapping - fallback/alternative */
  }
  
  /* Vertical lines between columns (not at beginning/end, not between 1st and 2nd) */
  .comparison-table-header-cell.comparison-table-product-header:not(:last-child):not(:nth-child(2)) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Table body cells */
  .comparison-table-cell {
    padding: 12px 15px;
    font-size: var(--data-font-size, 16px);
    text-align: var(--data-alignment, center);
    vertical-align: middle;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background-color: var(--column-bg-color, transparent);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    overflow-wrap: break-word; /* Added for text wrapping */
    word-break: break-word; /* Added for text wrapping - fallback/alternative */
  }
  
  /* First column (labels) styling */
  .comparison-table-cell.comparison-table-label {
    background-color: var(--first-column-bg-color, transparent);
    text-align: var(--first-column-alignment, left);
    font-weight: 500;
    color: #333;
  }
  
  /* Vertical lines for data cells (same rule as headers) */
  .comparison-table-cell:not(:last-child):not(:first-child) {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }
  
  /* Remove bottom border from last row */
  .comparison-table tbody tr:last-child .comparison-table-cell {
    border-bottom: none;
  }
  
  /* Editor specific styles */
  .comparison-table-editor {
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
  }
  
  .comparison-table-edit {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  
  .comparison-table-edit th,
  .comparison-table-edit td {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 0;
    box-shadow: none;
  }
  
  .comparison-table-edit .comparison-table-title-cell {
    border: 1px solid #ddd;
    background-color: transparent;
  }
  
  .comparison-table-edit input,
  .comparison-table-edit textarea {
    border-radius: 0;
    box-shadow: none;
    outline: none;
  }
  
  .comparison-table-edit input:focus,
  .comparison-table-edit textarea:focus {
    box-shadow: none;
    border-radius: 0;
  }
  
  .label-cell {
    font-weight: 500;
  }
  
  /* Responsive design */
  @media (max-width: 768px) {
    .comparison-table-wrapper {
      overflow-x: auto;
    }
    
    .comparison-table {
      min-width: 600px;
    }
    
    .comparison-table-title {
      font-size: calc(var(--title-size, 32px) * 0.8);
    }
    
    .comparison-table-subtitle {
      font-size: calc(var(--subtitle-size, 18px) * 0.9);
    }
    
    .comparison-table-header-cell.comparison-table-product-header {
      font-size: calc(var(--header-font-size, 18px) * 0.9);
      padding: 15px 10px;
    }
    
    .comparison-table-cell {
      font-size: calc(var(--data-font-size, 16px) * 0.9);
      padding: 10px 8px;
    }

  .comparison-table-title-cell { /* Targeting the main title/subtitle cell */
    padding: 15px 10px; /* Was 20px by default, reducing for mobile */
  }
  }
  
  /* CSS Custom Properties Usage Examples */
  /*
  To customize colors and fonts, use these CSS custom properties:
  
  .comparison-table-wrapper {
    --table-bg-color: #f5f5f5;
    --title-color: #333333;
    --subtitle-color: #666666;
    --title-size: 32px;
    --subtitle-size: 18px;
    --header-font-size: 18px;
    --data-font-size: 16px;
    --header-bg-color: #ff6600;
    --header-text-color: #ffffff;
    --header-alignment: center;
    --data-alignment: center;
    --first-column-alignment: left;
    --column-bg-color: transparent;
    --first-column-bg-color: transparent;
  }
  
  For different columns, you can use nth-child selectors:
  .comparison-table-header-cell:nth-child(2) {
    --header-bg-color: #ff6600;
    --header-text-color: #ffffff;
  }
  
  .comparison-table-header-cell:nth-child(3) {
    --header-bg-color: #000000;
    --header-text-color: #ffffff;
  }
  
  .comparison-table-cell:nth-child(2) {
    --column-bg-color: rgba(255, 102, 0, 0.1);
    --data-alignment: center;
  }
  */