body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    color: white;
    background-color: black;
}

button,
.button {
    -moz-appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border-radius: 4px;
    padding: 0.25rem;
    color: inherit;
    border: 1px solid;
    font-variant: small-caps;
}

.button-main {
    border: 2px solid;
    border-radius: 5px;
    font-weight: 500;
}

.button-dark {
    border-color: white;
}

.container {
    display: grid;
    grid-template-rows: auto 2rem 1fr 2rem;
    grid-row-gap: 0.5rem;
    grid-template-areas: "header"
        "search"
        "body"
        "footer";
    height: 100vh;
}

.header {
    grid-area: header;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    padding-bottom: 0;
}

.header__title {
    font-weight: 500;
    font-variant: small-caps;
    font-size: 1.2rem;
}

.header__user {
    cursor: pointer;
}

.header__user__yes {
    display: none;
}

.header__user__no {
    font-size: 0.8rem;
}

.header_user--loggedin>.header__user__no {
    display: none;
}

.header_user--loggedin>.header__user__yes {
    display: inline;
}

.search {
    grid-area: search;
    display: flex;
    margin-left: 10px;
    margin-right: 10px;
    align-items: stretch;
}

.search>#search__field {
    display: flex;
    flex-grow: 1;
    border: 1px solid white;
    border-radius: 8px;
}

.search #searchText {
    flex-grow: 1;
    background-color: inherit;
    color: inherit;
    padding-left: 5px;
    border: none;
}

.search #searchText:focus {
    outline: none;
}

.search__icnsearch {
    width: 25px;
    height: 25px;
    align-self: center;
    margin-right: 5px;
}

.search__icnfilter {
    width: 25px;
    height: 25px;
    align-self: center;
    margin-right: 5px;
    margin-left: 5px;
}

.body {
    grid-area: body;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    margin-right: 10px;
}

.body__item {
    display: grid;
    grid-auto-rows: 35px;
    border: 1px solid white;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.body__item--closed {
    grid-template-columns: 1fr auto auto 35px;
    grid-template-areas: "title price_state price toggle";
}

.body__item--opened {
    grid-template-columns: auto 1fr auto auto auto 35px;
    grid-template-areas: "title title title price_state price toggle"
        "calendar_purchased purchase_date usage_info usage_info usage_info usage_info"
        "calender_target target_date usage_dollar usage_dollar usage_dollar usage_dollar"
        "target_icn days_target days_target days_target days_target days_target";
}

.body__item__title {
    grid-area: title;
    font-variant: small-caps;
    justify-self: start;
    align-self: center;
    margin-left: 5px;
}

.body__item__pricestate {
    grid-area: price_state;
    justify-self: center;
    align-self: center;
    margin-right: 3px;
    width: 0.8rem;
}

.body__item__price {
    grid-area: price;
    font-variant: small-caps;
    justify-self: end;
    align-self: center;
}

.body__item__toggle {
    grid-area: toggle;
    width: 15px;
    height: 15px;
    margin-right: 5px;
    margin-top: 5px;
    align-self: start;
    justify-self: end;
}

.body__item__toggle:hover {
    animation: show-collapse-down 500ms 3s 8 ease-out none;
}

.body__item__toggle--animate {
    animation: show-collapse-down 500ms 3s 8 ease-out none;
}

.body__item__calendar__purchased {
    grid-area: calendar_purchased;
    width: 20px;
    align-self: center;
    justify-self: center;
    margin-left: 10px;
}

.body__item_purchasedate {
    grid-area: purchase_date;
    align-self: center;
    margin-left: 5px;
}

.body__item_usageinfo {
    grid-area: usage_info;
    align-self: center;
    margin-right: 5px;
}

.body__item__calendar__target {
    grid-area: calender_target;
    width: 20px;
    align-self: center;
    justify-self: center;
    margin-left: 10px;
}

.body__item__targetdate {
    grid-area: target_date;
    align-self: center;
    margin-left: 5px;
}

.body__item__usagedollar {
    grid-area: usage_dollar;
    align-self: center;
    margin-right: 5px;
}

.body__item__targeticn {
    grid-area: target_icn;
    width: 20px;
    align-self: center;
    justify-self: center;
    margin-left: 10px;
}

.body__item__daystotarget {
    grid-area: days_target;
    align-self: center;
    margin-left: 5px;
}

.footer {
    font-size: 0.6rem;
    grid-area: footer;
    align-self: center;
    justify-self: center;
}

.footer a:link,
.footer a:visited,
.footer a:active,
.footer a:hover {
    color: white;
    text-decoration: underline;
}

@media only screen and (min-width: 48rem) {
    .body {
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;
        justify-content: left;
        align-content: flex-start;
    }

    .body__item {
        margin-right: 10px;
        min-width: 22.5rem;
    }
}

@keyframes show-collapse-down {
    0% {
        transform: translateY(1px);
    }
    50% {
        transform: translateY(2px);
    }
    100% {
        transform: translateY(3px);
    }
}