@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');

body {
    margin: 0;
    background-color: #E5E5E5;
    font-family: 'Roboto Condensed', sans-serif;
}

header {
    background-color: #FFF;
    box-shadow: 0px 0px 5px #000;
    padding: 20px;
    padding-right: 100px;
}

header * {
    display: inline;
}

header h1 {
    color: #1C1C1C;
}

header h3 {
    color: #5C5C5C;
}

.expired {
    opacity: 0.4;
}

.deals_wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 2.5%;
    margin-bottom: 40px;
}

.deal_badge {
    background-color: #FFFFFF;
    width: 90%;
    border-radius: 10px;
    margin-top: 40px;
    /* small box shadow */
    box-shadow: 14px 10px 10px -10px rgba(0, 0, 0, 0.2);
}

.settings {
    margin-left: auto;
    margin-right: 50%;
    padding: 8px;
    border: 1px solid #5c5c5c;
    border-radius: 10px;
    transition: background-color 0.2s;
}

.settings .label {
    margin-left: 5px;
    margin-right: 5px;
    font-family: 'Roboto Condensed', sans-serif;
}

.settings:hover {
    background-color: grey;
    color: white;
    transition: 0.2s;
    cursor: pointer;
}

/* progresbar */

.progress {
    height: 1.8em;
    width: 100% -3px;
    border: 3px solid;
    border-radius: 10px;
    padding: 1px;
    box-shadow: 14px 0px 10px -10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.progress:before {
    content: attr(data-label);
    font-size: 1.8em;
    position: absolute;
    text-align: center;
    left: 0;
    right: 0;
    color: #fff;
    font-weight: 400;
}


@keyframes widthAnimation {
    from {
        width: 100%;
    }

    to {
        width: auto;
    }
}

.progress .value {
    display: inline-block;
    vertical-align: top;
    height: 100%;
    border-radius: 7px;
    /* animate progressbar */
    transition: width 0.5s ease-in-out;
    animation: widthAnimation 0.5s;
    width: 100%;
}


/* badge header */

.badge_content {
    margin: 1em;
    margin-left: 1.5em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: inherit;
}

.title {
    font-weight: 700;
    font-size: 1.5em;
    color: #253858;
}

.subtitle {
    font-weight: 400;
    font-size: 1.2em;
    color: #253858;
    /*line-height: 0;*/
}

.badge_header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.badge_header img {
    height: 60px;
}


/* badge image */

.deal_img {
    max-height: 10em;
    max-width: 60%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/* last update */

.last_update {
    margin-top: 20px;
    text-align: center;
}


/* badge footer */

.badge_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prices {
    width: fit-content;
}

.new_price {
    font-weight: 700;
    font-size: 2em;
    color: #253858;
    text-align: right;
    margin-top: 0;
}

.old_price {
    font-weight: 400;
    font-size: 1.5em;
    color: #253858;
    text-decoration: line-through;
    line-height: 0;
    margin-bottom: 0;
}

.view_btn_anchor {
    text-decoration: none;
}

.view_btn {
    color: #FFFFFF;
    border-radius: 10px;
    padding: 0.5em;
    font-weight: 400;
    font-size: 1.25em;
    text-align: center;
    margin-top: 1em;
    width: fit-content;
    align-self: flex-end;
    box-shadow: 14px 10px 10px -10px rgba(0, 0, 0, 0.2);
    transition: 0.2s;

}

.view_btn:hover {
    filter: brightness(110%);
    box-shadow: 14px 0px 10px -10px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
}


/* footer */

footer {
    background-color: #fff;
    box-shadow: 0px 0px 5px #000;
    padding: 5px;
    padding-left: 40px;
    padding-right: 40px;
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    color: #5C5C5C;
}

.github_icon {
    margin-top: 5px;
    width: 40px;
    height: 40px;
    margin-right: 20px;
}


/* settings modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal .wrapper {
    border: 1px solid black;
    margin: 15% auto;
    max-width: 50%;
    padding: 20px;
    background-color: #FFFFFF;
    border-radius: 10px;

}


#close-modal {
    padding: 8px;
    border: 1px solid #5c5c5c;
    background-color: #FFFFFF;
    border-radius: 10px;
    transition: background-color 0.2s;
}

#close-modal:hover {
    background-color: #5C5C5C;
    color: #FFFFFF;
    transition: 0.2s;
}

#close-modal .label {
    margin-left: 5px;
    margin-right: 5px;
    font-family: 'Roboto Condensed', sans-serif;
}


.open {
    display: block !important;
}

/* form */
.form-group label {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    color: #253858;
    display: block;
}

.form-group select {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    font-size: 1em;
    color: #253858;
    border-radius: 5px;
    border: 1px solid #5C5C5C;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.form-group input {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    font-size: 1em;
    color: #253858;
    border-radius: 5px;
    border: 1px solid #5C5C5C;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.form-group select option {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    font-size: 1em;
    color: #253858;
    border-radius: 5px;
    border: 1px solid #5C5C5C;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
}


/* responsive */

@media (max-width: 800px) {
    .badge_header {
        display: flex;
        flex-direction: column-reverse;
        justify-content: start;
        align-items: center;
    }

    .deals_wrapper {
        grid-template-columns: 1fr;
        margin-left: 30px;
    }

    .title {
        font-size: 1.3em;
    }

    .subtitle {
        font-size: 1em;
    }

    .new_price {
        font-size: 1.8em;
    }

    .old_price {
        font-size: 1.3em;
    }

    .view_btn {
        font-size: 1.3em;
    }

    .settings {
        margin-left: 0;
        margin-right: 0;
    }

    .settings .label {
        display: none;
    }
}


/* 3 columns on desktop */
@media (min-width: 1200px) {
    .deals_wrapper {
        grid-template-columns: 1fr 1fr 1fr;
        display: grid;
        margin-left: 2.5%;
        margin-bottom: 40px;

    }

    .title {
        font-size: 1.2em;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .new_price {
        font-size: 1.4em;
    }

    .old_price {
        font-size: 1.2em;
    }

    .view_btn {
        font-size: 1.1em;
    }

    .last_update {
        font-size: 0.8em;
    }
}