/* google font  */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

:root {
    --main-blue: #d2dfff;
    --black: #13151a;
    --muted-text: #424242;
    --red: #ed9292;
    --green: #297054b0;
    --yellow: #FCE38A;
    --blue: #8b8dff;
    --light-blue: #DFF5FF;
    --blue: #98deff;

}

::-webkit-scrollbar {
    display: none;
}



body {
    width: 100%;
    height: 100vh;
    color: var(--black);
}

.main {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    height: 100%;
    padding: 2%;
    width: 100%;
}

button {
    border: none;
    cursor: pointer;
    font-weight: 500;
}

button:hover {
    opacity: 0.7;
}

.show {
    display: flex !important;
}

.greeting {
    display: none;
    line-height: 1;
    margin-left: 5px;
}

.greeting p {
    color: var(--muted-text);
    font-size: 1.5rem;
}

.greeting h1 {
    font-size: 1.8rem;
    font-weight: 600;
}



/*------------------------ left container starts here-------------------  */
.left-container {
    height: 100%;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* money left card  */
.money-left-card {
    display: flex;
    height: 150px;
    justify-content: space-between;
    padding: 20px 40px;
    background-color: var(--main-blue);
    border-radius: 15px;
}

.chart-container canvas {
    cursor: pointer;
}

.money-left-card .card-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.money-left-card h1 {
    font-weight: 800;
    font-size: 4.2rem;
    line-height: 1;
}

.money-left-card p {
    font-size: 1.5rem;
    color: #424242;
}


/* total ammounts section  */

.budg-exp-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.total-budget {
    background-color: var(--green);
}

.total-card {
    padding: 10px 15px;
    border-radius: 15px;
}

.total-card div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-card h4 {
    font-size: 2rem;
}

.total-card p {
    color: var(--muted-text);
}

.total-exp {
    background-color: var(--red);
}



/* add budget or exp section  */

.add-money-card {
    background-color: var(--light-blue);
    margin-top: 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.add-type {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-radius: 15px 15px 0px 0;
    height: 45px;
    overflow: hidden;
}

.tag-input {
    width: 100px;
    display: none;
    background-color: #fff;
    border-radius: 50px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 25px;
}

.tag-input input {
    font-size: 0.8rem !important;
    height: 100%;
    outline: none;
    display: inline-block !important;
    width: 100%;
}

.selected-add-exp {
    background-color: var(--red);
    box-shadow: 2px 0px 10px #474747a7;
    z-index: 10;
}

.selected-add-bud {
    background-color: var(--green);
    box-shadow: -2px 0px 10px #474747a7;
    z-index: 10;
}


.add-money-card .form-container,
.edit-form-container {
    padding: 0px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exp-for input {
    display: none;
}

input[type="number"],
input[type="text"] {
    font-size: 1rem;
    padding: 5px 10px;
    height: 35px;
    border: none;
    outline-color: var(--blue);
    border-radius: 5px;
}

.exp-for {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.exp-for label,
.exp-for button {
    background-color: var(--main-blue);
    border: 2px solid #fff;
    padding: 2px 5px;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
}

.exp-for button {
    background-color: var(--yellow);
}


.exp-for label:hover {
    background-color: var(--yellow);
}

.add-money-card .add-money-card-btn {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 40px;
    border-radius: 0px 0px 15px 15px;
    overflow: hidden;
    margin-top: 15px;

}

.add-money-card .add-money-card-btn button:first-child {
    background-color: var(--yellow);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}


/*------------------------------- left container ends here--------------------------  */

/* -------------------------------- right container starts here ----------------------   */
.right-container {
    width: 60%;
}

.right-container .history-text {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-text select {
    padding: 5px;
    border: 1px solid #aeaeae;
    border-radius: 15px;
    outline-color: var(--blue);
}

.right-container .money-history-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100% - 60px);
    overflow-y: scroll;
}

.money-history-container .trans-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 1.1rem;
    border: 1px solid #aeaeae;
    border-radius: 15px;
    align-items: center;
}

.trans-item h4 {
    font-size: 1.5rem;
    color: var(--red);
}



.trans-item div:nth-child(1) {
    display: flex;
    gap: 20px;
    align-items: center;
}

.trans-item .trans-item-btn {
    display: flex;
    gap: 20px;
}

.trans-item-btn button {
    display: grid;
    place-content: center;
    background-color: var(--main-blue);
    height: 35px;
    width: 35px;
    border-radius: 50px;
}

.trans-date {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.tranTagContainer {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tranTagContainer .trans-date {
    display: none;
}


/* -------------------------------- right container ends here ----------------------   */


/* edit money card stars here  */
.edit-money-card {
    overflow: hidden;
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 999;
    flex-direction: column;
    gap: 15px;
    background-color: var(--light-blue);
    border-radius: 15px;
    font-size: 1.1rem;
    box-shadow: 0px 0px 30px #0000005c;
}

.edit-money-card>button {
    background-color: var(--yellow);
    padding: 10px 0;
    font-weight: 500;
}

.edit-money-card .add-type {
    position: relative;
}

.edit-money-card .add-type button {
    position: absolute;
    right: 10px;
    height: 20px;
    width: 20px;
    border-radius: 50px;
    display: grid;
    place-content: center;
    background-color: var(--light-blue);
}



.edit-money-card .add-type {
    background-color: var(--yellow);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.info-container {
    display: none;
    gap: 8px;
    color: var(--red);
    font-size: 0.75rem;
    line-height: 0;
    margin-left: 15px;
    font-family: monospace;
    align-items: center;

}

/* edit money card ends here  */

.mobile-add-btn {
    display: none;
    place-content: center;
    height: 60px;
    width: 60px;
    border-radius: 50px;
    background-color: var(--yellow);
    box-shadow: 0px 0px 30px #0000005c;
    position: fixed;
    bottom: 20px;
    left: 50%;
    font-size: 1.1rem;
    transform: translate(-50%, -50%);
}



@media screen and (max-width:1030px) {

    .display-cards h1 {
        font-size: 3rem;
    }

    .display-cards h4 {
        font-size: 1.5rem;
    }

    .money-left-card {
        padding: 15px 30px;
    }

}

@media screen and (max-width:850px) {
    body {
        height: 100%;
    }

    .main {
        flex-direction: column;
        padding: 3%;
        gap: 20px;
        padding-top: 5%;
    }

    .left-container {
        width: 100%;
    }

    .money-left-card {
        padding: 20px 30px;
    }

    @keyframes fade {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }



    .rotatePlus {
        transform: rotateY(40deg);
        -webkit-transform: rotate(40deg);
    }




    .add-money-card {
        display: none;
        box-shadow: 0px 0px 30px #00000099;
        position: fixed;
        width: 90%;
        bottom: 20px;
        left: 50%;
        transform: translate(-50%, -50%);
        animation-name: fade;
        animation-duration: 0.3s;
        animation-timing-function: ease-in-out;
    }



    .money-left-card p {
        font-size: 1.2rem;
    }

    .card-text-container {
        width: 50%;
    }

    .card-text-container h1 {
        font-size: 2.5rem;
    }

    .chart-container {
        width: 40%;
        display: grid;
        place-content: center;
    }

    .total-card p {
        font-size: 1rem;
    }

    .total-card h4 {
        font-size: 1.5rem;
    }

    .greeting {
        display: inline-block;

    }

    .right-container {
        width: 100%;
    }

    .right-container .history-text {
        font-size: 1rem;
    }

    .trans-item {
        padding: 5px 10px;
    }

    .trans-item h4 {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .trans-item p {
        font-size: 1rem;
    }

    .trans-item-btn button {
        font-size: 0.8rem;
        height: 30px;
        width: 30px;
    }

    .trans-date {
        display: none;
    }

    .tranTagContainer .trans-date {
        font-size: 0.7rem;
        display: flex;
    }


    .mobile-add-btn {
        display: grid;
    }

}