/* Tab Navigation */
.loan-tabs {
    display: flex;
    background-color: #f1f5f9;
    border-radius: 12px 12px 0 0;
    padding: 6px 6px 0 6px;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}
.loan-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.loan-tab-btn:hover {
    color: #0f172a;
}
.loan-tab-btn.active {
    background-color: #ffffff;
    border-color: #e2e8f0 #e2e8f0 transparent #e2e8f0;
    color: #0f172a;
}

/* Calculator Workspace */
.calculator-workspace {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    padding: 24px;
}

/* Row Headers styling */
.loan-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.loan-input-row label {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0;
}

/* Custom Input Groups */
.loan-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
    height: 40px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.loan-input-group input {
    border: none;
    outline: none;
    height: 100%;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    width: 140px;
    text-align: right;
}
.loan-input-group input:focus {
    box-shadow: none;
}
.loan-input-badge {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #cbd5e1;
    font-size: 14px;
}

/* Tenure toggles */
.tenure-toggles {
    display: flex;
    height: 100%;
    border-left: 1px solid #cbd5e1;
}
.tenure-toggle-btn {
    border: none;
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    padding: 0 14px;
    height: 100%;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}
.tenure-toggle-btn:first-child {
    border-right: 1px solid #cbd5e1;
}
.tenure-toggle-btn.active {
    background-color: #cbd5e1;
    color: #0f172a;
}

/* Sliders container */
.slider-container {
    margin-bottom: 25px;
}

/* Custom dynamic range slider */
.form-range-emi {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px !important;
    background: #cbd5e1;
    border-radius: 9999px;
    outline: none;
    margin: 12px 0;
    padding: 0;
    cursor: pointer;
}
.form-range-emi::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 9999px;
    border: none;
    background: transparent;
}
.form-range-emi::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary_color, #2584DC) !important; /* Blue thumb matching website theme */
    cursor: pointer;
    margin-top: -6px; /* center thumb on 8px track */
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}
.form-range-emi::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.form-range-emi::-moz-range-track {
    width: 100%;
    height: 8px;
    background: transparent;
    border-radius: 9999px;
    border: none;
}
.form-range-emi::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: var(--primary_color, #2584DC) !important;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}
.form-range-emi::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Slider ticks label row */
.slider-ticks {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    padding: 0 2px;
}

/* Summary Card Layout */
.emi-summary-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
}
.emi-breakdown-row {
    border-bottom: 1px dashed #cbd5e1;
    padding: 16px 0;
    text-align: center;
}
.emi-breakdown-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.summary-lbl {
    font-size: 14px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 4px;
}
.summary-val {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}
.summary-val.highlight {
    font-size: 32px;
    color: #0f172a;
}

/* Donut Chart styling */
.chart-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.chart-box-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}
.pie-chart-svg {
    transform: rotate(-90deg);
    border-radius: 50%;
}
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.legend-dot.principal {
    background-color: #84cc16; /* Green matching screenshot */
}
.legend-dot.interest {
    background-color: var(--primary_color, #2584DC); /* Blue matching website theme */
}

@media (max-width: 768px) {
    .loan-input-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .loan-input-group {
        width: 100%;
    }
    .loan-input-group input {
        width: 100%;
        text-align: left;
    }
}
