
/* =========================================
   KWICK FIN SOLUTIONS - EMI CALCULATOR
========================================= */

.kwick-emi-section {
    position: relative;
    padding: clamp(70px, 8vw, 105px) 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 5% 10%, rgba(22,166,161,.12), transparent 32%),
        radial-gradient(circle at 95% 90%, rgba(245,166,35,.08), transparent 30%),
        var(--primary-dark);
    color: #fff;
}

.kwick-emi-heading {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.kwick-emi-heading .section-eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: #56D5CD;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.kwick-emi-heading h2 {
    margin-bottom: 15px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1px;
}

.kwick-emi-heading h2 span {
    color: #56D5CD;
}

.kwick-emi-heading p {
    margin: 0;
    color: rgba(255,255,255,.7);
    font-size: 15px;
    line-height: 1.8;
}

/* Main Calculator */

.kwick-emi-wrapper {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    max-width: 1080px;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0,0,0,.2);
}

.emi-input-panel {
    padding: 42px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.emi-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 38px;
}

.emi-small-label {
    display: block;
    margin-bottom: 7px;
    color: var(--secondary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.emi-panel-heading h3 {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 23px;
    font-weight: 800;
}

.emi-heading-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--secondary);
    background: var(--secondary-light);
    border-radius: 15px;
    font-size: 22px;
}

/* Input Fields */

.emi-field {
    margin-bottom: 32px;
}

.emi-field-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.emi-field-top label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.emi-value-box {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 125px;
    padding: 9px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--text-primary);
}

.emi-value-box span {
    color: var(--secondary);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.emi-value-box input {
    width: 100%;
    min-width: 0;
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: none;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.emi-value-box input:focus {
    outline: none;
    box-shadow: none;
}

/* Range Slider */

.emi-field input[type="range"] {
    display: block;
    width: 100%;
    height: 6px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(
        to right,
        var(--secondary) 0%,
        var(--secondary) var(--range-progress, 30%),
        var(--border-color) var(--range-progress, 30%),
        var(--border-color) 100%
    );
    border-radius: 20px;
    outline: none;
    cursor: pointer;
}

.emi-field input[type="range"]::-webkit-slider-thumb {
    width: 19px;
    height: 19px;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 5px solid var(--secondary);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    cursor: grab;
}

.emi-field input[type="range"]::-moz-range-thumb {
    width: 11px;
    height: 11px;
    background: #fff;
    border: 5px solid var(--secondary);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    cursor: grab;
}

.emi-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 11px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}

.emi-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 13px 14px;
    color: var(--text-secondary);
    background: var(--bg-soft);
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.7;
}

.emi-note i {
    margin-top: 2px;
    color: var(--secondary);
    font-size: 15px;
}

/* Result Panel */

.emi-result-panel {
    padding: 42px;
    background: linear-gradient(150deg, #123B70, #0B2850 75%);
    color: #fff;
}

.emi-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255,255,255,.7);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.emi-result-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #56D5CD;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    font-size: 19px;
}

.emi-main-result {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    margin: 22px 0 28px;
    color: #fff;
}

.emi-currency {
    font-size: 25px;
    font-weight: 700;
}

.emi-main-result strong {
    font-family: var(--font-heading);
    font-size: clamp(35px, 4vw, 47px);
    font-weight: 800;
    letter-spacing: -1.5px;
    font-variant-numeric: tabular-nums;
}

.emi-per-month {
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.emi-result-divider {
    height: 1px;
    background: rgba(255,255,255,.15);
}

.emi-breakdown-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 26px 0 23px;
}

.emi-breakdown-heading h4 {
    margin: 0;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
}

.emi-breakdown-heading span {
    color: rgba(255,255,255,.55);
    font-size: 11px;
}

/* Donut Chart */

.emi-chart-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.emi-donut {
    display: grid;
    flex: 0 0 155px;
    width: 155px;
    height: 155px;
    place-items: center;
    background: conic-gradient(
        #56D5CD 0deg 270deg,
        #F5A623 270deg 360deg
    );
    border-radius: 50%;
    transform: rotate(-90deg);
}

.emi-donut-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 115px;
    height: 115px;
    background: #0D2D57;
    border-radius: 50%;
    transform: rotate(90deg);
}

.emi-donut-inner span {
    margin-bottom: 5px;
    color: rgba(255,255,255,.6);
    font-size: 10px;
}

.emi-donut-inner strong {
    max-width: 100px;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emi-legend {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.emi-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.emi-legend-dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 50%;
}

.principal-dot {
    background: #56D5CD;
}

.interest-dot {
    background: #F5A623;
}

.emi-legend-item small {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,.6);
    font-size: 10px;
}

.emi-legend-item strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.emi-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
    padding: 17px 0;
    border-top: 1px solid rgba(255,255,255,.15);
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.emi-total-row span {
    color: rgba(255,255,255,.7);
    font-size: 13px;
}

.emi-total-row strong {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Apply Button */

.emi-apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 20px;
    color: #0B2850;
    background: #56D5CD;
    border: 1px solid #56D5CD;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all .3s ease;
}

.emi-apply-btn:hover {
    color: #0B2850;
    background: #fff;
    border-color: #fff;
    transform: translateY(-2px);
}

.emi-result-footnote {
    margin: 17px 0 0;
    color: rgba(255,255,255,.55);
    font-size: 10px;
    text-align: center;
}

.emi-result-footnote i {
    margin-right: 5px;
    color: #56D5CD;
}

/* Dark Theme */

[data-theme="dark"] .kwick-emi-wrapper {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .emi-input-panel {
    background: var(--bg-card);
}

/* Responsive */

@media (max-width: 991px) {
    .kwick-emi-wrapper {
        grid-template-columns: 1fr;
        max-width: 650px;
    }

    .emi-input-panel,
    .emi-result-panel {
        padding: 35px;
    }
}

@media (max-width: 575px) {
    .kwick-emi-section {
        padding: 65px 0;
    }

    .kwick-emi-heading {
        margin-bottom: 32px;
        padding: 0 10px;
    }

    .kwick-emi-heading h2 {
        font-size: 32px;
    }

    .kwick-emi-heading p {
        font-size: 13px;
    }

    .kwick-emi-wrapper {
        border-radius: 18px;
    }

    .emi-input-panel,
    .emi-result-panel {
        padding: 25px 20px;
    }

    .emi-panel-heading {
        margin-bottom: 30px;
    }

    .emi-panel-heading h3 {
        font-size: 20px;
    }

    .emi-field {
        margin-bottom: 28px;
    }

    .emi-chart-area {
        flex-wrap: wrap;
        justify-content: center;
        gap: 25px;
    }

    .emi-donut {
        flex-basis: 140px;
        width: 140px;
        height: 140px;
    }

    .emi-donut-inner {
        width: 104px;
        height: 104px;
    }

    .emi-legend {
        flex: 1 1 135px;
        gap: 17px;
    }

    .emi-main-result strong {
        font-size: 38px;
    }
}
