/* =====================================================================
   /products/product-comparison-table/
   ---------------------------------------------------------------------
   Feature comparison table — design integrated AS-IS from
   _content/comparison-table.html. Every rule is scoped under
   #feature-comparison-section so the table's styling cannot leak to the
   rest of the site. The white page-hero and the CTA use the shared
   design system; CTA styling is kept at the bottom of this file.
   ===================================================================== */

#feature-comparison-section {
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* ── Search box ─────────────────────────────────────────────────────── */
#feature-comparison-section #fcSearchInput {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    color: #111;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 10px;
}

/* ── Scroll container ───────────────────────────────────────────────── */
/* Vertical scroll within the content area (sticky header), and horizontal
   scroll when the table is wider than the viewport (mobile). */
#feature-comparison-section .table-responsive {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: 75vh !important;
    overscroll-behavior: contain;
}

#feature-comparison-section #featureTable {
    width: 100%;
    min-width: 880px; /* integration: keep columns legible → horizontal scroll on mobile rather than squishing */
    table-layout: fixed; /* fix: equal, content-independent columns so every row lines up */
    border-collapse: collapse;
    font-size: 15px;
    color: var(--color-black);
    background-color: #ffffff;
}

#feature-comparison-section #featureTable .fc-th-feature {
    width: 38%;
}
#feature-comparison-section #featureTable th:not(.fc-th-feature),
#feature-comparison-section #featureTable td:not(:first-child) {
    width: calc(62% / 6);
}

/* ── Sticky header ──────────────────────────────────────────────────── */
#feature-comparison-section #featureTable thead th {
    padding: 18px 0px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 20;
    border-right: none;
    border-left: none;
}
#feature-comparison-section #featureTable thead th.fc-th-feature {
    text-align: left;
}

/* ── Body cells ─────────────────────────────────────────────────────── */
#feature-comparison-section #featureTable td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
    border-right: none;
    border-left: none;
    background-color: #ffffff !important;
}
#feature-comparison-section #featureTable td:first-child,
#feature-comparison-section #featureTable th.fc-th-feature {
    width: 38%; /* lock the feature column on both header + body rows */
}
#feature-comparison-section #featureTable td:first-child {
    text-align: left;
    padding-left: 20px;
    color: #111;
    font-weight: 500;
    overflow-wrap: break-word; /* long feature names wrap inside the fixed column */
}

/* ── Category header (grey, clickable) ──────────────────────────────── */
#feature-comparison-section #featureTable .category-header {
    background-color: #F2F2F2 !important;
    cursor: pointer;
    user-select: none;
    border: none !important;
}
#feature-comparison-section #featureTable .category-header td {
    background-color: #F2F2F2 !important;
    padding: 15px 20px;
    font-weight: 800;
    font-size: 16px;
    color: #000;
    text-align: left;
    border: none !important;
}

/* Collapsible behaviour — hide a category's rows when collapsed. */
#feature-comparison-section #featureTable tbody.fc-collapsed .feature-row {
    display: none;
}

/* ── Value (number / infinity) cells ────────────────────────────────── */
#feature-comparison-section #featureTable .fc-value {
    color: var(--color-black) !important;
    font-size: 20px;
    font-weight: 700;
    vertical-align: middle;
}

/* ── +/- toggle icon ────────────────────────────────────────────────── */
#feature-comparison-section .fc-toggle-icon {
    position: relative;
    float: right;
    width: 14px;
    height: 14px;
    margin-top: 5px;
}
#feature-comparison-section .fc-toggle-icon::before,
#feature-comparison-section .fc-toggle-icon::after {
    content: '';
    position: absolute;
    background-color: #e11b22;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease;
}
#feature-comparison-section .fc-toggle-icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
}
#feature-comparison-section .fc-toggle-icon::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    margin-left: -1px;
}
#feature-comparison-section tbody:not(.fc-collapsed) .fc-toggle-icon::after {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

/* ── Yes (green check) ──────────────────────────────────────────────── */
#feature-comparison-section .check-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    color: #0DB14B !important;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

/* ── No (was grey, now black per "no gray text") ────────────────────── */
#feature-comparison-section #featureTable .fc-no {
    color: var(--color-black) !important;
    font-size: 18px;
    font-weight: 700;
}

/* ── Cell icons (∞ and ✗) ───────────────────────────────────────────── */
/* Override the theme's global `img { display:block }` so icons sit inline
   and center inside their (text-align:center) cells instead of hugging left. */
#feature-comparison-section #featureTable .fc-icon-svg {
    display: inline-block;
    margin: 0 auto;
    width: 22px;
    height: auto;
    vertical-align: middle;
}
/* Infinity icon — darkened to grey to match the value cells. */
#feature-comparison-section img[src*="circle_compare.svg"] {
    filter: brightness(20%);
    opacity: 0.8;
}

/* ── Row hover ──────────────────────────────────────────────────────── */
#feature-comparison-section #featureTable tr.feature-row:hover td {
    background-color: #f9f9f9 !important;
}

/* ── Footnote (outside the scroll box) ──────────────────────────────── */
#feature-comparison-section .fc-footnote {
    font-size: 0.8rem;
    color: var(--color-black);
    line-height: 1.6;
    margin: 16px 0 0;
}

@media (max-width: 768px) {
    #feature-comparison-section .table-responsive { max-height: 70vh !important; }
}
