.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;
}

.form-v4-content button {
    padding: 10px;
    background-color: #273158;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
    font-family: "Nunito",sans-serif;
    font-weight: 700;
}

.result h2 {
    color: #333;
}

#goldChart {
    margin-top: 20px;
    height: 300px !important;
    width: 300px !important;
}

#lumpsum-details {
    margin-top: 20px;
    text-align: left;
    color: #555;
    background: #e9f9ff;
    padding: 30px;
}

.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%);
}

.form-v4-content h2 {
    text-align: center;
    color: #333;
}

.calculator {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.left, .right {
    width: 30%;
}

.chart-container {
    width: 30%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-container canvas {
    max-width: 180px;
    width: 100% !important;
    height: auto !important;
}

.form-v4-content h3 {
    margin-bottom: 10px;
    color: #273158;
    font-weight: 700;
}

.left p {
    font-size: 20px;
    font-weight: bold;
    color: #2EB24C;
    font-family: "Nunito",sans-serif;
}

.form-v4-content label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
    font-family: "Nunito",sans-serif;
}

.form-v4-content input[type="range"] {
    width: 100%;
}

.form-v4-content input[type="text"], .form-v4-content select {
    width: 100%;
    padding: 8px;
    padding-right: 30px; /* Space for the dropdown arrow */
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #add8e67a;
    font-size: 14px;
    font-family: "Nunito", sans-serif;
    box-sizing: border-box;
}

.total {
    text-align: center;
    margin-top: 20px;
}

.total h3 {
    color: #273158;
}

.total h3 p {
    color: #2EB24C;
}

/* Common styles for all browsers */
.form-v4-content input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    margin-bottom: 15px; /* Added this to separate it from the text box below */
}

.form-v4-content input[type="range"]:hover {
    opacity: 1;
}

.form-v4-content input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #273158 0%, #2EB24C 100%);
    border-radius: 5px;
}

.form-v4-content input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #273158 0%, #2EB24C 100%);
    border-radius: 5px;
}

.form-v4-content input[type="range"]::-ms-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.form-v4-content input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    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);
    margin-top: -4px;
}

.form-v4-content 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);
}

.form-v4-content 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);
}

/* Table responsive fixes */
.table-responsive {
    overflow-x: auto;
}

.form-v4-content table {
    min-width: 650px;
}

/* Responsive design */
@media (min-width: 768px) {
    .calculator {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .form-v4-content {
        width: 100%;
        padding: 20px 15px !important;
        border-radius: 12px;
        box-sizing: border-box;
    }
    
    .form-v4-content h1 {
        font-size: 24px !important;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 14px !important;
    }
    
    .calculator {
        display: flex;
        flex-direction: column;
        margin-top: 20px;
        gap: 25px;
    }
    
    .calculator .right {
        order: 1 !important;
    }
    
    .calculator .right > div {
        margin-bottom: 20px;
    }

    .calculator .chart-container {
        order: 2 !important;
    }
    
    .form-v4-content canvas {
        width: 170px !important;
        height: 170px !important;
        margin: auto;
    }

    .calculator .left {
        order: 3 !important;
    }
    
    .calculator .left .results {
        display: flex;
        justify-content: space-between;
        padding: 12px 0;
        align-items: center;
        border-bottom: 1px solid #ddd;
    }

    .calculator .left .results:last-child {
        border-bottom: none;
    }

    .calculator .left .results h3 {
        font-size: 15px;
        margin-bottom: 0;
    }

    .calculator .left .results p {
        font-size: 18px !important;
        margin-bottom: 0;
    }
    
    .left, .right, .chart-container {
        width: 100% !important;
    }
    
    .total {
        margin-top: 25px;
    }

    .total h3 {
        font-size: 18px;
    }

    .total p {
        font-size: 28px;
    }

    .form-v4-content input[type=range]::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
        margin-top: -6px;
    }
    
    .form-v4-content label {
        font-size: 15px;
        font-weight: 700;
    }
    
    .form-v4-content input[type="text"], .form-v4-content select {
        width: 100% !important;
        height: 46px;
        font-size: 16px;
        margin-top: 15px !important;
    }
}
