@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;1,600&display=swap');

body {
    background-color: #f6f8fa !important;
    font-family: "Sarabun", sans-serif !important;
    font-size: 14px !important;
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    color: #000 !important;
    word-wrap: break-word;
}

.compare-page-header {
    margin-top: 100px;
    margin-bottom: 15px;
}

.main-title {
    font-size: 24px;
    font-weight: 700;
    color: #001229;
    margin: 0 0 10px 0;
}

.compare-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;

}

.summary-card {

    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px 24px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .08);

}

.summary-card-primary {

    background: linear-gradient(135deg,
            #0057b8 0%,
            #0f3d7a 55%,
            #fbbf24 140%);

    color: #fff;
    border: none;

}

.summary-card:not(.summary-card-primary)::before {

    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 4px;

    background: #F4B400;

    z-index: 1;

}

.summary-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;

}

.summary-card-primary .summary-title {

    color: rgba(255, 255, 255, .92);

}

.summary-value {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;

}

.summary-card-primary .summary-value {

    color: #fff;

}

.summary-sub {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;

}

.summary-card-primary .summary-sub {

    color: rgba(255, 255, 255, .85);

}

/* Badge */

.summary-badge {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 12px;

    width: max-content;

    padding: 5px 12px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 700;

}

.summary-badge.up {

    background: #dcfce7;
    color: #15803d;

}

.summary-badge.down {

    background: #fee2e2;
    color: #dc2626;

}

/* Text Color */

.up {

    color: #198754;
    font-weight: 700;

}

.down {

    color: #dc2626;
    font-weight: 700;

}

.summary-empty {

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    height: 100%;

    text-align: center;

    color: #64748b;

}

.summary-empty i {

    font-size: 28px;

    color: #f59e0b;

    margin-bottom: 12px;

}

.summary-empty-title {

    font-size: 15px;

    font-weight: 700;

    margin-bottom: 6px;

}

.summary-empty-text {

    font-size: 14px;

    line-height: 1.5;

}

/*==================================================
Toolbar
==================================================*/

.ranking-toolbar-top {

    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;

    gap: 20px;

    flex-wrap: wrap;

}

.ranking-toolbar-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;

}

.ranking-toolbar-right {

    font-size: .9rem;
    color: #64748b;

}

.ranking-toolbar-right strong {

    color: #0f172a;
    font-weight: 700;

}


/*==================================================
Level Button
==================================================*/

.ranking-label {

    color: #475569;
    font-size: 13px;
    font-weight: 600;

}

.ranking-tab {

    border: 1px solid #d7dde6;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    transition: .2s;
    cursor: pointer;

}

.ranking-tab:hover {
    border-color: #f97316;
    color: #f97316;

}

.ranking-tab.active {
    background: #fff7ed;
    border-color: #f97316;
    color: #ea580c;

}


/*==================================================
Header
==================================================*/

.budget-ranking-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 18px;

    flex-wrap: wrap;

}


/*==================================================
Action Button
==================================================*/

.ranking-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ranking-filter {

    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #d7dde6;
    background: #fff;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    transition: .2s;
    cursor: pointer;
}

.ranking-filter:hover {
    border-color: #f97316;
    color: #ea580c;

}

.ranking-filter.active {
    background: #fff7ed;
    border-color: #f97316;
    color: #ea580c;
}


/*==================================================
Table
==================================================*/

.budget-ranking-table {

    overflow-x: auto;

}

.budget-ranking-table table {

    margin-bottom: 0;

}

.budget-ranking-table thead th {

    border-top: none;

    border-bottom: 1px solid #e5e7eb;

    color: #334155;

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;

}

.budget-ranking-table tbody td {

    border-color: #eef2f7;

    vertical-align: middle;

    padding-top: 10px;

    padding-bottom: 10px;

}


/*==================================================
Value Color
==================================================*/

.text-up {

    color: #15803d !important;

    font-weight: 700;

}

.text-down {

    color: #dc2626 !important;

    font-weight: 700;

}

#budget-ranking-card {
    max-height: 750px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: .5rem;
}

/* Scrollbar */
#budget-ranking-card::-webkit-scrollbar {
    width: 8px;
}

#budget-ranking-card::-webkit-scrollbar-thumb {
    background: #c9ced6;
    border-radius: 20px;
}

#budget-ranking-card::-webkit-scrollbar-thumb:hover {
    background: #9ea6b2;
}


/*==================================================
Responsive
==================================================*/

@media(max-width:1200px) {

    .compare-summary-row {

        grid-template-columns: repeat(2, 1fr);

    }

}

@media(max-width:768px) {

    .compare-summary-row {

        grid-template-columns: 1fr;

    }

    .summary-value {

        font-size: 1.2rem;

    }

    .ranking-toolbar-top {

        flex-direction: column;

        align-items: flex-start;

    }

    .budget-ranking-header {

        flex-direction: column;

    }

    .ranking-actions {

        width: 100%;

    }

    .ranking-filter {

        flex: 1;

        justify-content: center;

    }


}