.interest-calculator {
    padding: 2rem 1rem;
}

.interest-card {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    flex-wrap: wrap;
    padding: 3rem;
}

/* Left Side */
.interest-left {
    flex: 1;
    min-width: 300px;
}

.interest-left label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    margin-top: 15px;
}

.interest-left input,
.interest-left select {
    width: 80%;
    padding: 13px 12px;
    border: 1px solid #ccc;
    font-family: 'Roboto Slab', serif;
    border-radius: 8px;
    font-weight:400;
    font-size: 1rem;
}

/* Custom select styles */
.custom-select {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
}

.select-selected {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 12px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-selected.active {
    border-color: #0F2BC9;
    box-shadow: 0 0 5px rgba(15, 43, 201, 0.3);
}

.select-selected .arrow {
    transition: transform 0.3s ease;
}

.select-selected.active .arrow {
    transform: rotate(180deg);
}

.select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: none;
    font-family: 'Roboto Slab', serif;
    max-height: 200px;
    overflow-y: auto;
}

.select-items div {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.select-items div:hover {
    background-color: #f0f4ff;
}

/* Input with suffix (like %) */
.input-suffix {
    position: relative;
    display: inline-block;
    width: 80%;
}

.input-suffix input {
    width: 100%;
    padding-right: 30px;
    box-sizing: border-box;
}

.input-suffix .suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #555;
    font-weight: bold;
}

/* Custom Radio Buttons */
.interest-type-radio,
.interest-length-radio {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    margin-top: 5px;
}

.radio-container {
    display: inline-block;
    position: relative;
    padding-left: 25px;
    margin-right: 30px;
    margin-bottom: 4px;
    cursor: pointer;
    font-weight: 400;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-container .checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 23px;
    width: 23px;
    background-color: #fff;
    border: 1px solid #000;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.radio-container input:checked~.checkmark {
    background-color: #0F2BC9;
}

.radio-container .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked~.checkmark:after {
    display: block;
}

.radio-container .checkmark:after {
    top: 4px;
    left: 4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: white;
}

/* Button */
.interest-calc-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #0F2BC9 0%, #667eea 100%);
    width: 80%;
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    cursor: pointer;
    transition: background 0.3s ease;
}

.interest-calc-btn:hover {
    transform: translateY(1px);
}

/* Chart Container */
.interest-chart-container {
    width: 100%;
    max-width: 280px;
    margin: 120px auto 20px auto;
    flex: 1;
}

.interest-chart-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.interest-chart-legend div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.interest-chart-values {
    display: flex;
    justify-content: space-around;
    margin: -8px -18px 0 0;
    font-weight: 400;
}

.interest-chart-values div {
    text-align: center;
    min-width: 60px;
}

/* Chart dots */
.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.dot-blue {
    background: #0F2BC9;
}

.dot-pink {
    background: #FF69B4;
}

/* Remove arrows from number inputs */
.interest-left input[type=number]::-webkit-outer-spin-button,
.interest-left input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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


/***** Result section ******/
.interest-result-card {
    max-width: 1000px;
    margin: 2rem auto 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    flex: 1;
    min-width: 150px;
}

.result-box .result-value {
    font-size: 1.6rem;
    font-weight: 500;
    color: #0a750ada;
    margin-bottom: 0.5rem;
}

.result-box .result-label {
    font-weight:500;
    font-family: 'Roboto Slab', serif;
    color: #555;
    font-size: 1.1rem;
}


.formula-block {
    font-weight: bold;
    font-size: 1.1rem;
    background: #f0f4ff;
    width: auto;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}


/***** Media Query *****/
/***** Tablets in portrait & smaller laptops (≤991px) ******/
@media (max-width: 991px) {
    .interest-card {
        max-width: 920px;
        padding: 3rem;
    }

    .interest-result-card {
        max-width: 920px;
        margin: 2rem auto 0 auto;
        padding: 1.5rem 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/***** Standard tablets & landscape phones (≤768px) ******/
@media (max-width: 768px) {
    .interest-card {
        max-width: 540px;
        padding: 3rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }

    .interest-result-card {
        max-width: 540px;
        margin: 2rem auto 0 auto;
        padding: 1.5rem 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .interest-left input,
    .interest-left select {
        width: 100%;
        padding: 13px 12px;
        font-weight: 500;
        font-size: 1rem;
    }

    .interest-calc-btn {
        margin-top: 20px;
        padding: 1rem 3rem;
        background: #000000;
        width: 100%;
    }

    .interest-chart-container {
        width: 100%;
        max-width: 280px;
        margin: 40px auto 20px auto;
        flex: 1;
    }
}

/***** Small smartphones (≤450px) ******/
@media (max-width: 450px) {
    .interest-card {
        max-width: 450px;
        padding: 3rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        overflow: hidden;
    }


    .interest-result-card {
        max-width: 450px;
        margin: 2rem auto 0 auto;
        padding: 1.5rem 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }


    .interest-left input,
    .interest-left select {
        width: 100%;
        padding: 13px 12px;
        font-weight: 500;
        font-size: 1rem;
    }

    .interest-calc-btn {
        margin-top: 20px;
        padding: 1rem 3rem;
        background: #000000;
        width: 100%;
    }

    .interest-chart-container {
        width: 100%;
        max-width: 200px;
        margin: 40px auto 20px auto;
        flex: 1;
    }

    .interest-type-radio,
    .interest-length-radio {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }

    .radio-container {
        margin-right: 0;
        padding-left: 30px;
        flex: 0 1 100%;
        box-sizing: border-box;
        white-space: normal;
    }

    .formula-block {
        font-size: 0.9rem;
        padding: 6px;
    }
}

/***** Extra small phones & older devices (≤365px) ******/
@media (max-width: 365px) {

    .interest-type-radio,
    .interest-length-radio {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .radio-container {
        margin-right: 0;
        padding-left: 25px;
        flex: 0 1 100%;
        box-sizing: border-box;
        white-space: normal;
    }

    .interest-left input,
    .interest-left select {
        width: 100%;
        padding: 12px 12px;
        font-size: 0.8rem;
    }

    .interest-calc-btn {
        width: 100%;
        padding: 1rem 2rem;
    }

    .interest-card {
        max-width: 100%;
        padding: 1rem;
    }

    .interest-result-card {
        max-width: 100%;
        padding: 1rem;
    }

    .interest-chart-container {
        max-width: 180px;
        margin: 20px auto 10px auto;
    }

    .formula-block {
        font-size: 0.85rem;
        padding: 5px;
    }
}