/* ============================================
   Product Comparison Table
   ============================================ */
.comparison-table-section {
    margin-bottom: var(--spacing-6x);
}

.comparison-table-section .section-title {
    margin-bottom: var(--spacing-2x);
}

.comparison-table-section .section-desc {
    margin-bottom: var(--spacing-4x);
    color: var(--text-color);
}

.comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius-lg);
    border: var(--ui-block-border);
    box-shadow: var(--box-shadow-sm);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ui-block-bg);
    min-width: 600px;
}

/* ---- Header ---- */
.comparison-table thead th {
    padding: 1.25rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-heading-color);
    background: var(--ui-block-bg);
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    vertical-align: bottom;
}

html.lagom-dark-mode .comparison-table thead th {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.ct-plan-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ---- Body ---- */
.comparison-table tbody td {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.925rem;
    color: var(--text-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

html.lagom-dark-mode .comparison-table tbody td {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

/* Zebra striping */
.comparison-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

html.lagom-dark-mode .comparison-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

/* ---- Label column (sticky on scroll) ---- */
.comparison-table .ct-label-col {
    text-align: left;
    font-weight: 600;
    color: var(--text-heading-color);
    white-space: nowrap;
    min-width: 150px;
    position: sticky;
    left: 0;
    background: var(--ui-block-bg);
    z-index: 1;
}

.comparison-table tbody tr:nth-child(even) .ct-label-col {
    background: var(--ui-block-bg);
}

/* ---- Featured column highlight ---- */
.comparison-table .is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.06);
    border-left: 1px solid rgba(var(--brand-primary-rgb, 59, 130, 246), 0.15);
    border-right: 1px solid rgba(var(--brand-primary-rgb, 59, 130, 246), 0.15);
}

.comparison-table thead th.is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.1);
    border-top: 3px solid var(--brand-primary);
    position: relative;
    overflow: hidden;
    color: var(--brand-primary);
}

.comparison-table tbody tr:nth-child(even) td.is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.08);
}

.comparison-table .ct-price-row td.is-featured,
.comparison-table .ct-order-row td.is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.08);
}

html.lagom-dark-mode .comparison-table .is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.06);
    border-left-color: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.12);
    border-right-color: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.12);
}

html.lagom-dark-mode .comparison-table thead th.is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.1);
}

html.lagom-dark-mode .comparison-table tbody tr:nth-child(even) td.is-featured {
    background: rgba(var(--brand-primary-rgb, 59, 130, 246), 0.08);
}

/* ---- Price row ---- */
.comparison-table .ct-price-row td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

html.lagom-dark-mode .comparison-table .ct-price-row td {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.ct-price {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-heading-color);
    line-height: 1.3;
}

.ct-cycle {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.65;
    margin-top: 0.1rem;
}

/* ---- Order row ---- */
.comparison-table .ct-order-row td {
    padding: 1rem;
    border-bottom: none;
    border-top: none;
}

.comparison-table .ct-order-row .btn {
    white-space: nowrap;
    padding: .6rem 1.5rem;
    font-size: .95rem;
    font-weight: 600;
}

/* ---- N/A dash ---- */
.ct-na {
    opacity: 0.35;
}

/* ---- SVG check / error icons in cells ---- */
.ct-svg-yes,
.ct-svg-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    flex-shrink: 0;
}
.ct-svg-yes svg,
.ct-svg-no svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* ============================================
   Trust line
   ============================================ */
.ct-trust-line {
    margin-top: var(--spacing-3x);
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.65;
}

/* ============================================
   Card highlight specs
   ============================================ */
.package-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.package-highlights li {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991.98px) {
    .comparison-table-section {
        margin-bottom: var(--spacing-4x);
    }

    .comparison-table thead th {
        padding: 1rem 0.75rem;
        font-size: 0.925rem;
    }

    .ct-plan-name {
        font-size: 1rem;
    }

    .comparison-table tbody td {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .ct-label-col {
        min-width: 120px !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 575.98px) {
    .comparison-table {
        min-width: 500px;
    }

    .ct-plan-name {
        font-size: 0.9rem;
    }

    .ct-price {
        font-size: 1.05rem;
    }
}
