/* ================================================
   Editable Comparison Table — Brand-Aligned Styles
   Ported from jams-ninja-tables.css for ACF-driven tables
   Mobile-first
   ================================================ */


/* ── Wrapper ── */
.comparison-table-editable__wrapper {
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: visible;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  -webkit-overflow-scrolling: touch;
}

.comparison-table-editable__heading {
  margin-bottom: 0.5rem;
}

.comparison-table-editable__description {
  margin-bottom: 2rem;
}


/* ── Section backgrounds ── */
.landing-page__section--comparison-table-editable-white {
  background-color: #ffffff;
}

.landing-page__section--comparison-table-editable-gray {
  background-color: #f5f7fa;
}

.landing-page__section--comparison-table-editable-black {
  background-color: #0d1b2a;
}

.landing-page__section--comparison-table-editable-black .comparison-table-editable__heading,
.landing-page__section--comparison-table-editable-black .comparison-table-editable__description,
.landing-page__section--comparison-table-editable-black .comparison-table-editable__description p {
  color: #ffffff !important;
}

.landing-page__section--comparison-table-editable-gradient {
  background: linear-gradient(180deg, #0d1b2a 0%, #1a3d6d 100%);
}

.landing-page__section--comparison-table-editable-gradient .comparison-table-editable__heading,
.landing-page__section--comparison-table-editable-gradient .comparison-table-editable__description,
.landing-page__section--comparison-table-editable-gradient .comparison-table-editable__description p {
  color: #ffffff !important;
}


/* ── Column-count-dependent max-widths ── */
.comparison-table-editable__wrapper:has(.comparison-table-editable__table--3-cols) {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.comparison-table-editable__wrapper:has(.comparison-table-editable__table--4-cols) {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.comparison-table-editable__wrapper:has(.comparison-table-editable__table--5-cols) {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}


/* ── Table base ── */
.comparison-table-editable__table {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 600px;
  border: none;
  margin-bottom: 0;
  table-layout: fixed;
}

/* Feature column gets a fixed width; product columns share the rest equally */
.comparison-table-editable__feature-col,
td.comparison-table-editable__feature-name {
  width: 28%;
}

/* Widen feature col on tables with fewer product columns to tighten value columns */
.comparison-table-editable__table--3-cols .comparison-table-editable__feature-col,
.comparison-table-editable__table--3-cols td.comparison-table-editable__feature-name {
  width: 50%;
}

.comparison-table-editable__table--4-cols .comparison-table-editable__feature-col,
.comparison-table-editable__table--4-cols td.comparison-table-editable__feature-name {
  width: 40%;
}


/* ================================================
   HEADER ROW
   ================================================ */

.comparison-table-editable__table > thead > tr > th {
  background: #0a1c30;
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 16px;
  border: none;
  border-bottom: 3px solid #d20c1f;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

/* Feature column header — left aligned, hide text visually for cleaner look */
.comparison-table-editable__feature-col {
  text-align: left !important;
  font-size: 0;
  color: transparent;
}

/* Product column headers — tighter horizontal padding */
.comparison-table-editable__product-col {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Primary product column header — brighter blue */
.comparison-table-editable__product-col--primary {
  background: #1a3d6d !important;
  min-width: 100px;
}

/* Logo images in headers */
.comparison-table-editable__logo {
  display: block;
  max-width: 110px;
  max-height: 28px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: none !important;
  -webkit-filter: none !important;
}

/* Primary column logo slightly larger */
.comparison-table-editable__product-col--primary .comparison-table-editable__logo {
  max-width: 90px;
  max-height: 24px;
}

/* Fallback text label when no logo uploaded */
.comparison-table-editable__label {
  display: block;
  text-align: center;
}


/* ================================================
   BODY CELLS
   ================================================ */

.comparison-table-editable__table > tbody > tr > td {
  padding: 10px 16px;
  border: none;
  border-bottom: 1px solid #e8ecf1;
  color: #1a1a2e;
  font-size: 13px;
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

/* Odd rows */
.comparison-table-editable__table > tbody > tr:nth-child(odd) > td {
  background-color: #ffffff;
}

/* Even rows */
.comparison-table-editable__table > tbody > tr:nth-child(even) > td {
  background-color: #f7f9fc;
}

/* Feature name column — bold labels */
.comparison-table-editable__feature-name {
  font-weight: 700;
  color: #0d1b2a;
  text-align: left;
}

/* Competitor value columns — centered, muted */
.comparison-table-editable__value {
  text-align: center;
  color: #6c757d;
  padding-left: 8px;
  padding-right: 8px;
}

/* Primary product column body — blue tint */
.comparison-table-editable__value--primary {
  background-color: #e4eef8 !important;
  color: #0a2240;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
  border-bottom: 1px solid #b8cfea;
}

.comparison-table-editable__table > tbody > tr:nth-child(even) > .comparison-table-editable__value--primary {
  background-color: #d1e2f4 !important;
}

/* Row hover */
.comparison-table-editable__table > tbody > tr:hover > td {
  background-color: #eef2f7;
}

.comparison-table-editable__table > tbody > tr:hover > .comparison-table-editable__value--primary {
  background-color: #c0d6ed !important;
}

/* Last row — no bottom border */
.comparison-table-editable__table > tbody > tr:last-child > td {
  border-bottom: none;
}


/* ================================================
   RESPONSIVE — min-width: 769px
   ================================================ */

@media (min-width: 769px) {

  .comparison-table-editable__table {
    font-size: 15px;
  }

  .comparison-table-editable__table > thead > tr > th {
    font-size: 18px;
    letter-spacing: 1.5px;
    padding: 20px 24px;
  }

  .comparison-table-editable__product-col--primary {
    min-width: 120px;
  }

  .comparison-table-editable__product-col--primary .comparison-table-editable__logo {
    max-width: 90px;
    max-height: 24px;
  }

  .comparison-table-editable__logo {
    max-width: 130px;
    max-height: 34px;
  }

  .comparison-table-editable__table > tbody > tr > td {
    padding: 14px 24px;
    font-size: 15px;
  }

  .comparison-table-editable__value,
  .comparison-table-editable__value--primary {
    padding-left: 10px;
    padding-right: 10px;
  }

  .comparison-table-editable__value--primary {
    font-size: 16px;
  }
}
