/* =========================================================
   PROVIDENCE COMPARISON TABLE
   ========================================================= */

.providence-comparison-widget {
    width: 100%;
}

.providence-comparison-table-wrap {
    --pct-mobile-feature: 165px;
    --pct-mobile-providence: 190px;
    --pct-mobile-other: 180px;

    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: var(--pct-table-bg, #fff);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.providence-comparison-table {
    --pct-table-bg: #fff;
    --pct-row-alt-bg: #F7F7F7;
    --pct-feature-color: #B37836;
    --pct-providence-bg: #171F69;
    --pct-providence-color: #fff;
    --pct-heading-color: #B37836;
    --pct-body-color: #222;
    --pct-divider: rgba(0, 0, 0, 0.07);
    --pct-feature-width: 25%;

    width: 100%;
    margin: 0 !important;
    margin-block: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: var(--pct-table-bg);
}

/* Reset theme/Elementor table borders first, then draw only inner dividers. */
.providence-comparison-table th,
.providence-comparison-table td {
    padding: 18px 22px;
    margin: 0 !important;
    margin-block: 0 !important;
    border: 0 !important;
    border-right: 1px solid var(--pct-divider) !important;
    border-bottom: 1px solid var(--pct-divider) !important;
    vertical-align: middle;
    box-sizing: border-box;
}

/* No exterior border on the right or bottom edge. */
.providence-comparison-table tr > *:last-child {
    border-right: 0 !important;
}

.providence-comparison-table tbody tr:last-child > * {
    border-bottom: 0 !important;
}

.providence-comparison-table thead th {
    text-align: center;
    color: var(--pct-heading-color);
    font-weight: 400;
    background: var(--pct-table-bg);
}

.providence-comparison-table .feature-column {
    width: var(--pct-feature-width);
    text-align: left;
    color: var(--pct-feature-color);
    font-weight: 400;
}

.providence-comparison-table thead .feature-column {
    color: inherit;
    background: var(--pct-table-bg);
}

.providence-comparison-table td {
    text-align: center;
    color: var(--pct-body-color);
}

/* Zebra rows: first data row is gray, second is white, and so on. */
.providence-comparison-table tbody tr:nth-child(odd) > th:not(.providence-column),
.providence-comparison-table tbody tr:nth-child(odd) > td:not(.providence-column) {
    background: var(--pct-row-alt-bg);
}

.providence-comparison-table tbody tr:nth-child(even) > th:not(.providence-column),
.providence-comparison-table tbody tr:nth-child(even) > td:not(.providence-column) {
    background: var(--pct-table-bg);
}

.providence-comparison-table .providence-column {
    color: var(--pct-providence-color);
    background: var(--pct-providence-bg) !important;
    text-align: center;
}

.providence-comparison-table tbody .providence-column {
    height: 78px;
}

.providence-comparison-icon {
    display: block;
    width: auto;
    max-width: 28px;
    max-height: 36px;
    margin: 0 auto 5px;
    object-fit: contain;
}

.providence-comparison-swipe-hint {
    display: none;
    margin: 0 0 12px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Neutralize common reset/theme margins inside the final cells too. */
.providence-comparison-table th > :first-child,
.providence-comparison-table td > :first-child {
    margin-block-start: 0 !important;
}

.providence-comparison-table th > :last-child,
.providence-comparison-table td > :last-child {
    margin-block-end: 0 !important;
    margin-bottom: 0 !important;
}

/* Keep WordPress accessibility helper available even if theme does not define it. */
.providence-comparison-table .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 767px) {

    .providence-comparison-swipe-hint {
        display: block;
    }

    .providence-comparison-table-wrap {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        overscroll-behavior-x: contain;
    }

    .providence-comparison-table {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }

    .providence-comparison-table .feature-column {
        width: var(--pct-mobile-feature);
        min-width: var(--pct-mobile-feature);
        max-width: var(--pct-mobile-feature);
    }

    .providence-comparison-table .providence-column {
        width: var(--pct-mobile-providence);
        min-width: var(--pct-mobile-providence);
    }

    .providence-comparison-table thead th:not(.feature-column):not(.providence-column),
    .providence-comparison-table tbody td:not(.providence-column) {
        width: var(--pct-mobile-other);
        min-width: var(--pct-mobile-other);
    }

    .providence-comparison-widget.has-sticky-feature .feature-column {
        position: sticky;
        left: 0;
        z-index: 4;
        box-shadow: 8px 0 14px -14px rgba(0, 0, 0, 0.45);
    }

    .providence-comparison-widget.has-sticky-feature thead .feature-column {
        z-index: 6;
        background: var(--pct-table-bg);
    }

    .providence-comparison-widget.has-sticky-feature tbody tr:nth-child(odd) .feature-column {
        background: var(--pct-row-alt-bg);
    }

    .providence-comparison-widget.has-sticky-feature tbody tr:nth-child(even) .feature-column {
        background: var(--pct-table-bg);
    }
}
