.tc-compare-table-wrapper {
    overflow-x: auto;
}

.tc-compare-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 600px;
    border: none;
}

.tc-compare-table th,
.tc-compare-table td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
}

/* Hide Features Header Cell */
.tc-compare-hide-features-yes .tc-feature-column-header {
    visibility: hidden;
    border: none !important;
    background: transparent !important;
}

/* Header Styling */
.tc-compare-table thead th {
    background-color: #f9f9f9;
    font-weight: bold;
}

.tc-plan-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.tc-plan-badge {
    background-color: #ff9800;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    position: absolute;
    top: -30px;
}

.tc-plan-name {
    font-size: 1.2em;
    display: block;
}

.tc-plan-price-box {
    margin: 10px 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.tc-plan-currency {
    font-size: 0.8em;
}

.tc-plan-price {
    font-size: 2em;
    font-weight: bold;
}

.tc-plan-period {
    font-size: 0.8em;
    color: #777;
}

.tc-plan-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
}

.tc-plan-button:hover {
    background-color: #005177;
}

/* Feature Column Styling */
.tc-feature-name {
    text-align: left !important;
    font-weight: 600;
    background-color: transparent;
}

.tc-feature-title {
    font-weight: 600;
}

.tc-feature-desc {
    font-size: 0.85em;
    font-weight: normal;
    color: #777;
    margin-top: 4px;
    line-height: 1.2;
}

/* Icons */
.tc-icon-check,
.tc-icon-cross {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tc-icon-check svg,
.tc-icon-cross svg {
    display: block;
}

.tc-icon-check {
    color: #27ae60;
}

.tc-icon-cross {
    color: #e74c3c;
}

/* Highlighted Plan */
.tc-plan-highlight {
    background-color: #fffef0 !important;
    border-left: 2px solid #ff9800 !important;
    border-right: 2px solid #ff9800 !important;
}

thead th.tc-plan-highlight {
    border-top: 2px solid #ff9800 !important;
}

/* Sticky Header */
.tc-compare-sticky-header-yes .tc-compare-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Ensure sticky header works inside overflow container */
.tc-compare-sticky-header-yes .tc-compare-table {
    border-collapse: separate;
    border-spacing: 0;
}

/* Sticky Column */
.tc-compare-sticky-column-yes .tc-feature-name,
.tc-compare-sticky-column-yes .tc-feature-column-header {
    position: sticky;
    left: 0;
    z-index: 5;
}

.tc-compare-sticky-column-yes thead th.tc-feature-column-header {
    z-index: 15;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .tc-compare-table-wrapper {
        display: none;
    }

    .tc-compare-mobile-tabs {
        display: flex;
        overflow-x: auto;
        gap: 5px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }

    .tc-mobile-tab-btn {
        padding: 10px 15px;
        background: #f9f9f9;
        white-space: nowrap;
        cursor: pointer;
        font-weight: 600;
        flex: 1;
        text-align: center;
        transition: all 0.3s;
    }

    .tc-mobile-tab-btn.active {
        background: #0073aa;
        color: #fff;
        border-color: #0073aa;
    }

    .tc-compare-mobile-cards {
        display: block;
    }

    .tc-mobile-plan-card {
        display: none;
        background: #fff;
    }

    .tc-mobile-plan-card.active {
        display: block;
    }

    .tc-mobile-plan-card.tc-plan-highlight {
        border-width: 2px;
        border-style: solid;
        border-color: #ff9800;
    }

    .tc-mobile-plan-card .tc-plan-header {
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .tc-mobile-features-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .tc-mobile-feature-item {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0;
        border-bottom: 1px dashed #eee;
    }

    .tc-mobile-feature-item:last-child {
        border-bottom: none;
    }

    .tc-mobile-feature-info {
        flex: 1;
        padding-right: 15px;
    }

    .tc-mobile-feature-value {
        font-weight: 600;
        min-width: 40px;
        text-align: right;
    }
}

@media (min-width: 768px) {

    .tc-compare-mobile-tabs,
    .tc-compare-mobile-cards {
        display: none;
    }
}

/* Collapsible Table Styles */
.tc-compare-table-container {
    position: relative;
    padding-bottom: 20px;
}

.tc-compare-table-container.tc-is-collapsed {
    padding-bottom: 70px;
}

.tc-compare-table-container.tc-is-collapsed .tc-feature-collapsible {
    display: none !important;
}

/* Fading style for the 4th row */
.tc-compare-table-container.tc-is-collapsed .tc-feature-fade-row>td,
.tc-compare-table-container.tc-is-collapsed .tc-feature-fade-row.tc-mobile-feature-item {
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    opacity: 0.6;
    /* Fallback for older browsers */
}

.tc-compare-expand-wrapper {
    text-align: center;
    position: relative;
    z-index: 20;
    margin-top: 10px;
}

.tc-compare-table-container.tc-is-collapsed .tc-compare-expand-wrapper {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    margin-top: 0;
}

.tc-compare-expand-btn {
    background-color: transparent !important;
    box-shadow: none;
    color: var(--e-global-color-primary) !important;
    font-family: var(--e-global-typography-text-font-family), Sans-serif;
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    line-height: var(--e-global-typography-text-line-height);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
}

.tc-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.tc-compare-expand-btn.is-expanded .tc-expand-icon {
    transform: rotate(180deg);
}

.tc-compare-expand-btn:hover {
    color: var(--e-global-color-accent) !important;
    background-color: transparent !important;
}