/*
 *  Loan Interest Calculator
 *  version: 1.0
 *  Date Create: 24-3-2025
 *  Author: Yousaf Harry
*/

/******************************** Common CSS *******************************/
#loan-interest-calculator-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #8fbae3;
}

/* Slider container */
#slider-container,
#calculation-container {
    width: 100%;
}

/* Desktop layout */
@media (min-width: 768px) {
    #slider-container,
    #calculation-container {
        /* Each takes up about 50% width */
        /*width: 48%;*/
    }

    #loan-interest-calculator-container {
        justify-content: space-between; /* Align side by side on desktop */
        max-width: fit-content;
    }
}

#slider-container > p > span { color: #FFFFFF; }
#slider-container > p { margin: 0px; }
/******************************** Slider CSS *******************************/
#slider-container {
    text-align: center;
}

#slider {
    width: 100%;
    -webkit-appearance: none;  /* Remove default styling */
    appearance: none;
    appearance: none;          /* Remove default styling */
    height: 8px;              /* Slider track height */
    background: #fff;         /* Slider track color */
    border-radius: 5px;       /* Rounded track */
    outline: none;
}

/* Custom triangular thumb for Chrome */
#slider::-webkit-slider-thumb {
    -webkit-appearance: none;  /* Remove default thumb styling */
    appearance: none;          /* Remove default thumb styling */
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #000000; /* Triangle pointing upwards */
    background: transparent;  /* Make background transparent */
    cursor: pointer;          /* Set the cursor to a pointer when hovering */
    position: relative;
    top: -3px;                /* Position the triangle upwards */
    border-radius: 30%;        /* Make the thumb circular */
}

/* Custom triangular thumb for FirFox */
#slider::-moz-range-thumb {
    -webkit-appearance: none;  /* Remove default thumb styling */
    appearance: none;          /* Remove default thumb styling */
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #000000; /* Triangle pointing upwards */
    background: transparent;  /* Make background transparent */
    cursor: pointer;          /* Set the cursor to a pointer when hovering */
    position: relative;
    top: -5px;                /* Position the triangle upwards */
    border-radius: 30%;        /* Make the thumb circular */
}

.slider-labels {
    top: -25px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    color: #000000;
    font-weight: 600;
}

@media (max-width: 470px) {
    .slider-label {
        font-size: .5em !important;
    }

    .calculation_container > p  {
        font-size: .7em !important;
    }

    #total_interest {
        font-size: 3em !important;
    }
}

.slider-label {
    font-size: .7em;
}

#amount {
    font-size: 18px;
    width: 120px;
    border-radius: 5px;
    border: none;
    padding: 2px;
}

/* Add dollar sign before input value */
#amount::before {
    content: "$";  /* Dollar sign */
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

/************************** Calculation Container CSS *******************************/
.calculation_container > hr, .last_content_container > hr {
    color:  #ffffff30;
    margin: 18px 0px !important;
    background: #fff !important;
    height: 1px !important;
    border: none !important;
}

.total_months_container {
    color: #FFFFFF !important;
}

.calculation_container > p {
    margin: 0px;
    color: #000000;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
}

#total_months {
    font-size: 3em;
}

#total_interest {
    font-size: 3em;
    color: red;
    line-height: 1;
}
