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

body {
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

h1,
h2,
h3,
h4 {
    font-family: 'Schibsted Grotesk', sans-serif;
    font-weight: 900;
}

.wrapper {
    padding: 1rem;
    min-width: 350px;
}

header {
    background-image: url(../images/bkg-cropped.jpg);
    /* Source: https://unsplash.com/photos/THJJRUhNlEc */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgb(77, 71, 71);
    background-blend-mode: multiply;
    color: white;
    margin: -1rem;
    /* padding: .4rem .4rem 0; */
}

header h1 {
    font-weight: 900;
    font-size: 3rem;
    margin: 0;
    padding-left: .6rem;
    padding-top: .4rem;
}

header h3 {
    font-size: 1.8rem;
    text-align: right;
    margin-top: 4rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-top: -20px;
}

.search-bar input,
.search-bar button {
    padding: .6rem;
    border: 1px solid gray;
    /* border-radius: 5px; */
    font-size: .875rem;
}

.search-bar input {
    margin-right: -6px;
    border-radius: 5px 0 0 5px;
    background-image: url(../images/search.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-blend-mode: difference;
    background-color: white;
    padding-left: 2.8rem;
}

.search-bar button {
    border-radius: 0 5px 5px 0px;
}

/* Movie Container */

.results {
    margin: 0 -.4rem;
}

.movie-not-found {
    margin-top: 2rem;
    text-align: center;
}

.movie {
    margin-top: 2rem;
    display: grid;
    gap: .6rem;
    grid-template-columns: min-content 1fr;
    grid-template-rows: 1fr 1fr;
    border-bottom: 1.5px solid hsl(220, 13%, 91%);
    padding-bottom: 1.6rem;
}

.poster {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background-color: hsl(220, 13%, 91%);
    max-height: 130px;
}

.movie-details {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.movie-details p {
    font-size: .7rem;
    padding: .4rem;
}

.movie-details button {
    margin-left: auto;
    border: none;
    background-color: transparent;
}

.movie-info {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.poster img {
    max-width: 80px;
    height: 100%;
    border-radius: 5px;
}

.movie h2 {
    font-size: 1rem;
    font-weight: 600;
}

.rating-score {
    font-size: .6rem;
}

.watch-list-btn {
    padding-left: 1.2rem;
}

.watch-list-btn:hover {
    color: hsl(123, 48%, 36%);
}

.add-btn-light,
.add-btn-dark,
.remove-btn-light,
.remove-btn-dark {
    background-repeat: no-repeat;
    background-position: left;
    background-size: contain;
}

.add-btn-light {
    background-image: url(../images/add-light-mode.svg);
}

.add-btn-dark {
    background-image: url(../images/add-dark-mode.svg);
}

.remove-btn-light {
    background-image: url(../images/remove-light-mode.svg);
}

.remove-btn-dark {
    background-image: url(../images/remove-dark-mode.svg);
}

.mode {
    display: block;
    width: 60px;
    border: none;
    border-radius: 14px;
    display: flex;
    place-self: center;
    justify-content: center;
    grid-column: 1 / 3;
    text-align: center;
    margin-top: 4rem;

}

.dark-mode {
    background-color: gray;
    color: white;
}

.light-mode {
    background-color: wheat;
    color: slategray;
}

.plot {
    margin-top: .6rem;
}

i {
    font-size: 40px;
    cursor: pointer;
    max-width: 20px;
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.plot p {
    font-size: .8rem;
    line-height: 1.4;
}

.expand-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    border: none;
    color:inherit;
    background-color: transparent;
}

footer {
    display: flex;
    justify-content: center;
    margin-top: 1.4rem;
}

#more-results {
    padding: .6rem 1rem .6rem;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
    transition: .5s;
}

a:active {
    color: #aaa;
    transition: .5s;
}

a:hover,
.read-more:hover {
    text-decoration: underline dotted;
}

.hidden {
    display: none;
}

.unshow {
    visibility: hidden;
    opacity: 0;
    transition: opacity 250ms ease-in, visibility 0ms ease-in 250ms;
}

.show {
    visibility: visible;
    opacity: 1;
    transition-delay: 10ms;
}

.rfwl {
    display: flex;
    margin-top: 2rem;
    min-height: 420px;
    align-items: center;
    text-align: center;
}

.rfwl a {
    text-decoration: underline dashed;
}

.rfwl a:hover {
    color: green;
}

.watchlist-empty p {
    margin-top: 1.8rem;
}

.tmp-bkg {
    text-align: center;
    margin-top: 4rem;
}

.tmp-bkg h3 {
    color: hsl(0, 0%, 62%);
    margin-top: 1rem;
}


@media (min-width: 768px) {
    body {
        font-size: 18px;
    }

    .wrapper {
        max-width: 1024px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    header,
    .search-bar,
    footer {
        grid-column: 1 / 3;
    }

    header {
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: 208px;
    }

    .left-heading,
    .right-heading {
        align-self: center;
    }

    .left-heading h1 {
        padding-left: 3rem;
    }

    .results {
        padding: 1rem 1.6rem;
        grid-column: 1 / 3;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .search-bar {
        margin-top: -4px;
    }

    .search-bar input {
        font-size: 1rem;
        width: 462px;
    }

    .search-bar button,
    button {
        font-size: 1rem;
    }

    .rating-score {
        font-size: .8rem;
    }

    .watch-list-btn {
        padding-left: 1.6rem;
        margin-right: 1.4rem;
    }

    .tmp-bkg {
        place-self: center;
        justify-content: center;
        grid-column: 1 / 3;
    }

    .rfwl {
        grid-template-columns: 1fr;
    }

}

.dark-mode {
    background-color: #333;
    color: #fff;
}