/* =========================================================
   PLAN COMPARISON - MODERN COMPACT GLOBAL VERSION
   Replace assets/css/plan_comparison.css with this file.
   Reusable on cPanel / Plesk / DirectAdmin / other plan pages.
   ========================================================= */

:root {
    --pc-blue: #0d6efd;
    --pc-blue-dark: #0b4eaa;
    --pc-cyan: #55d8ff;
    --pc-purple: #7862e8;

    --pc-bg: #ffffff;
    --pc-row: #ffffff;
    --pc-row-alt: #f8fbff;
    --pc-business: #f0f6ff;

    --pc-border: #d9e5f2;
    --pc-heading: #0b2b52;
    --pc-text: #5a6a7f;

    --pc-success: #15b878;
    --pc-danger: #e65b6a;

    --pc-radius: 18px;
}


/* =========================================================
   WRAPPER
   ========================================================= */

.comparison-section {
    position: relative;
    background: transparent;
}

.comparison-table {
    margin: 0;
    padding: 0;
}

.plan-comparison-table-responsive {
    position: relative;

    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);

    background: var(--pc-bg);

    box-shadow:
        0 12px 32px rgba(8, 43, 92, .08),
        0 3px 10px rgba(8, 43, 92, .04);

    -webkit-overflow-scrolling: touch;
}


/* Subtle top accent */
.plan-comparison-table-responsive::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--pc-cyan) 0%,
            var(--pc-blue) 52%,
            var(--pc-purple) 100%
        );

    z-index: 3;
}


/* =========================================================
   TABLE BASE
   ========================================================= */

.plan-comparison-table {
    width: 100%;
    min-width: 900px;

    margin: 0 !important;

    table-layout: fixed;

    border-collapse: separate;
    border-spacing: 0;

    background: var(--pc-bg);
}

.plan-comparison-table td {
    vertical-align: middle;

    border-right: 1px solid var(--pc-border);
    border-bottom: 1px solid var(--pc-border);
}

.plan-comparison-table td:last-child {
    border-right: 0;
}

.plan-comparison-table tbody tr:last-child td {
    border-bottom: 0;
}


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

.plan-comparison-header-row {
    background:
        linear-gradient(
            110deg,
            #0b4eaa 0%,
            #176fe5 50%,
            #6659d9 100%
        );
}

.plan-comparison-header-row td {
    position: relative;

    height: 68px;
    padding: 14px 12px !important;

    color: #ffffff !important;

    border-right-color: rgba(255, 255, 255, .17);
    border-bottom: 0 !important;

    font-weight: 700;
}

.plan-comparison-feature-header {
    width: 29%;
    min-width: 225px;

    padding-left: 18px !important;

    font-size: .98rem;
}

.plan-comparison-plan-header .h5 {
    display: block;

    margin: 0;

    color: #ffffff !important;

    font-size: 1rem;
    font-weight: 760;

    line-height: 1.2;
}


/* =========================================================
   BUSINESS / FEATURED COLUMN
   4th column = Business
   ========================================================= */

.plan-comparison-header-row > td:nth-child(4) {
    padding-top: 31px !important;

    background:
        linear-gradient(
            145deg,
            #087cff 0%,
            #4e68ea 100%
        ) !important;

    box-shadow:
        inset 1px 0 rgba(255,255,255,.18),
        inset -1px 0 rgba(255,255,255,.18);
}

.plan-comparison-header-row > td:nth-child(4)::before {
    content: "Most Popular";

    position: absolute;
    top: 7px;
    left: 50%;

    transform: translateX(-50%);

    padding: 4px 10px;

    border-radius: 999px;

    background: #6ce1ff;
    color: #06356f;

    box-shadow:
        0 4px 12px rgba(0,0,0,.14);

    font-size: 9px;
    font-weight: 850;
    line-height: 1;

    letter-spacing: .35px;
    white-space: nowrap;
    text-transform: uppercase;

    z-index: 2;
}


/* =========================================================
   BODY ROWS - COMPACT
   ========================================================= */

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row) td {

    height: 48px;

    padding: 10px 12px;

    background: var(--pc-row);
    color: var(--pc-text);

    font-size: .88rem;
    line-height: 1.3;
}

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):nth-child(odd) td {
    background: var(--pc-row-alt);
}


/* Featured Business tint */
.plan-comparison-table tbody
tr:not(.plan-comparison-header-row) td:nth-child(4) {
    background: var(--pc-business);
}

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):nth-child(odd) td:nth-child(4) {
    background: #eaf3ff;
}


/* Feature labels */
.plan-comparison-table tbody
tr:not(.plan-comparison-header-row) td:first-child {

    padding-left: 18px;

    color: var(--pc-heading);

    font-weight: 690;
    text-align: left;
}


