
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
     font-family: "Poppins", sans-serif;
}
.logo img {
    width: 145px;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 50px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header and Navigation */
.main-header {
    background-color: #2c3e50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    flex: 0 0 auto;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    display: block;
/*    padding: 5px 0;*/
}

.calculator-tabs {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.calculator-tabs ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.calculator-tabs li {
    margin: 0;
}

.calculator-tabs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    display: block;
}

.calculator-tabs a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.calculator-tabs li.active a {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active {
    transform: rotate(90deg);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .calculator-tabs a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .calculator-tabs ul {
        gap: 2px;
    }
    
    .calculator-tabs a {
        padding: 8px 8px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 12px 0;
    }

    .main-header .container {
        flex-wrap: wrap;
        padding: 0 12px;
    }

    .mobile-menu-toggle {
        display: block;
        order: 2;
    }

    .calculator-tabs {
        width: 100%;
        order: 3;
        margin-top: 10px;
        display: none;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }

    .calculator-tabs.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .calculator-tabs ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .calculator-tabs li {
        width: 100%;
    }

    .calculator-tabs a {
        display: block;
        padding: 12px 15px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 14px;
    }

    .calculator-tabs li:last-child a {
        border-bottom: none;
    }

    .logo {
        order: 1;
        flex: 1;
    }

    .logo a {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 10px 0;
    }

    .main-header .container {
        padding: 0 10px;
    }

    .logo a {
        font-size: 16px;
    }

    .calculator-tabs a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .mobile-menu-toggle {
        font-size: 20px;
        padding: 6px;
    }
}

@media (max-width: 375px) {
    .main-header {
        padding: 8px 0;
    }

    .main-header .container {
        padding: 0 8px;
    }

    .logo a {
        font-size: 15px;
    }

    .calculator-tabs a {
        padding: 8px 10px;
        font-size: 12px;
    }

    .mobile-menu-toggle {
        font-size: 18px;
        padding: 5px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calculator Container */
.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Calculator Form Layout */
.calculator-form {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    position: relative;
    border: 2px solid #e0e0e0;
}

.left-column {
    flex: 0 0 400px;
    position: sticky;
    top: 20px;
    height: fit-content;
    align-self: flex-start;
}

.right-column {
    flex: 1;
    min-width: 300px;
}

/* Fixed Results Box */
.results-box-container {
    width: 100%;
    position: relative;
}

.fixed-results-box {
    position: sticky;
    top: 20px;
    width: 100%;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 13px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* When enough viewport height is available and we're scrolled down, fix position */
.fixed-results-box.fixed {
    position: relative;
    max-height: none;
}

.fixed-results-box::-webkit-scrollbar {
    display: none;
}

/* Input Sections */
.input-section {
    margin-bottom: 20px;
    border-radius: 10px;
    padding: 10px;
    border: 2px solid #ddd;
    overflow: hidden;
}

.input-section label {
    display: block;
    padding: 10px 15px 5px;
    font-size: 14px;
    color: #666;
}

/* Updated Input Field Styling */
.input-field {
    position: relative;
    padding: 5px 15px 10px;
    background-color: #fff;
}

.input-field.full-width {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px 15px;
}

.input-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    background: transparent;
}

.input-field:focus-within {
    border-color: #4361ee;
}

/* Income and Debt Sliders */
.income-slider, 
.debt-slider {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin: 15px 15px;
}

/* Price Slider */
.price-slider, 
.rate-slider, 
.amortization-slider, 
.property-tax-slider,
.condo-fees-slider,
.heat-slider,
.other-expenses-slider,
.affordability-slider {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    /* margin: 0 15px 15px; */
}

.slider-track {
    width: 35%;
    height: 100%;
    background-color: #2563EB;
    border-radius: 4px;
}

.slider-thumb {
    width: 22px;
    height: 22px;
    background-color: #fff;
    border: 2px solid #2563EB;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Separator */
.separator {
    height: 2px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

/* Checkboxes */
.checkbox-section {
    margin-bottom: 20px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #2563EB;
}

.checkbox-item label {
    font-size: 14px;
    color: #333;
}

/* Section Styling */
.section {
    margin-bottom: 25px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 15px;
}

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

.icon-circle {
    width: 30px;
    height: 30px;
    background-color: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

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

.section-header h3 {
    font-size: 16px;
    color: #333;
    flex: 1;
    font-weight: 600;
}

.view-link {
    color: #2563EB;
    text-decoration: none;
    font-size: 14px;
}

.rate-description,
.amortization-description,
.expenses-description,
.affordability-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Toggle Switch */
.toggle-switch {
    width: 40px;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-track {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
    background-color: #2563EB;
}

.toggle-switch.active .toggle-thumb {
    transform: translateX(20px);
}

/* Rate Section Styling */
.rate-section-content {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.rate-input-wrapper {
    margin-bottom: 10px;
}

.rate-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.rate-type-container {
    margin: 15px 0;
}

.rate-type-buttons {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
    border: 2px solid #2563EB;
}

.rate-btn {
    padding: 10px 20px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border: none;
    color: #2563EB;
}

.rate-btn.active {
    background-color: #2563EB;
    color: white;
}

.term-group {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-top: 15px;
}

/* Amortization Section Styling */
.amortization-input-wrapper {
    margin-bottom: 15px;
}

.amortization-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.amortization-years-months {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.amortization-years {
    flex: 3;
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0;
    background-color: white;
}

.amortization-years::after {
    content: 'Years';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
}

.amortization-months {
    flex: 2;
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0;
    background-color: white;
}

.amortization-months::after {
    content: 'Months';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
}

.amortization-years input, .amortization-months input {
    width: 100%;
    padding: 10px;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: transparent;
}

.amortization-slider {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin: 5px 0 15px;
}

/* Rate Term Selection */
.rate-term-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: white;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.dropdown-select {
    width: 100%;
    padding: 8px 32px 8px 10px; /* Extra padding for the dropdown icon */
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    pointer-events: none;
}

/* Affordability Slider Container */
.affordability-slider-container {
    margin: 15px 0;
    position: relative;
}

.affordability-slider {
    height: 8px;
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    background: linear-gradient(to right, #4CAF50, #FFEB3B, #FF5252);
    margin-bottom: 8px;
}

.affordability-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.cautious-label {
    color: #4CAF50;
    font-weight: bold;
}

.standard-label {
    color: #FF9800;
    font-weight: bold;
}

.affordability-slider .slider-track {
    /* Hide the default slider track since we're using the gradient background */
    background-color: transparent;
}

.affordability-slider .slider-thumb {
    width: 18px;
    height: 18px;
    background-color: #fff;
    border: 2px solid #2563EB;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Custom Rates text styling */
.custom-rates {
    color: #2563EB;
    font-size: 14px;
    cursor: pointer;
}

/* Expense Input Styling */
.expenses-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.expense-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.property-tax-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.expense-input-field {
    position: relative;
    padding: 5px 15px;
    flex: 1;
}

.expense-input-field.monthly-field,
.expense-input-field.yearly-field {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 5px;
    flex: 1;
}

.expense-input-field label {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
    display: block;
    padding: 0;
}

.expense-input-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background: transparent;
}

.expense-input-field.with-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.info-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-style: italic;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #ccc;
}

.expense-item {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Results Box */
.results-box {
    background-color: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.settings-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #999;
    cursor: pointer;
}

.result-header {
    padding: 20px;
}

.result-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.result-amount {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    transition: color 0.2s ease;
}

/* Stress Test Ratio Section */
.stress-test-ratio {
    padding: 5px 20px 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.stress-test-label {
    font-size: 13px;
    color: #666;
    margin-right: 10px;
}

.ratio-value {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.gds-ratio {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.ratio-label {
    font-size: 13px;
    color: #666;
    margin-right: 8px;
}

/* Colored Bar */
.colored-bar {
    padding: 0px 15px 0px 15px;
    display: flex;
    height: 6px;
    width: 100%;
}

.bar-section {
    height: 100%;
}

.bar-section.mortgage {
    background-color: #F59E0B;
}

.bar-section.expenses {
    background-color: #2201db;
}

.bar-section.cash {
    background-color: #06d63a;
}

/* Payment Details */
.payment-details {
    padding: 15px 20px;
    margin-bottom: 0;
}

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

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

.payment-dot.monthly {
    background-color: #F59E0B;
}

.payment-dot.home {
    background-color: #2201db;
}

.payment-dot.cash {
    background-color: #06d63a;
}

.payment-label {
    flex: 1;
    font-size: 13px;
    color: #666;
}

.payment-value {
    font-size: 13px;
    color: #333;
    font-weight: bold;
    transition: color 0.2s ease;
}

.value-changing {
    color: #2563EB;
    font-weight: 700;
}

/* Download Button */
.download-section {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 20px;
    text-align: center;
}

.download-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #8351e4;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}

.download-btn:hover {
    background-color: #7340d3;
}

.app-note {
    font-size: 13px;
    color: #2563EB;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 8px;
}

.brand {
    font-size: 11px;
    color: #999;
    text-align: center;
}

/* Optional Fields Styling */
.optional-label:after {
    content: " (optional)";
    font-size: 12px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 937px) {
    .calculator-container {
        padding: 10px;
    }

    .calculator-form {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .left-column {
        flex: 1;
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 0;
    }

    .right-column {
        width: 100%;
    }

    .fixed-results-box {
        position: relative;
        top: 0;
        margin-bottom: 15px;
    }

    .results-box {
        width: 100%;
        border-radius: 10px;
    }

    /* Make sliders more touch-friendly on mobile */
    .slider-thumb {
        width: 26px;
        height: 26px;
    }

    /* Adjust input fields for mobile */
    .input-field input {
        font-size: 16px;
        padding: 8px 12px;
    }

    /* Adjust section padding for mobile */
    .section {
        padding: 12px;
        margin-bottom: 15px;
    }

    /* Make property tax inputs stack on small screens */
    .property-tax-inputs {
        flex-direction: column;
        gap: 10px;
    }

    /* Adjust amortization inputs for mobile */
    .amortization-years-months {
        gap: 10px;
    }

    /* Ensure proper spacing in results box */
    .result-header {
        padding: 15px;
    }

    .payment-details {
        padding: 12px 15px;
    }

    /* Adjust download button for mobile */
    .download-section {
        padding: 15px;
    }

    .download-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* Clean up section headers */
    .section-header {
        margin-bottom: 10px;
    }

    .section-header h3 {
        font-size: 15px;
    }

    /* Adjust descriptions */
    .rate-description,
    .amortization-description,
    .expenses-description {
        font-size: 13px;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    /* Clean up expense items */
    .expense-item {
        padding: 10px;
        margin-bottom: 10px;
    }

    .expense-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    /* Adjust input sections */
    .input-section {
        padding: 8px;
        margin-bottom: 15px;
    }

    .input-section label {
        font-size: 13px;
        padding: 8px 12px 4px;
    }
}

/* Small screens (mobile) */
@media (max-width: 480px) {
    .calculator-container {
        padding: 8px;
    }

    .calculator-form {
        padding: 12px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Make result amount smaller on mobile */
    .result-amount {
        font-size: 24px;
    }

    /* Adjust section headers for mobile */
    .section-header {
        flex-wrap: wrap;
    }

    .section-header h3 {
        font-size: 14px;
    }

    /* Make icons smaller on mobile */
    .icon-circle {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }

    .icon-circle svg {
        width: 14px;
        height: 14px;
    }

    /* Adjust payment details for mobile */
    .payment-item {
        margin-bottom: 8px;
    }

    .payment-label, .payment-value {
        font-size: 12px;
    }

    /* Ensure proper spacing in stress test section */
    .stress-test-ratio {
        padding: 5px 12px 8px;
    }

    /* Make colored bar thinner on mobile */
    .colored-bar {
        height: 4px;
        margin: 8px 0;
    }

    /* Clean up rate section */
    .rate-section-content {
        padding: 8px;
    }

    .rate-label {
        font-size: 13px;
    }

    /* Clean up amortization section */
    .amortization-label {
        font-size: 13px;
    }

    .amortization-years input,
    .amortization-months input {
        padding: 8px;
        font-size: 14px;
    }

    /* Adjust toggle switch */
    .toggle-switch {
        width: 36px;
        height: 18px;
    }

    .toggle-thumb {
        width: 14px;
        height: 14px;
    }

    .toggle-switch.active .toggle-thumb {
        transform: translateX(18px);
    }

    /* Clean up download section */
    .download-section {
        padding: 12px;
    }

    .app-note {
        font-size: 12px;
        margin-top: 8px;
    }

    .brand {
        font-size: 10px;
    }
}

/* Text consistency */
.result-title,
.payment-label,
.stress-test-label,
.details-label,
.expense-label {
    font-size: 14px;
    color: #666;
}

.payment-value,
.ratio-value,
.details-value {
    font-size: 14px;
    color: #333;
    font-weight: 700;
}

/* Consistent font sizes throughout */
.section-header h3,
.details-section h3,
.tab-btn {
    font-size: 16px;
    font-weight: 600;
}

/* Make all payment info consistent */
.payment-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Ensure closing button stays in place */
.download-section {
    padding: 20px;
}

/* Animated value effects */
.result-amount,
.payment-value,
.ratio-value,
.details-value {
    transition: color 0.2s ease;
}

.value-changing {
    color: #0366d6;
    font-weight: 700;
}

/* Property Tax item */
.property-tax-item {
    margin-bottom: 15px;
}

/* Condo fees styling */
.expense-item .condo-fees-slider,
.expense-item .heat-slider,
.expense-item .other-expenses-slider {
    margin-top: 10px;
    height: 6px;
}

/* Rate section styling */
.rate-section-content {
    margin-bottom: 15px;
}

.rate-type-container {
    margin-bottom: 15px;
}

.rate-type-buttons {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
    border: 2px solid #2563EB;
}

.rate-btn {
    padding: 8px 15px;
    background-color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    border: none;
    color: #2563EB;
    transition: all 0.2s ease;
}

.rate-btn.active {
    background-color: #2563EB;
    color: white;
}

.rate-term-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}

/* Downpayment Section Styles */
.downpayment-section {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.downpayment-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.downpayment-input-wrapper {
    margin-bottom: 16px;
}

.downpayment-percentage-wrapper {
    margin-bottom: 16px;
}

.downpayment-label {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.downpayment-slider {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    position: relative;
    margin-top: 12px;
    cursor: pointer;
}

.downpayment-slider .slider-track {
    position: absolute;
    height: 100%;
    background-color: #4361ee;
    border-radius: 3px;
    width: 50%;
}

.downpayment-slider .slider-thumb {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border: 2px solid #4361ee;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Layout */
@media (max-width: 768px) {
    .calculator-form {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .left-column {
        flex: 1;
        width: 100%;
        position: relative;
        top: 0;
        order: 1; /* Make results panel appear first */
        margin-bottom: 15px;
    }

    .right-column {
        width: 100%;
        order: 2; /* Make calculator appear second */
    }

    .fixed-results-box {
        position: relative;
        top: 0;
        margin-bottom: 15px;
    }

    .results-box {
        width: 100%;
        border-radius: 10px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .calculator-form {
        padding: 12px;
        gap: 12px;
    }

    .left-column {
        margin-bottom: 12px;
    }

    .results-box {
        border-radius: 8px;
    }
}

.downpayment-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
    padding: 4px 0;
}

/* On desktop, limit width and center */
@media (min-width: 769px) {
    .results-box {
        max-width: 800px;
        margin: 0 auto 30px auto;
    }
    
    .results-box-container {
        display: flex;
        justify-content: center;
    }
    
    /* Make result amount larger on desktop */
    .result-amount {
        font-size: 36px;
    }
    
    /* Improve spacing on desktop */
    .right-column {
        margin-bottom: 30px;
    }
}

/* Base Mobile Styles */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .calculator-container {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .calculator-form {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

    .left-column,
    .right-column {
        width: 100%;
        padding: 0;
    }

    /* Results Box Mobile Styling */
    .results-box-container {
        margin-bottom: 16px;
    }

    .fixed-results-box {
        position: relative;
        top: 0;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .results-box {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .result-header {
        padding: 16px;
    }

    .result-title {
        font-size: 13px;
    }

    .result-amount {
        font-size: 24px;
        margin-top: 4px;
    }

    /* Input Sections Mobile Styling */
    .input-section {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .input-section label {
        font-size: 13px;
        padding: 0 0 8px;
    }

    .input-field {
        padding: 8px 0;
    }

    .input-field input {
        font-size: 16px;
        padding: 8px;
    }

    /* Section Mobile Styling */
    .section {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .section-header {
        margin-bottom: 12px;
    }

    .section-header h3 {
        font-size: 15px;
    }

    .icon-circle {
        width: 28px;
        height: 28px;
        margin-right: 8px;
    }

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

    /* Expense Items Mobile Styling */
    .expense-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .expense-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .property-tax-inputs {
        flex-direction: column;
        gap: 12px;
    }

    .expense-input-field {
        padding: 8px;
    }

    /* Sliders Mobile Styling */
    .price-slider,
    .rate-slider,
    .amortization-slider,
    .property-tax-slider,
    .condo-fees-slider,
    .heat-slider {
        height: 6px;
        margin: 12px 0;
    }

    .slider-thumb {
        width: 24px;
        height: 24px;
    }

    /* Payment Details Mobile Styling */
    .payment-details {
        padding: 12px 16px;
    }

    .payment-item {
        margin-bottom: 8px;
    }

    .payment-label,
    .payment-value {
        font-size: 13px;
    }

    /* Stress Test Mobile Styling */
    .stress-test-ratio {
        padding: 8px 16px;
    }

    .stress-test-label,
    .ratio-value {
        font-size: 13px;
    }

    /* Colored Bar Mobile Styling */
    .colored-bar {
        height: 4px;
        margin: 8px 16px;
    }

    /* Download Section Mobile Styling */
    .download-section {
        padding: 16px;
    }

    .download-btn {
        padding: 12px;
        font-size: 15px;
    }

    .app-note {
        font-size: 12px;
        margin-top: 8px;
    }

    .brand {
        font-size: 11px;
    }

    /* Amortization Inputs Mobile Styling */
    .amortization-years-months {
        gap: 8px;
    }

    .amortization-years,
    .amortization-months {
        padding: 8px;
    }

    .amortization-years input,
    .amortization-months input {
        font-size: 15px;
        padding: 8px;
    }

    /* Rate Section Mobile Styling */
    .rate-section-content {
        padding: 12px;
    }

    .rate-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .rate-term-container {
        padding: 12px;
    }

    /* Toggle Switch Mobile Styling */
    .toggle-switch {
        width: 40px;
        height: 20px;
    }

    .toggle-thumb {
        width: 16px;
        height: 16px;
    }

    .toggle-switch.active .toggle-thumb {
        transform: translateX(20px);
    }

    /* Descriptions Mobile Styling */
    .rate-description,
    .amortization-description,
    .expenses-description {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
}

/* Small Mobile Devices */
@media (max-width: 375px) {
    .calculator-form {
        padding: 8px;
    }

    .section {
        padding: 10px;
    }

    .input-section {
        padding: 10px;
    }

    .expense-item {
        padding: 10px;
    }

    .result-header {
        padding: 12px;
    }

    .payment-details {
        padding: 10px 12px;
    }

    .download-section {
        padding: 12px;
    }

    .result-amount {
        font-size: 22px;
    }
}

/* Rental Income Inputs */
.rental-income-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
}

.rental-income-inputs .expense-input-field {
    flex: 1;
    padding: 5px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.rental-income-inputs .expense-input-field label {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
    display: block;
    padding: 0;
}

.rental-income-inputs .expense-input-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background: transparent;
}

/* Rental Income Section */
.rental-income-section {
    margin-bottom: 25px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 15px;
}

.rental-input-wrapper {
    margin-top: 15px;
}

.rental-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.rental-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
} 
/*===============*/
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 2px solid #130092;
}
.calculator-tabs a {
    color: #130092;
    text-decoration: none;
    padding: 10px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.calculator-tabs li.active a {
    color: #fff;
    background-color: rgb(26 0 144);
    font-weight: 600;
}
h1{
    color:  #130092;
}
.download-btn{
    background-color: #37ca37;
}

.download-btn:hover,
.calculator-tabs a:hover{
    color:  #130092;
}
.slider-track{
    background-color: #37ca37;
}
.slider-thumb{
    border-color:#130092 ;
}
.icon-circle svg path:not([fill="none"]){
    fill: #130092;
}
button#calculateBtn{
    display: none;
}
.calculator-form,
.section,
.input-section,
.rate-section-content,
.expense-item,
.expense-input-field.monthly-field, .expense-input-field.yearly-field,
.dropdown-select,
.fixed-results-box{
    border-radius: 0;
    border: 1px solid #ccc;
}
.results-box{
    box-shadow: none;
}
.download-btn:hover{
    background-color: #1a0090;
    color: #fff;
}