/* =========================================================
   EXPENSE BREAKDOWN BODY
========================================================= */

.expense-breakdown-body {
    width: 100%;
    min-height: 380px;

    display: grid;
    grid-template-columns: 40% 60%;

    align-items: center;

    gap: 15px;

    padding: 25px 30px;

    box-sizing: border-box;
}


/* =========================================================
   CHART SIDE
========================================================= */

.expense-chart-side {
    width: 100%;
    min-width: 0;

    display: flex;
    justify-content: center;
    align-items: center;
}


/* =========================================================
   CHART WRAPPER
========================================================= */

.expense-chart-wrapper {
    position: relative;

    width: 190px;
    height: 190px;

    flex-shrink: 0;
}


.expense-chart-wrapper canvas {
    display: block !important;

    width: 190px !important;
    height: 190px !important;

    max-width: 190px !important;
    max-height: 190px !important;
}


/* =========================================================
   CENTER TEXT
========================================================= */

.expense-chart-center {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 130px;

    text-align: center;

    pointer-events: none;
}


.expense-chart-center strong {
    display: block;

    color: #ffffff;

    font-size: 18px;
    font-weight: 700;

    line-height: 1.2;

    white-space: nowrap;
}


.expense-chart-center span {
    display: block;

    margin-top: 4px;

    color: #94a3b8;

    font-size: 11px;
    font-weight: 500;
}


/* =========================================================
   LEGEND
========================================================= */

.expense-breakdown-legend {
    width: 100%;
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* =========================================================
   LEGEND ITEM
========================================================= */

.expense-legend-item {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        10px
        minmax(100px, 1fr)
        50px;

    align-items: center;

    column-gap: 10px;
}


/* =========================================================
   DOT
========================================================= */

.expense-dot {
    width: 10px;
    height: 10px;

    display: block;

    border-radius: 50%;
}


/* =========================================================
   LEGEND NAME
========================================================= */

.expense-name {
    min-width: 0;

    color: #ffffff;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.2;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   LEGEND VALUE
========================================================= */

.expense-legend-item strong {
    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.2;

    text-align: right;

    white-space: nowrap;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

    .expense-breakdown-body {
        grid-template-columns: 38% 62%;

        gap: 10px;

        padding-left: 20px;
        padding-right: 20px;
    }


    .expense-chart-wrapper {
        width: 170px;
        height: 170px;
    }


    .expense-chart-wrapper canvas {
        width: 170px !important;
        height: 170px !important;

        max-width: 170px !important;
        max-height: 170px !important;
    }


    .expense-name,
    .expense-legend-item strong {
        font-size: 11px;
    }

}