/* Hover */
.plan-comparison-table tbody
tr:not(.plan-comparison-header-row) {
    transition: background .18s ease;
}

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):hover td {
    background: #edf6ff;
}

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):hover td:nth-child(4) {
    background: #dfeeff;
}


/* =========================================================
   CHECK / CROSS ICONS
   ========================================================= */

.plan-comparison-check,
.plan-comparison-cross {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 27px;
    height: 27px;

    border-radius: 50%;

    color: #ffffff !important;

    font-size: 12px;

    animation: none !important;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.plan-comparison-check {
    background:
        linear-gradient(145deg, #1bc986, #11a96e);

    box-shadow:
        0 4px 10px rgba(21, 184, 120, .20);
}

.plan-comparison-cross {
    background:
        linear-gradient(145deg, #ed6a78, #d94d5d);

    box-shadow:
        0 4px 10px rgba(230, 91, 106, .18);
}

.plan-comparison-table td:hover
.plan-comparison-check,
.plan-comparison-table td:hover
.plan-comparison-cross {
    transform: scale(1.06);
}


/* =========================================================
   COLLAPSED / EXPANDED ROWS
   ========================================================= */

.additional-feature {
    display: none;
}

.additional-feature.expanded {
    display: table-row;
}

.additional-feature.collapsing {
    display: table-row !important;
}


/* =========================================================
   BUTTON AREA - REDUCED SPACING
   ========================================================= */

.button-container {
    margin: 0 !important;
    padding: 20px 0 4px !important;

    text-align: center;
}

.toggle-btn {
    min-width: 190px;
    min-height: 43px;

    padding: 10px 22px;

    border: 0;
    border-radius: 999px;

    color: #ffffff;

    font-size: .87rem;
    font-weight: 720;

    cursor: pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

#viewMoreBtn {
    background:
        linear-gradient(
            100deg,
            #0d6efd 0%,
            #5366e8 55%,
            #7862e8 100%
        );

    box-shadow:
        0 8px 18px rgba(64, 91, 221, .20);
}

#showLessBtn {
    background:
        linear-gradient(
            100deg,
            #42546c,
            #27384f
        );
}

.toggle-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 11px 22px rgba(64, 91, 221, .25);
}


/* =========================================================
   DARK MODE
   ========================================================= */

html[data-theme="dark"] {
    --pc-bg: #101a2b;
    --pc-row: #111c2e;
    --pc-row-alt: #142136;
    --pc-business: #142945;

    --pc-border: #2d4059;
    --pc-heading: #f1f5f9;
    --pc-text: #cbd5e1;
}

html[data-theme="dark"]
.plan-comparison-table-responsive {
    box-shadow:
        0 12px 32px rgba(0,0,0,.25);
}

html[data-theme="dark"]
.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):nth-child(odd) td:nth-child(4) {
    background: #17304f;
}

html[data-theme="dark"]
.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):hover td {
    background: #192a42;
}

html[data-theme="dark"]
.plan-comparison-table tbody
tr:not(.plan-comparison-header-row):hover td:nth-child(4) {
    background: #1a3a61;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .plan-comparison-table-responsive {
        border-radius: 14px;

        scrollbar-width: thin;
        scrollbar-color: #5e6ee8 #dbe6f3;
    }

    .plan-comparison-table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .plan-comparison-table-responsive::-webkit-scrollbar-track {
        background: #dbe6f3;
    }

    .plan-comparison-table-responsive::-webkit-scrollbar-thumb {
        border-radius: 999px;

        background:
            linear-gradient(
                90deg,
                #0d6efd,
                #7862e8
            );
    }

    .plan-comparison-table {
        min-width: 690px;
    }

    .plan-comparison-table td:first-child {
        position: sticky;
        left: 0;

        width: 170px;
        min-width: 170px;

        z-index: 5;

        box-shadow:
            5px 0 12px rgba(8,43,92,.07);
    }

    .plan-comparison-header-row td:first-child {
        z-index: 15;

        background: #0b4eaa !important;
    }

    .plan-comparison-table tbody
    tr:not(.plan-comparison-header-row) td:first-child {
        background: var(--pc-row) !important;
    }

    .plan-comparison-table tbody
    tr:not(.plan-comparison-header-row):nth-child(odd) td:first-child {
        background: var(--pc-row-alt) !important;
    }

    .plan-comparison-table td:not(:first-child) {
        width: 128px;
        min-width: 128px;
    }

    .plan-comparison-header-row td {
        height: 62px;
        padding: 11px 8px !important;
    }

    .plan-comparison-header-row > td:nth-child(4) {
        padding-top: 28px !important;
    }

    .plan-comparison-plan-header .h5 {
        font-size: .87rem;
    }

    .plan-comparison-table tbody
    tr:not(.plan-comparison-header-row) td {
        height: 44px;

        padding: 8px 7px;

        font-size: .77rem;
    }

    .plan-comparison-table tbody
    tr:not(.plan-comparison-header-row) td:first-child {
        padding-left: 10px;

        font-size: .76rem;
    }

    .plan-comparison-check,
    .plan-comparison-cross {
        width: 24px;
        height: 24px;

        font-size: 10px;
    }

    .button-container {
        padding-top: 16px !important;
    }

    .toggle-btn {
        min-width: 175px;
        min-height: 40px;

        padding: 9px 18px;

        font-size: .82rem;
    }
}


