/**********************************************
*** GENERAL
**********************************************/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: #555;
    font-family: Open Sans;
    font-size: 16px;
    position: relative;
    min-height: 100vh;
    font-weight: 400;
}

.red {
    color: #ff5049 !important;
}
.red-focus:focus {
    border: 1px solid #ff5049 !important;
}

/**********************************************
*** TOP PART
**********************************************/

.top {
    min-height: 40vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url("./background.jpg.jpg");
    /* background-size: cover; */
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
}

.budget {
    /* position: absolute; */
    /* width: 350px; */
    color: #fff;
}
.reset__btn {
    background-color: #fff;
    color: #28b9b5;
    border: none;
    border-radius: 20px;
    padding: 1rem 3rem;
    font-size: 30px;
    cursor: pointer;
    transform: scale(0.95);
    position: absolute;
    top: 2rem;
    left: 3rem;

    transition: all 0.3s;
}
.reset__btn:focus {
    outline: none;
}
.reset__btn:active {
    transform: scale(0.85);
}

.item:hover .item__delete--btn {
    display: block;
}
.budget__title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 300;
}

.budget__value {
    font-weight: 300;
    font-size: 46px;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

.budget__income,
.budget__expenses {
    padding: 12px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.budget__income {
    margin-bottom: 10px;
    background-color: #28b9b5;
}

.budget__expenses {
    background-color: #ff5049;
}

.budget__income--text,
.budget__expenses--text {
    font-size: 14px;
    color: #444;
    font-weight: 600;
}

.budget__income--values,
.budget__expenses--values {
    display: flex;
}

.budget__income--value,
.budget__expenses--value {
    letter-spacing: 1px;
}

.budget__income--percentage,
.budget__expenses--percentage {
    width: 34px;
    font-size: 11px;
    padding: 3px 0;
    margin-left: 10px;
}

.budget__expenses--percentage {
    background-color: rgba(255, 255, 255, 0.2);
    text-align: center;
    border-radius: 3px;
}

/**********************************************
*** BOTTOM PART
**********************************************/

/***** FORM *****/
.form {
    padding: 14px;
    border-bottom: 1px solid #e7e7e7;
    background-color: #f7f7f7;
}

.form__container {
    margin: 0 auto;
    text-align: center;
}

.form__type {
    width: 55px;
    border: 1px solid #e7e7e7;
    height: 44px;
    font-size: 18px;
    color: inherit;
    background-color: #fff;
    margin-right: 10px;
    font-weight: 300;
    transition: border 0.3s;
}

.form__description,
.form__value {
    border: 1px solid #e7e7e7;
    background-color: #fff;
    color: inherit;
    font-family: inherit;
    font-size: 14px;
    padding: 12px 15px;
    margin-right: 10px;
    border-radius: 5px;
    transition: border 0.3s;
}

.form__description {
    width: 400px;
}
.form__value {
    width: 100px;
}

.form__btn {
    font-size: 35px;
    background: none;
    border: none;
    color: #28b9b5;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.1;
    margin-left: 10px;
}

.form__btn--red i {
    color: #ff5049;
}

.form__btn:active {
    transform: translateY(2px);
}

.form__type:focus,
.form__description:focus,
.form__value:focus {
    outline: none;
    border: 1px solid #28b9b5;
}

.form__btn:focus {
    outline: none;
}

/***** LISTS *****/
.container {
    max-width: 1024px;
    margin: 60px auto;
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
}

.income,
.expenses {
    flex-basis: 45%;
}

h2 {
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 15px;
}

.icome__title {
    color: #28b9b5;
}
.expenses__title {
    color: #ff5049;
}

.item {
    padding: 13px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    justify-content: space-between;
}

.item:first-child {
    border-top: 1px solid #e7e7e7;
}
.item:nth-child(even) {
    background-color: #f7f7f7;
}

.item__values-container {
    display: flex;
}

.item__value {
    transition: transform 0.3s;
}

.item__percentage {
    margin-left: 20px;
    transition: transform 0.3s;
    font-size: 11px;
    background-color: #ffdad9;
    padding: 3px;
    border-radius: 3px;
    width: 32px;
    text-align: center;
}

.income .item__value,
.income .item__delete--btn,
.income .item__edit--btn {
    color: #28b9b5;
}

.expenses .item__value,
.expenses .item__percentage,
.expenses .item__delete--btn,
.expenses .item__edit--btn {
    color: #ff5049;
}

.item__edit--btn {
    font-size: 22px;
    margin-right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: translateY(-1px);
    display: none;
}
.item__edit--btn:focus {
    outline: none;
}
.item__edit--btn:active {
    transform: translateY(2px);
}
.item:hover .item__edit--btn {
    display: block;
}

.item__delete--btn {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    display: none;
}

.item__delete--btn:focus {
    outline: none;
}
.item__delete--btn:active {
    transform: translateY(2px);
}

.item:hover .item__delete--btn {
    display: block;
}
.item:hover .item__value {
    transform: translateX(-20px);
}
.item:hover .item__percentage {
    transform: translateX(-20px);
}

.unpaid {
    background-color: #ffdad9 !important;
    cursor: pointer;
    color: #ff5049;
}

.unpaid .item__percentage {
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
}
.unpaid:hover .item__description {
    font-weight: 900;
}

@media screen and (max-width: 600px) {
    /* top */

    .body {
        font-size: 10px;
    }
    .top {
        min-height: 20vh;
        padding: 2rem 0;
    }
    .reset__btn {
        background-color: #ff5049;
        font-size: 15px;
        top: 4.3rem;
        left: 2.2rem;
        padding: 0.7rem 1.5rem;
    }
    .budget__title {
        font-size: 20px;
        margin-bottom: 3px;
    }
    .budget__value {
        font-size: 35px;
        margin-bottom: 16px;
    }
    .budget__income,
    .budget__expenses {
        padding: 10px;
    }

    /* bottom */

    .form {
        padding: 10px;
    }
    /* .form__container {
        padding: 15px;
        text-align: left;
    } */
    .form__type {
        width: 35px;
        height: 37px;
        border-radius: 5px;
        font-size: 14px;
        margin-right: 5px;
    }
    .form__description,
    .form__value {
        font-size: 12px;
        padding: 10px 11px;
        margin-right: 5px;
    }
    .form__description {
        width: 250px;
        margin-bottom: 5px;
    }
    .form__value {
        min-width: 150px;
    }
    .form__btn {
        font-size: 32px;
    }

    /* list items */

    .container {
        padding: 0 .5rem;
        flex-direction: column;
        gap: 20px;
    }
}
