/**
 * @file
 * Comparison table formatter styling.
 *
 * Targets data attributes produced by ComparisonTableFormatter:
 * [data-comparison-table], [data-highlighted], [data-category-row],
 * .comparison-check, .comparison-dash
 *
 * Uses div[data-comparison-table] .comparison-table for specificity
 * over dom:style 19562 which targets [data-dom-id-X] table.table thead th.
 */

/* Table: card treatment + layout */
div[data-comparison-table] table.comparison-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  margin: 0;
}

/* Header row: dark background */
div[data-comparison-table] table.comparison-table thead th {
  background-color: #1B2A3D;
  color: rgba(255, 255, 255, 0.9);
  padding: 18px 20px;
  font-size: 16.875px;
  font-weight: 700;
  text-align: center;
  border: none;
}

/* First column header: left-aligned, 30% width */
div[data-comparison-table] table.comparison-table thead th:first-child {
  text-align: left;
  width: 30%;
}

/* Data columns: equal widths */
div[data-comparison-table] table.comparison-table thead th:nth-child(n+2) {
  width: 17.5%;
}

/* Highlighted column header: primary blue */
div[data-comparison-table] table.comparison-table thead th[data-highlighted] {
  background-color: #0073AA;
  color: #fff;
}

/* Body cells */
div[data-comparison-table] table.comparison-table tbody td {
  padding: 13px 20px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 15.75px;
  color: #1E293B;
  font-weight: 600;
  text-align: center;
  border-left: none;
  border-right: none;
  border-top: none;
  background-color: #fff;
}

/* Highlighted column cells: light blue background */
div[data-comparison-table] table.comparison-table tbody td[data-highlighted] {
  background-color: #F0F9FF;
}

/* Category separator rows */
div[data-comparison-table] table.comparison-table td[data-category-row] {
  background-color: #F1F5F9;
  color: #1E293B;
  font-weight: 600;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 1.08px;
  padding: 10px 20px;
  border-bottom: 1px solid #E2E8F0;
  text-align: left;
}

/* Green check marks */
div[data-comparison-table] .comparison-check {
  color: #10B981;
  font-size: 18px;
}

/* Muted dashes */
div[data-comparison-table] .comparison-dash {
  color: #CBD5E1;
  font-size: 17.6px;
}

/* First column (feature name) styling */
div[data-comparison-table] table.comparison-table tbody tr:not(.comparison-category) td:first-child {
  font-weight: 600;
  color: #1E293B;
  text-align: left;
}

/* Last body row: no bottom border */
div[data-comparison-table] table.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* Striping override: no zebra stripes */
div[data-comparison-table] table.comparison-table tbody tr:nth-child(even) td {
  background-color: #fff;
}

div[data-comparison-table] table.comparison-table tbody tr:nth-child(even) td[data-highlighted] {
  background-color: #F0F9FF;
}

/* Tier pricing in header cells via ::after pseudo-elements */
div[data-comparison-table] table.comparison-table thead th:nth-child(2)::after {
  content: "Free";
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}

div[data-comparison-table] table.comparison-table thead th:nth-child(3)::after {
  content: "$39/mo";
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}

div[data-comparison-table] table.comparison-table thead th:nth-child(4)::after {
  content: "$79/mo";
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}

div[data-comparison-table] table.comparison-table thead th:nth-child(5)::after {
  content: "Custom";
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}

/* "Most Popular" badge on Bloom column via ::before */
div[data-comparison-table] table.comparison-table thead th:nth-child(4) {
  position: relative;
}

div[data-comparison-table] table.comparison-table thead th:nth-child(4)::before {
  content: "Most Popular";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  color: #78350F;
  padding: 3px 14px;
  border-radius: 0 0 10px 10px;
  font-size: 11.25px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Hide responsive toggle button */
div[data-comparison-table] .tableresponsive-toggle-columns {
  display: none;
}
