/* Modern Loan Calculator Styles */
.calculator-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
    padding: 20px;
}

.calculator-tabs {
    margin-bottom: 20px;
}

.calculator-tabs .nav-tabs {
    border-bottom: 1px solid #ddd;
}

.calculator-tabs .nav-tabs li a {
    color: #555;
    padding: 10px 15px;
    border: none;
    border-bottom: 2px solid transparent;
}

.calculator-tabs .nav-tabs li.active a {
    color: #3366ff;
    border-bottom: 2px solid #3366ff;
    background: transparent;
}

.calculator-tabs .refinance-tab {
    margin-left: auto;
}

.calculator-tabs .refinance-tab a {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 24px;
}

.input-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.input-header label {
    color: #333;
    font-weight: 500;
}

.percent-display {
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

.slider-container {
    margin-bottom: 10px;
}

.ui-slider {
    height: 6px;
    background: #e0e0e0;
    border: none;
    border-radius: 3px;
}

.ui-slider .ui-slider-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3366ff;
    border: none;
    top: -5px;
    cursor: pointer;
}

.ui-slider .ui-slider-range {
    background: #3366ff;
    height: 6px;
    border-radius: 3px;
}

#purchase-price-slider .ui-slider-range {
    background: #8a2be2;
}

#purchase-price-slider .ui-slider-handle {
    background: #8a2be2;
}

#down-payment-slider .ui-slider-range {
    background: #ff4081;
}

#down-payment-slider .ui-slider-handle {
    background: #ff4081;
}

#property-tax-slider .ui-slider-range {
    background: #4caf50;
}

#property-tax-slider .ui-slider-handle {
    background: #4caf50;
}

#insurance-slider .ui-slider-range {
    background: #00bcd4;
}

#insurance-slider .ui-slider-handle {
    background: #00bcd4;
}

.interest-rate-control {
    display: flex;
    align-items: center;
}

.increment-btn, .decrement-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.increment-btn:hover, .decrement-btn:hover {
    background: #e0e0e0;
}

.term-options {
    display: flex;
    justify-content: space-between;
}

.term-options .option {
    flex: 1;
    text-align: center;
    background: #f5f5f5;
    padding: 12px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
}

.term-options .option:first-child {
    margin-left: 0;
}

.term-options .option:last-child {
    margin-right: 0;
}

.term-options .option.active {
    background: #e0e0e0;
    font-weight: 500;
}

.term-options .option span {
    display: block;
}

.term-options .option .duration {
    font-size: 12px;
    color: #666;
}

.down-payment-options {
    display: flex;
    justify-content: space-between;
}

.down-payment-options .option {
    flex: 1;
    text-align: center;
    background: #f5f5f5;
    padding: 12px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
}

.down-payment-options .option:first-child {
    border-radius: 4px 0 0 4px;
    margin-left: 0;
}

.down-payment-options .option:last-child {
    border-radius: 0 4px 4px 0;
    margin-right: 0;
}

.down-payment-options .option.active {
    background: #e0e0e0;
    font-weight: 500;
}

.down-payment-options .option span {
    display: block;
}

.down-payment-options .option .value {
    font-size: 12px;
    color: #666;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
}

.info-icon {
    color: #999;
    margin-left: 8px;
    cursor: pointer;
}

.tax-item {
    margin-bottom: 16px;
}

.tax-note {
    font-size: 12px;
    color: #666;
}

.pmi-section .not-required {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
    font-weight: normal;
}

.monthly-payment-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.monthly-payment-section h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #333;
}

.payment-amount {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.progress-bar-container {
    margin-bottom: 16px;
    
}

.progress-bar {
    height: 8px;
    background: #ff6207;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    flex-direction: row;
}

.progress-segment {
    height: 100%;
}

.principal-segment {
    background: #8a2be2;
}

.tax-segment {
    background: #4caf50;
}

.insurance-segment {
    background: #00bcd4;
}

.payment-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payment-breakdown li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.payment-breakdown .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.payment-breakdown .principal-dot {
    background: #8a2be2;
}

.payment-breakdown .tax-dot {
    background: #4caf50;
}

.payment-breakdown .insurance-dot {
    background: #00bcd4;
}

.payment-breakdown .pmi-dot {
    background: #ff9800;
}

.payment-breakdown .description {
    flex: 1;
    color: #333;
}

.payment-breakdown .amount {
    font-weight: 500;
    color: #333;
}

.loan-summary-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.loan-summary-section h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #333;
}

.loan-amount {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.loan-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.loan-details li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.loan-details li:last-child {
    border-bottom: none;
}

.loan-details .detail-label {
    color: #666;
}

.loan-details .detail-value {
    font-weight: 500;
    color: #333;
}

@media (max-width: 767px) {
    .term-options, .down-payment-options {
        flex-wrap: wrap;
    }
    
    .term-options .option, .down-payment-options .option {
        flex: 0 0 calc(33.33% - 8px);
        margin-bottom: 8px;
    }
    
    .calculator-results {
        margin-top: 30px;
    }
}


.loan-type-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.loan-type-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.loan-type-tab.active {
    color: #008fd5;
    border-bottom-color: #008fd5;
}

.loan-type-tab:hover {
    color: #008fd5;
}

.va-funding-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.va-options {
    margin-top: 10px;
}

.va-option {
    margin-bottom: 10px;
}

.va-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.va-option input[type="checkbox"] {
    margin-right: 8px;
}

.fee-percentage {
    color: #008fd5;
    font-weight: 600;
}

#down-payment-options.va-mode .option[data-value="5"],
#down-payment-options.va-mode .option[data-value="10"],
#down-payment-options.va-mode .option[data-value="20"] {
    display: none;
}

.down-payment-options.va-mode::after {
    content: "VA loans allow 0% down payment";
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}