.emi-calculator {
    margin: 20px;
    padding: 1rem;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 25px rgb(0 0 0 / 10%);
}

/* HEADER */
.emi-header h2 {
    padding: 0;
}

.emi-header p {
    margin: 6px 0 22px;
    color: #6b7280;
    padding: 0;
}

/* LAYOUT */
.emi-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    margin-bottom: 1rem;
}


/* DONUT */
.emi-donut {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: conic-gradient(#fd3753 0deg,
            #fd3753 var(--principal-deg, 0deg),
            #f59e0b var(--principal-deg, 0deg),
            #f59e0b 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emi-donut-inner {
    width: 150px;
    height: 150px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #eee;
}

.center-label {
    font-size: 12px;
    color: #6b7280;
}

.center-value {
    font-size: 20px;
    font-weight: 600;
}

.emiCalc_cta {
    display: flex;
    text-align: center;
    margin-block: 2rem;
}

.emiCalc_cta a {
    background-color: #fd3753;
    padding: 12px 1rem;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    width: 100%;
}

/* BREAKDOWN */
.emi-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.emi-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
}

.principal-row {
    background: #FFF1F3;
}

.interest-row {
    background: #FFFBEB;
}

.emi-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.principal_dot {
    background: #fd3753;
}

.dot.interest_dot {
    background: #f59e0b;
}

/* RIGHT */
.emi-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* INPUT BLOCK */
.emi-field {
    background: #F9FAFB;
    padding: 16px;
    border-radius: 16px;
}

.emi-field label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 8px;
}

.emi-field input[type=number],
.emi-field input[type=text] {
    width: 120px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-weight: 600;
    text-align: right;
}

/* RANGE */
.emi-calculator input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(to right,
            #fd3753 0%,
            #fd3753 var(--fill),
            #e5e7eb var(--fill),
            #e5e7eb 100%);
}

.emi-calculator input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fd3753;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(253, 55, 83, .4);
}

/* TABLE */
.emi-table {
    width: 100%;
    margin-inline: auto;
    overflow-x: scroll;
    scroll-behavior: smooth;
}

.emi-table thead {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.emi-table tbody {
    display: block;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
}

.emi-table thead tr,
.emi-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.rate-wrap {
    position: relative;
}

.rate-wrap input {
    padding-right: 30px;
}

.rate-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 14px;
    pointer-events: none;
}

@media(max-width:768px) {
    .emi-calculator {
        margin: 0;
    }

    .emi-layout {
        grid-template-columns: 1fr;
    }

    .emi-left {
        position: relative;
    }

    .emi-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}