.mlc-wrap{
    direction:rtl !important;
    text-align:right !important;
    width:100%;
    max-width:100%;
    margin:0 auto;
    font-family:Tahoma, Arial, sans-serif;
    background:#f7fbf8;
    border:1px solid #dfebe2;
    border-radius:34px;
    overflow:hidden;
    box-shadow:0 20px 60px rgba(54,93,65,.08);
    position:relative;
    isolation:isolate;
}

.mlc-wrap,
.mlc-wrap *{
    box-sizing:border-box;
}

.mlc-grid{
    display:grid;
    grid-template-columns:minmax(0, 1.08fr) minmax(0, .92fr);
    width:100%;
    min-height:540px;
}

.mlc-panel{
    padding:34px 30px;
    min-width:0;
}

.mlc-controls{
    background:#ffffff;
    position:relative;
    z-index:2;
}

.mlc-results{
    background:linear-gradient(180deg,#eef5ef 0%,#f7faf8 100%);
    border-right:1px solid #e2ece5;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:18px;
    position:relative;
    z-index:1;
}

.mlc-calculator-box{
    width:100%;
    max-width:100%;
}

.mlc-summary-card{
    width:100%;
    max-width:100%;
    background:#edf3ee;
    border:1px solid #dde7df;
    border-radius:28px;
    padding:18px 22px;
    box-shadow:
        inset 8px 8px 18px rgba(210,220,213,.52),
        inset -8px -8px 18px rgba(255,255,255,.92),
        0 8px 20px rgba(75,111,84,.05);
}

.mlc-summary-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:22px 8px;
    border-bottom:1px solid #d9e4db;
    color:#173922;
    font-size:17px;
    font-weight:800;
}

.mlc-summary-row:last-child{
    border-bottom:none;
}

.mlc-summary-row strong{
    color:#157347;
    font-size:20px;
    font-weight:900;
    text-align:left;
    line-height:1.8;
    word-break:break-word;
}

.mlc-info-box{
    width:100%;
    background:linear-gradient(180deg,#ffffff 0%,#f4fbf6 100%);
    border:1px solid #dceadf;
    border-radius:24px;
    padding:18px 18px;
    color:#345244;
    font-size:14px;
    line-height:2;
    box-shadow:
        0 8px 20px rgba(74,118,84,.05),
        inset 0 1px 0 rgba(255,255,255,.9);
    word-break:break-word;
    overflow-wrap:anywhere;
}

.mlc-info-box p{
    margin:0 0 10px;
}

.mlc-info-box p:last-child{
    margin-bottom:0;
}

.mlc-field{
    margin-bottom:36px;
}

.mlc-field:last-child{
    margin-bottom:0;
}

.mlc-label-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:18px;
}

.mlc-label-row label,
.mlc-block-title{
    color:#173460;
    font-size:18px;
    font-weight:900;
    line-height:1.9;
}