@media (max-width: 480px) {

    .plan-comparison-table {
        min-width: 650px;
    }

    .plan-comparison-table td:first-child {
        width: 158px;
        min-width: 158px;
    }

    .plan-comparison-table td:not(:first-child) {
        width: 121px;
        min-width: 121px;
    }

    .plan-comparison-header-row > td:nth-child(4)::before {
        top: 6px;

        padding: 4px 7px;

        font-size: 8px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .plan-comparison-check,
    .plan-comparison-cross,
    .toggle-btn {
        transition: none;
    }
}

/* =========================================================
   GLOBAL PLAN TABLE — COMPACT SPACING + STATUS ICONS
   Applies to every page using .plan-comparison-table.
   ========================================================= */

/* Slightly tighter table footprint */
.plan-comparison-table {
    min-width: 820px;
}

.plan-comparison-header-row td {
    height: 58px !important;
    padding: 10px 10px !important;
}

.plan-comparison-feature-header {
    min-width: 210px;
    padding-left: 14px !important;
}

.plan-comparison-header-row > td:nth-child(4) {
    padding-top: 27px !important;
}

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row) td {
    height: 40px !important;
    padding: 7px 10px !important;
    font-size: .85rem;
    line-height: 1.22;
}

.plan-comparison-table tbody
tr:not(.plan-comparison-header-row) td:first-child {
    padding-left: 14px !important;
}

/* ---------------------------------------------------------
   Replace Font Awesome table status circles with the same
   small dedicated green/red image assets on every table.
   --------------------------------------------------------- */

.plan-comparison-table .plan-comparison-check,
.plan-comparison-table i.fa-check-circle {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background-color: transparent !important;
    background-image: url('../img/icons/table-check.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    color: transparent !important;
    font-size: 0 !important;

    box-shadow: none !important;
    filter: none !important;

    animation: none !important;
    transform: none !important;
    transition: none !important;

    vertical-align: middle;
}

.plan-comparison-table .plan-comparison-cross,
.plan-comparison-table i.fa-xmark-circle,
.plan-comparison-table i.fa-times-circle {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background-color: transparent !important;
    background-image: url('../img/icons/table-cross.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    color: transparent !important;
    font-size: 0 !important;

    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;

    animation: none !important;
    transform: none !important;
    transition: none !important;

    vertical-align: middle;
}

/* Remove the Font Awesome glyph itself */
.plan-comparison-table .plan-comparison-check::before,
.plan-comparison-table .plan-comparison-cross::before,
.plan-comparison-table i.fa-check-circle::before,
.plan-comparison-table i.fa-xmark-circle::before,
.plan-comparison-table i.fa-times-circle::before {
    content: none !important;
    display: none !important;
}

/* Do not enlarge icons on row hover */
.plan-comparison-table td:hover .plan-comparison-check,
.plan-comparison-table td:hover .plan-comparison-cross,
.plan-comparison-table td:hover i.fa-check-circle,
.plan-comparison-table td:hover i.fa-xmark-circle,
.plan-comparison-table td:hover i.fa-times-circle {
    transform: none !important;
    box-shadow: none !important;
}

/* Reduce space below the table */
.button-container {
    padding: 14px 0 2px !important;
}

.toggle-btn {
    min-height: 39px;
    padding: 8px 20px;
    font-size: .84rem;
}

/* Compact mobile table without changing behavior */
@media (max-width: 768px) {
    .plan-comparison-table {
        min-width: 640px;
    }

    .plan-comparison-table td:first-child {
        width: 155px;
        min-width: 155px;
    }

    .plan-comparison-header-row td {
        height: 54px !important;
        padding: 8px 8px !important;
    }

    .plan-comparison-table tbody
    tr:not(.plan-comparison-header-row) td {
        height: 38px !important;
        padding: 6px 8px !important;
        font-size: .82rem;
    }

    .plan-comparison-table tbody
    tr:not(.plan-comparison-header-row) td:first-child {
        padding-left: 10px !important;
    }

    .plan-comparison-table .plan-comparison-check,
    .plan-comparison-table .plan-comparison-cross,
    .plan-comparison-table i.fa-check-circle,
    .plan-comparison-table i.fa-xmark-circle,
    .plan-comparison-table i.fa-times-circle {
        width: 15px !important;
        height: 15px !important;
        min-width: 15px;
        min-height: 15px;
    }
}

