
@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;
}
 

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;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
/*    margin-bottom: 10px;*/
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
/*    padding: 10px;*/
    display: inline-block;
}

.calculator-tabs {
/*    width: 100%;*/
}

.calculator-tabs ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.calculator-tabs li {
    margin: 2px;
}

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

.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 Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* 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;
    gap: 20px;
    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;
}

.main-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.top-panels {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.left-panel {
    flex: 1;
    min-width: 300px;
}

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

.bottom-panel {
    width: 100%;
    margin-top: 20px;
}

/* Fixed Results Box */
.results-box-container {
    width: 320px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    margin-left: 20px;
}

.fixed-results-box {
    position: relative;
    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: fixed;
    max-height: 90vh;
    overflow-y: auto;
}

.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;
}

/* Sliders */
.price-slider, 
.amortization-slider,
.cost-slider {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin: 15px 15px;
}

.slider-track {
    width: 0%;
    height: 100%;
    background-color: #2563EB;
    border-radius: 4px;
    transition: width 0.3s ease;
}

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

/* Active slider state */
.slider-thumb:hover,
.slider-thumb:active {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-color: #1E40AF;
}

/* Cost Slider Specific Styling */
.cost-slider {
    margin: 5px 15px 20px;
    position: relative;
    height: 8px;
}

.cost-slider:hover .slider-track {
    background-color: #1E40AF;
}

.cost-slider:hover .slider-thumb {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Improve the cost input field interaction */
.cost-input-field input:focus {
    color: #2563EB;
    font-weight: bold;
}

.cost-item:hover {
    background-color: #f8f9fa;
}

/* Ensure sliders are clickable on the entire area */
.price-slider, 
.amortization-slider,
.cost-slider,
.interest-rate-slider {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Add focus styles for better accessibility */
.slider-thumb:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Down Payment Percentage */
.down-payment-percentage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 15px;
}

.percentage {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.dropdown-wrapper {
    position: relative;
}

#down-payment-percentage-dropdown {
    padding: 5px 30px 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
    color: #333;
    appearance: none;
    cursor: pointer;
}

.dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    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;
}

/* Amortization Section Styling */
.amortization-years-months {
    display: flex;
    gap: 15px;
    margin: 10px 15px;
}

.amortization-years, .amortization-months {
    flex: 1;
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}

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

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

.amortization-years input, .amortization-months input {
    width: 70%;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background-color: transparent;
}

/* 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;
    font-weight: 600;
}

.cost-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Cost Item Styling */
.cost-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cost-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.cost-input-field {
    width: 120px;
    position: relative;
}

.cost-input-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background-color: transparent;
    text-align: right;
    padding-right: 10px;
}

.info-icon {
    width: 20px;
    height: 20px;
    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;
    margin-left: 10px;
}

.info-icon.required {
    position: relative;
}

.info-icon.required::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
}

/* Results Box Styling */
.results-box {
    background-color: white;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    border-top: 4px solid #2563EB;
    width: 100%;
}

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

.result-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

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

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

/* Result Items */
.result-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

/* Add specific styling for amortization period */
.result-item.amortization-period {
    background-color: #f9f9f9;
}

.result-label {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.result-value {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

.result-dot {
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
    margin-right: 10px;
}

/* Location Dropdown */
.location-dropdown {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: #f0f4ff;
    color: #2563EB;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.location-value {
    margin-right: 5px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #2563EB;
}

/* Breakdown Section */
.result-breakdown {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

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

.breakdown-label {
    flex: 1;
    font-size: 14px;
    color: #666;
}

.breakdown-value {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

/* Homebuyer Checkboxes */
.homebuyer-checkboxes {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.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;
}

/* Download Section */
.download-section {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.download-btn {
    width: 100%;
    padding: 12px 0;
    border-radius: 6px;
    background-color: #8351e4;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
}

.app-note {
    font-size: 14px;
    color: #2563EB;
    margin-bottom: 5px;
}

.brand {
    font-size: 12px;
    color: #999;
}

/* Animation Effects */
.result-amount,
.result-value,
.breakdown-value {
    transition: color 0.3s ease;
}

.value-changing {
    color: #4361ee !important;
    transition: color 0.3s ease;
    position: relative;
}

.value-changing::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #4361ee;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

/* Media Queries for Responsive Design */
@media (max-width: 1200px) {
    .calculator-container {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .calculator-form {
        flex-direction: column;
    }
    
    .results-box-container {
        width: 100%;
        position: relative;
        top: 0;
        margin-left: 0;
        margin-top: 20px;
    }
    
    .top-panels {
        flex-direction: column;
    }
    
    .left-panel,
    .right-panel {
        width: 100%;
    }

    .main-header .container {
        padding: 0 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .calculator-tabs {
        display: none;
    }

    .calculator-tabs.active {
        display: block;
    }

    .calculator-tabs ul {
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }

    .calculator-tabs li {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }

    .calculator-tabs a {
        padding: 12px 20px;
        width: 100%;
        border-radius: 4px;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .calculator-form {
        padding: 15px;
    }
    
    .input-section,
    .section {
        padding: 10px;
    }
    
    .amortization-years-months {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .logo a {
        font-size: 18px;
    }

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

/* Interest Rate Slider */
.interest-rate-slider {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin: 15px 15px;
}

/* Location Menu Styles */
.location-dropdown {
    position: relative;
    cursor: pointer;
}

.location-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.location-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.location-item:hover {
    background-color: #f5f5f5;
}

.location-item:last-child {
    border-bottom: none;
}

/* Ensure proper styling for the slider thumbs */
.interest-rate-slider .slider-track,
.interest-rate-slider .slider-thumb {
    transition: all 0.3s ease;
} 



/*===============*/
.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{
    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;
}

/*===============*/
.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;
}
.logo img {
    width: 145px;
}


.download-btn:hover,.create-report:hover,.rate-type-btn.active{
    background-color: #1a0090;
    color: #fff;
}
.results-box{
    border-top-color:#1a0090 ;
}

.logo img {
    width: 145px;
}
.fixed-results-box{
    border: none;
}

    button.mobile-menu-toggle{
        display: none;
    }

@media(max-width:1200px){
.main-header .container{
    flex-direction: row !important;
}
.logo{
    margin: 0;
}
    nav.calculator-tabs {
        display: none;
        position: absolute;
        top: 100%;
        background-color: #fff;
        left: 0;
        width: 100%;
    }
    header {
        position: relative;
        z-index: 9999;
    }
    button.mobile-menu-toggle{
        display: block;
    }
    .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1a0090;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}
button.mobile-menu-toggle.active  ~ nav.calculator-tabs{
    display: block;
}
.calculator-tabs ul{
    flex-direction: column;
    padding: 15px;
}
.calculator-tabs a{
    display: inline-block;
}
.calculator-container *{
    max-width: 100%;
    min-width: unset;
}
.amortization-inputs,.amortization-years-months input,
.amortization-years-months{
    width: 100%;
}
.logo button{
    display: none;
}

}