/* Mortgage Calculator Styles */
@font-face {
    font-family: 'Nunito';
    src: url('fonts/Nunito/static/Nunito-SemiBold.ttf') format('ttf');
    font-weight: 400;
    font-style: normal;
}

.mortgage-calculator-container {
    font-family: "Nunito", sans-serif;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0;
}

.mortgage-calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

/* Left side - Inputs */
.mortgage-calculator-inputs {
    padding-right: 20px;
}

.mortgage-calculator-inputs h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 30px 0;
}

.calc-field {
    margin-bottom: 35px;
}

.calc-field label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
}

.range-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.range-control .range-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #083556;
    background: #fff;
    color: #083556;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding:0;
}

.range-control .range-btn:hover {
    background: #083556;
    color: #fff;
    transform: scale(1.05);
}

.range-control .range-btn:active {
    transform: scale(0.95);
}

.calc-range {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
}

.calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #083556;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.calc-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.4);
}

.calc-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #083556;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.calc-range::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.4);
}

/* Value Display with Editable Input */
.value-display {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.value-input {
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
    width: auto;
    min-width: 100px;
    max-width: 150px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.value-input:focus {
    outline: none;
    border-color: #083556;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.value-input:hover {
    border-color: #083556;
}

/* Hide spinner buttons for number inputs */
.value-input::-webkit-inner-spin-button,
.value-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.value-input[type=number] {
    -moz-appearance: textfield;
}

/* Right side - Results */
.mortgage-calculator-results {
    background: linear-gradient(135deg, #395c78 30%, #bed731 140%);
    /* background: #395c78; */
    padding: 40px;
    border-radius: 12px;
    color: #e7eaee;
    display:flex;
    flex-direction:column;
    align-items: center;
    justify-content: center;
}

.mortgage-calculator-results .result-notes{
    /* display at the end of the flex box */
    margin-top:auto;
}

.mortgage-calculator-results h3 {
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 20px 0;
    opacity: 0.95;
    color:#e7eaee !important;
}

.result-monthly {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    color: #bed731;
}

.result-value {
    display: inline-block;
    color: #bed731;
}

.result-period {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
    color: #bed731;
}

.result-details {
    border-top: 1px solid rgba(12, 79, 129, 1);
    padding-top: 25px;
}

.result-item {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
}

.result-label {
    opacity: 0.9;
    font-size: 20px;
}

.result-btn{
    margin-top: 3rem
}
.result-btn a {
    background-color: #bed731;
    color:rgba(12, 79, 129, 1);
    font-size: 16px;
    font-weight: 900;
    border-radius: 10px;
    padding: 10px;
    display: block;
}

.result-total-cost,
.result-total-amount,
.result-currency {
    margin-left: 1rem;
    font-weight: 800;
    font-size: 22px;
    color: #bed731;
}

/* Chart Section */
.mortgage-calculator-chart {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.mortgage-calculator-chart h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 25px 0;
}

.mortgage-calculator-chart canvas {
    max-height: 400px;
}


/* Responsive Design */

@media (max-width: 1024px) {
    .result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
}

@media (max-width: 768px) {
    .mortgage-calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }
    
    .mortgage-calculator-inputs {
        padding-right: 0;
    }
    
    .mortgage-calculator-inputs h3 {
        font-size: 20px;
    }
    
    .result-monthly {
        font-size: 36px;
    }
    
    .mortgage-calculator-chart {
        padding: 25px;
    }
    
    .range-control {
        gap: 10px;
    }
    
    .range-control .range-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .value-input {
        font-size: 18px;
        min-width: 80px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .mortgage-calculator-container {
        margin: 20px 10px;
    }
    
    .mortgage-calculator-wrapper {
        padding: 20px;
    }
    
    .calc-field label {
        font-size: 14px;
    }
    
    .value-display {
        font-size: 16px;
        flex-wrap: wrap;
    }
    
    .value-input {
        font-size: 16px;
        min-width: 70px;
        max-width: 100px;
    }
    
    .result-monthly {
        font-size: 32px;
    }
    
    .mortgage-calculator-results {
        padding: 25px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mortgage-calculator-container {
    animation: fadeIn 0.4s ease;
}
