/* Import fonts from google */
@import url('https://fonts.googleapis.com/css2?family=Poppins&family=Roboto&display=swap');


.container {
    margin: 0 auto;
    width: 70%;   
}

/* How to use box */
#how-to-use {
    width: 150px;
    text-align: left;    
    margin: 40px 0 20px 0;   
}

#how-to-use summary {
    cursor: pointer;
    list-style: none;
}

#how-to-use summary::-webkit-details-marker {
    display: none;
}

#how-to-use summary::after {
    content: '\24D8';
    font-weight: 600;
    color: var(--e-global-color-accent);
    padding-left: 5px;
}

#how-to-use[open] summary::after {
/*     content: '\24D8';
 */    font-weight: 600;
 color: var(--e-global-color-primary);
    padding-left: 5px;
}

#how-to-info {
    min-width: 600px;
    height: auto;
    border: solid 2px var(--e-global-color-secondary);
    border-radius: 25px;
    background-color: #ffffff;
    padding: 10px;
    line-height: 1.2;
    margin-top: 5px;
}

#green {
    color: #00b200;
    font-size: 1.2rem;
    font-weight: 600;
}

#red {
    color: #ff0000;
}

/* Currency selector */

#currency {
    padding: 2px;
    margin-bottom: 20px;
    color: var(--e-global-color-text);
    border-radius: 25px;
    border: solid 2px var(--e-global-color-primary);
}

#currency-wrapper {
    text-align: right;
}

/* Form data */

.form-container {
    width: 100%;
    margin: 0 auto;
}

summary h2 {
    text-transform: uppercase;
    display: inline;
    padding-left: 38px;

}

.drop {
    list-style: none;
    background: var(--e-global-color-secondary);
    border-radius: 25px;
    width: 70%;
    margin: 5px auto;
    cursor: pointer;
    border: none;
}

.drop::-webkit-details-marker {
    display: none;
}

.drop::after {
    content: '\25BC';
    font-size: 1.2rem;
    color: var(--e-global-color-primary);
    float: right;
    padding: 7px 20px 0 0;
}

details[open] .drop::after {
    content: '\25B2';
    font-size: 1.2rem;
    color: var(--e-global-color-primary);
    float: right;
    padding: 7px 20px 0 0;
}

.user-input {
        display: grid;
        grid-template-columns: auto auto auto;
        margin: 15px 0;
        justify-content: space-evenly;
        align-items: baseline;
        justify-items: center;
}

.user-input label, .new-box {
    border: solid 0.5px #000000;
    background-color: #ffffff;
    border-radius: 25px !important;
    padding: 10px 2px 10px 5px !important;
    margin-right: 10px;
    display: inline-block;
    width: 25vw !important;
    text-align: left;
    border: solid 2px var(--e-global-color-primary) !important;
    font-size: 1rem;
}


.user-value {
    padding: 10px 2px 10px 5px;
    width: 30vw;
    margin-right: 10px;
    border-radius: 25px!important;
    border-color: var(--e-global-color-primary);
    color: var(--e-global-color-text);
}

.period {
    padding: 2px;
    color: var(--e-global-color-text);
    border-radius: 25px;
    cursor: pointer;
    border: solid 2px var(--e-global-color-primary);
}

/* Add box button */

.add-box {
    width: 70%;
    height: 34px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    align-items: center;
}

.add-box-btn {
    height: 34px;
    font-size: 2rem;
    color: var(--e-global-color-text)!important;
    border: none;
    background-color: unset;
    cursor: pointer;
    margin-bottom: 3px;
}

.add-box p {
    text-align: left;
    padding-left: 5px;
    margin: 0;
}

/* remove box button */

.rem-box {
    width: 70%;
    height: 34px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    align-self: flex-end;
}

.rem-box p {
    padding-right: 5px;
    margin: 0; 
}

.rem-box-btn {
    font-size: 1.5rem;
    color: #ff0000;
    border: none;
    background-color: unset;
    cursor: pointer;
}

/* Calculate button */

#calculate {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#calc-btn, #reset-btn {
    width: 132px;
    padding: 5px;
    margin: 0 10px;
    background-color: #ffffff;
    color: var(--e-global-color-text);
    font-size: 1.2rem;
    font-weight: 700;
    border: solid 2px var(--e-global-color-primary);
    border-radius: 25px;
}

#calc-btn:hover, #reset-btn:hover {
    background-color: var(--e-global-color-primary);
    color: #ffffff;
}

/* Results sec{tion */
#results{
    flex-direction: row;
    justify-content: space-around;
}

#results p {
    font-size: 1.5rem;
    margin-top: 10px;
}

#results h3 {
    margin-bottom: 10px;
}

#incomeTotal, #expenseTotal, #outcome {
    width: 30%;
    display: inline-block;
}

#chart {
    width: 40%;
    height: auto;
    margin: 0 auto;
    display: none;    
}

/* Media queries */

/* For screens up to 1250px wide */

@media screen and (max-width: 1250px) {
    #chart {
        width: 60%;
    }
}

/* For screens up to 800px wide */

@media screen and (max-width: 800px) {

    #heading {
        font-size: 1rem;
    }

    .drop, .user-input, .add-box, .rem-box, .container {
        width: 90%;
    }

    .user-input label, .new-box {
        width: 33vw;
    }

    #chart {
        width: 80%;
    }
}

/* For screens up to 560px wide */

@media screen and (max-width: 560px) {

    .user-input label, .new-box {
        font-size: 0.8rem;
        margin-right: 5px;
    }
    
    .user-value {
        width: 20vw;
        margin-right: 5px;
        padding: 2px 2px 2px 5px;
    }

    #results h3 {
        font-size: 0.9rem;
    }

    #chart {
        width: 100%;
    }
}

/* For screens up to 360px wide */

@media screen and (max-width: 360px) {
    
    .drop, .user-input, .add-box, .rem-box, .container {
        width: 96%;
    }

    #calculate button {
        margin: 2px;
    }
}