.mlc-amount-top{
    display:flex;
    align-items:flex-end;
    gap:8px;
    color:#ff9800;
    font-weight:900;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.mlc-amount-display{
    font-size:36px;
    line-height:1;
}

.mlc-amount-top small{
    color:#768396;
    font-size:14px;
    font-weight:700;
    margin-bottom:4px;
}

.mlc-range{
    width:100%;
    direction:rtl;
    appearance:none;
    -webkit-appearance:none;
    height:10px;
    border-radius:999px;
    outline:none;
    background:linear-gradient(90deg,#dbe7dd 0%,#dbe7dd 50%,#ff9800 50%,#ff9800 100%);
    border:none;
}

.mlc-range::-webkit-slider-thumb{
    appearance:none;
    -webkit-appearance:none;
    width:26px;
    height:26px;
    border-radius:50%;
    background:#fff;
    border:3px solid #ff9800;
    box-shadow:0 8px 18px rgba(255,152,0,.22);
    cursor:pointer;
}

.mlc-range::-moz-range-thumb{
    width:26px;
    height:26px;
    border-radius:50%;
    background:#fff;
    border:3px solid #ff9800;
    cursor:pointer;
}

.mlc-range-labels{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-top:12px;
    color:#8b94a6;
    font-size:13px;
    font-weight:700;
    direction:rtl;
    flex-wrap:wrap;
}

/* راست = حداقل ، چپ = حداکثر */
.mlc-range-labels span:first-child{
    order:2;
}
.mlc-range-labels span:last-child{
    order:1;
}

.mlc-type-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px;
    margin-top:16px;
    position:relative;
    z-index:3;
}

.mlc-type-item{
    position:relative !important;
    display:flex !important;
    flex-direction:row-reverse !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:14px !important;
    min-height:84px;
    width:100%;
    padding:18px 18px !important;
    border-radius:22px !important;
    cursor:pointer;
    background:#eef4f0 !important;
    background-image:none !important;
    border:1px solid #dfe7e1 !important;
    box-shadow:
        8px 8px 18px rgba(214,223,216,.95),
        -8px -8px 18px rgba(255,255,255,.95) !important;
    transition:.25s ease;
    min-width:0;
    overflow:hidden !important;
    isolation:isolate;
    outline:none !important;
    text-align:right !important;
}

.mlc-type-item *,
.mlc-type-item *::before,
.mlc-type-item *::after{
    background-image:none !important;
}

.mlc-type-item::before,
.mlc-type-item::after,
.mlc-type-item input::before,
.mlc-type-item input::after,
.mlc-type-item span::before,
.mlc-type-item span::after,
.mlc-type-item svg::before,
.mlc-type-item svg::after,
.mlc-type-item label::before,
.mlc-type-item label::after,
.mlc-type-item button::before,
.mlc-type-item button::after{
    content:none !important;
    display:none !important;
    background:none !important;
    background-color:transparent !important;
    box-shadow:none !important;
    border:none !important;
}

.mlc-wrap .mlc-type-item,
.mlc-wrap .mlc-type-item:focus,
.mlc-wrap .mlc-type-item:active,
.mlc-wrap .mlc-type-item:focus-visible,
.mlc-wrap .mlc-type-item *,
.mlc-wrap .mlc-type-item *:focus,
.mlc-wrap .mlc-type-item *:active,
.mlc-wrap .mlc-type-item *:focus-visible{
    outline:none !important;
}

.mlc-type-item.active{
    background:linear-gradient(180deg,#edfbf1 0%,#e2f6e9 100%) !important;
    border-color:#b9dfc4 !important;
    box-shadow:
        inset 6px 6px 14px rgba(209,231,216,.85),
        inset -6px -6px 14px rgba(255,255,255,.95),
        0 10px 20px rgba(32,125,73,.07) !important;
}

.mlc-type-item input{
    position:absolute !important;
    opacity:0 !important;
    pointer-events:none !important;
    width:0 !important;
    height:0 !important;
    margin:0 !important;
    padding:0 !important;
    border:none !important;
    background:transparent !important;
    box-shadow:none !important;
    appearance:none !important;
    -webkit-appearance:none !important;
}

.mlc-type-icon{
    width:50px;
    height:50px;
    min-width:50px;
    max-width:50px;
    min-height:50px;
    max-height:50px;
    border-radius:16px;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    color:#13844a !important;
    flex:0 0 50px;
    background:linear-gradient(180deg,#f8fff9 0%,#e3f6ea 100%) !important;
    box-shadow:
        4px 4px 10px rgba(203,217,207,.75),
        -4px -4px 10px rgba(255,255,255,.98) !important;
    position:relative;
    z-index:2;
    border:none !important;
    outline:none !important;
}

.mlc-type-icon svg{
    width:22px;
    height:22px;
    display:block;
    background:none !important;
    box-shadow:none !important;
    border:none !important;
    flex:0 0 auto;
}

.mlc-type-text{
    flex:1 1 auto;
    min-width:0;
    display:block;
    color:#19345a !important;
    font-size:18px;
    font-weight:900;
    line-height:1.7;
    word-break:normal;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    position:relative;
    z-index:2;
    background:none !important;
    border:none !important;
    box-shadow:none !important;
    text-align:right !important;
}

.mlc-month-field{
    margin-top:2px;
}

.mlc-month-switcher{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:22px;
    width:100%;
}

.mlc-arrow{
    width:46px;
    height:46px;
    min-width:46px;
    border:none;
    border-radius:12px;
    background:linear-gradient(180deg,#18a34a 0%,#22c55e 100%);
    color:#fff;
    font-size:28px;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow:0 10px 20px rgba(34,197,94,.22);
    transition:.2s ease;
    flex:0 0 46px;
}

.mlc-arrow:hover{
    transform:translateY(-1px);
}

.mlc-arrow:disabled{
    opacity:.45;
    cursor:not-allowed;
    transform:none;
    box-shadow:none;
}

.mlc-month-center{
    flex:1 1 auto;
    display:grid;
    grid-template-columns:minmax(54px, 1fr) auto minmax(54px, 1fr);
    align-items:center;
    gap:12px;
    min-width:0;
}

.mlc-month-side{
    color:#c9ced8;
    font-size:17px;
    font-weight:700;
    text-align:center;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.mlc-month-current{
    min-width:132px;
    max-width:100%;
    height:54px;
    border-radius:14px;
    border:1.5px solid #9bc8a7;
    background:#f6fcf7;
    color:#1b8a4d;
    font-size:20px;
    font-weight:900;
    box-shadow:
        0 8px 16px rgba(72,114,84,.05),
        inset 0 1px 0 rgba(255,255,255,.8);
    cursor:pointer;
    padding:0 16px;
    white-space:nowrap;
}

@media (max-width: 1100px){
    .mlc-panel{
        padding:28px 22px;
    }

    .mlc-summary-row{
        padding:18px 4px;
    }
}

@media (max-width: 980px){
    .mlc-grid{
        grid-template-columns:1fr;
    }

    .mlc-results{
        border-right:none;
        border-top:1px solid #e2ece5;
    }

    .mlc-panel{
        padding:24px 18px;
    }

    .mlc-wrap{
        border-radius:26px;
    }
}

@media (max-width: 767px){
    .mlc-wrap{
        border-radius:22px;
    }

    .mlc-panel{
        padding:18px 14px;
    }

    .mlc-summary-card{
        border-radius:20px;
        padding:14px;
    }

    .mlc-summary-row{
        font-size:14px;
        padding:14px 2px;
        gap:10px;
    }

    .mlc-summary-row strong{
        font-size:15px;
    }

    .mlc-info-box{
        border-radius:18px;
        padding:14px;
        font-size:13px;
        line-height:1.9;
    }

    .mlc-label-row{
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
        margin-bottom:14px;
    }

    .mlc-label-row label,
    .mlc-block-title{
        font-size:16px;
        line-height:1.8;
    }

    .mlc-amount-top{
        width:100%;
        justify-content:flex-start;
        align-items:center;
        gap:6px;
    }

    .mlc-amount-display{
        font-size:28px;
    }

    .mlc-amount-top small{
        font-size:12px;
        margin-bottom:0;
    }

    .mlc-range{
        height:9px;
    }

    .mlc-range::-webkit-slider-thumb{
        width:22px;
        height:22px;
    }

    .mlc-range::-moz-range-thumb{
        width:22px;
        height:22px;
    }

    .mlc-range-labels{
        font-size:12px;
        gap:8px;
    }

    .mlc-type-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
        gap:10px !important;
    }

    .mlc-type-item{
        min-height:72px !important;
        padding:12px 10px !important;
        border-radius:16px !important;
        gap:8px !important;
        flex-direction:row-reverse !important;
        justify-content:space-between !important;
        align-items:center !important;
        text-align:right !important;
    }

    .mlc-type-icon{
        width:38px;
        height:38px;
        min-width:38px;
        max-width:38px;
        min-height:38px;
        max-height:38px;
        flex:0 0 38px;
        border-radius:12px;
    }

    .mlc-type-icon svg{
        width:18px;
        height:18px;
    }

    .mlc-type-text{
        font-size:14px;
        line-height:1.5;
        text-align:right !important;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .mlc-month-switcher{
        gap:10px;
        margin-top:16px;
    }

    .mlc-arrow{
        width:40px;
        height:40px;
        min-width:40px;
        font-size:24px;
        border-radius:10px;
        flex:0 0 40px;
    }

    .mlc-month-center{
        grid-template-columns:minmax(34px, 1fr) minmax(96px, auto) minmax(34px, 1fr);
        gap:8px;
    }

    .mlc-month-side{
        font-size:12px;
        min-width:0;
    }

    .mlc-month-current{
        min-width:96px;
        height:44px;
        font-size:15px;
        border-radius:12px;
        padding:0 10px;
    }

    .mlc-field{
        margin-bottom:24px;
    }
}

@media (max-width: 420px){
    .mlc-wrap{
        border-radius:18px;
    }

    .mlc-panel{
        padding:14px 12px;
    }

    .mlc-summary-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .mlc-summary-row strong{
        width:100%;
        text-align:right;
    }

    .mlc-type-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
        gap:8px !important;
    }

    .mlc-type-item{
        min-height:66px !important;
        padding:10px 8px !important;
        gap:6px !important;
        flex-direction:row-reverse !important;
        justify-content:space-between !important;
        align-items:center !important;
    }

    .mlc-type-icon{
        width:34px;
        height:34px;
        min-width:34px;
        max-width:34px;
        min-height:34px;
        max-height:34px;
        flex:0 0 34px;
    }

    .mlc-type-icon svg{
        width:16px;
        height:16px;
    }

    .mlc-type-text{
        font-size:13px;
        text-align:right !important;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .mlc-month-switcher{
        align-items:center;
    }

    .mlc-month-center{
        grid-template-columns:1fr;
        justify-items:center;
    }

    .mlc-month-side{
        display:none;
    }

    .mlc-month-current{
        width:100%;
        min-width:0;
        max-width:180px;
    }

    .mlc-amount-display{
        font-size:24px;
    }
}