.calculator-container, .result-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* max-width: 400px; */
    box-sizing: border-box;
}

.calculator-container h1 {
    margin-bottom: 20px;
    color: #333;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.default-values {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.default-values span {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.default-values span:hover {
    background-color: #e0e0e0;
}



.result h2 {
    color: #333;
}

#inflationChart {
    margin-top: 20px;
}

#inflationResults {
    margin-top: 20px;
    text-align: left;
    color: #555;
}
#inflationChart{
height: 300px !important;
width: 300px !important;
}

#inflationResults {
    background: #e9f9ff;
    padding: 30px;
}
/* Responsive design */
@media (min-width: 768px) {
    .container {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
    }
    
    .calculator-container, .result-container {
        /* width: 45%; */
    }
}

@media (max-width: 732px) {
    .calculator-container h1 {
        font-size: 24px;
    }
    
    .result h2 {
        font-size: 16px;
    }
    
    #emi-details {
        font-size: 14px;
    }
    .calculator {
        display: flex;
        justify-content: space-between;
        margin-top: 20px;
        flex-direction: column;
    }
    .calculator .left{
        order: 2 !important;
    }
    .calculator .left .results{
        display: flex;
    justify-content: space-between;
    }
    .calculator .left .results h3 {
       
        font-size: 14px;
    }
    .calculator .left .results p{
font-size: 13px;
    }
    .chart-container{
        order: 3 !important;
    }
    .right{
        order: 1 !important;
    }
    .left, .right, .chart-container{
        width: 100% !important;
    }
    .total h3 {
        font-size: 20px;
    }
}
.total  p{
    font-size: 20px;
    font-weight: bold;
    color: #2EB24C;
    font-family: "Nunito",sans-serif;
}

.page-content{
    background: #fff;
}

.form-v4-content{
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    background-color: #f0fbfc;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgb(0 0 0 / 45%);
}

h2 {
    text-align: center;
    color: #333;
}

.calculator {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.left, .right {
    width: 30%;
}

.chart-container {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

canvas {
    width: 200px;
    height: 200px;
}

h3 {
    margin-bottom: 10px;
    color: #273158;
    font-weight: 700;
   
}

.left p {
    font-size: 20px;
    font-weight: bold;
    color: #2EB24C;
    font-family: "Nunito",sans-serif;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
    font-family: "Nunito",sans-serif;
}

input[type="range"] {
    width: 100%;
}

input[type="text"] {
    width: 40%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #add8e67a;
}

.total {
    text-align: center;
    margin-top: 20px;
}

.total h3 {
    /* color: #273158; */
    color: #273158;
}
.total h3 p{
    color: #2EB24C;

}
/* Common styles for all browsers */
input[type="range"] {
    -webkit-appearance: none; /* Override default style */
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

input[type="range"]:hover {
    opacity: 1; /* Add hover effect */
}

/* Track (background) */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #273158 0%, #2EB24C 100%); /* Track color (gradient from blue to green) */
    border-radius: 5px;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #273158 0%, #2EB24C 100%);
    border-radius: 5px;
}

input[type="range"]::-ms-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: transparent; /* Hides the track so we can style it */
    border-color: transparent;
    color: transparent;
}

/* Thumb (the draggable circle) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #2EB24C; /* Thumb color (green) */
    cursor: pointer;
    border: 2px solid #fff; /* Optional border around the thumb */
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); /* Optional shadow for thumb */
}

input[type="range"]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #2EB24C;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-ms-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #2EB24C;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}
/* ---------- Risk-Reward calculator additions (same look as the inflation calculator) ---------- */
.rr-disclaimer { text-align: center; font-size: 13px; color: #6c757d; margin: -10px 0 0; }
.calculator .left { width: 32%; }
.calculator .chart-container { width: 28%; justify-content: center; }
.calculator .right { width: 36%; }
.calculator .left .results p { font-size: 18px; margin-bottom: 12px; }
.calculator .left .results .rr-sub { display: block; font-size: 13px; color: #6c757d; font-weight: 600; margin: -8px 0 12px; font-family: "Nunito", sans-serif; }
.calculator .left .results p.rr-bad { color: #e74c3c; }
.rr-chart-label { font-size: 13px; color: #555; text-align: center; margin-top: 8px; font-family: "Nunito", sans-serif; }

.rr-row { display: flex; gap: 10px; }
.rr-row > div { flex: 1; min-width: 0; }
.right input.rr-price, .rr-box input.rr-price, .right select {
    width: 100%; padding: 8px; margin: 5px 0 14px; border: 1px solid #ddd; border-radius: 4px;
    background-color: #add8e67a; font-size: 15px;
}
.right input[type="text"] { margin-bottom: 14px; }
.rr-toggle { display: flex; border: 1px solid #273158; border-radius: 6px; overflow: hidden; margin: 5px 0 14px; }
.rr-toggle button { flex: 1; border: 0; background: #fff; color: #273158; padding: 7px 0; font-weight: 700; font-family: "Nunito", sans-serif; cursor: pointer; }
.rr-toggle button.active { background: #273158; color: #fff; }
.rr-toggle button.active.short { background: #e74c3c; }
.rr-toggle button.active.long { background: #2EB24C; }
#rr-error { display: none; background: #fe8b8e; color: #3a0d0d; text-align: center; font-size: 14px; padding: 8px; border-radius: 6px; margin-top: 15px; }
#rr-warn { display: none; background: #fff4d6; border-left: 4px solid #cf9c0a; font-size: 14px; padding: 8px 12px; border-radius: 4px; margin-top: 12px; }

/* comparison table + extra panels inside the calculator box */
.rr-compare { width: 100%; border-collapse: collapse; margin-top: 18px; background: #fff; font-size: 15px; }
.rr-compare th, .rr-compare td { border: 1px solid #d9e6ea; padding: 8px 10px; text-align: right; }
.rr-compare th:first-child, .rr-compare td:first-child { text-align: left; }
.rr-compare thead th { background: #273158; color: #fff; font-family: "Nunito", sans-serif; }
.rr-compare tbody tr:last-child td { font-weight: 700; }
.rr-compare-wrap { overflow-x: auto; }
.rr-box { background: #fff; border: 1px solid #d9e6ea; border-radius: 8px; margin-top: 15px; }
.rr-box > summary { cursor: pointer; padding: 12px 15px; font-weight: 700; color: #273158; font-family: "Nunito", sans-serif; }
.rr-box > div { padding: 0 15px 15px; }
.rr-box label { margin-bottom: 0; }
.rr-out { font-size: 16px; color: #273158; font-weight: 700; margin: 4px 0 0; }
.rr-out span { color: #2EB24C; }

@media (max-width: 732px) {
    .rr-row { flex-wrap: wrap; }
    .rr-row > div { flex: 1 1 45%; }
    .rr-compare { font-size: 13px; }
    .rr-compare th, .rr-compare td { padding: 6px; }
}
@media (max-width: 732px) {
    .calculator .left .results { flex-wrap: wrap; align-items: baseline; }
    .calculator .left .results .rr-sub { flex-basis: 100%; text-align: right; margin-top: -6px; }
}
