* {
    margin: 0;
    padding: 0;
}

html {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    background-color: #222831;
    color: white;
}

h1 {
    color: white;
    font-size: 1.5em;
}

p {
    font-size: 1em;
    line-height: 1.5em;
}

.app {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100vh;
}

.container {
    min-width: 320px;
    width: 100%;
    height: 100%;
}

.header {
    background-color: #222831;
}

.nav-bar {
    display: flex;
    justify-content: center;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    margin: 0 4%;
}

.nav-bar__spacer {
    width: 1.13em;
    height: 1.5em;
}

.nav-bar__logo__img {
    width: auto;
    height: 1.6rem;
}

.search-top {
    border-radius: 3px;
    display: none;
    height: 2.6rem;
}

.search-bottom {
    border-radius: 3px;
    display: flex;
    height: 2.6rem;
    margin: 0 4% 4% 4%;
}

.search__input {
    font-size: 1em;
    flex: 1;
    background-color: white;
    border: none;
    padding: 0.5rem;
}

.search__btn {
    width: 2.6rem;
    color: #222831;
    border: none;
    cursor: pointer;
    border: 0;
    background-color: #ff5722;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
}

/* Favourites Menu */

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-icon {
    font-size: 1.6em;
}

.fav_menu {
    color: rgb(37, 37, 37);
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    max-width: 66vw;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    line-height: 2.5em;
    z-index: 2;
    font-size: 1.1em;
}

.nav-dropdown:hover .fav_menu {
    display: block;
    flex-direction: column;
    justify-content: space-between;
    align-content: space-between;
}

.fav-menu__row {
    border-top: 1px solid #cecece;
    justify-content: flex-start;
    display: flex;
    flex: 0 0 0;
    align-items: center;
    font-size: 0.8em;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.fav-delete {
    width: 12px;
    height: 12px;
    padding-right: 5px;
}

.search-text {
    margin: 4%;
    color: #ff5722;
    font-weight: 300;
}

.search-text__query {
    font-weight: 700;
}

/* Movie results */

.movies-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.movie {
    display: flex;
    flex-direction: column;
    width: calc(84% / 3);
    height: 100%;
}

.poster-container__image:hover {
    box-shadow: 0px 0px 3px 3px rgb(15, 15, 15);
}

.poster-container__image {
    width: 100%;
    height: 45vw;
    object-fit: cover;
    border-radius: 0.3em;
}

.info-container {
    font-size: 0.9em;
    line-height: 1.2em;
    font-weight: 300;
    /* height: 4.2em; */
    margin: 0.2rem 0 1rem 0;
}

/* Movie info - displayed when movie clicked */

.background-image {
    height: 55vw;
    width: 100vw;
    position: absolute;
    top: 0px;
    z-index: -1;
}

.background-image__image {
    opacity: 0.6;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-container__title {
    overflow: hidden;
    max-height: 2.8em;
}

.info-container__year {
    color: #6B6B6B;
}

.movie-info {
    margin: 4%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
}

.fav-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    padding: 15px;
}

.movie-info__title {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.8em;
    margin: 1rem;

}

.movie-info__year {
    color: rgb(184, 184, 184);
    align-self: flex-start;
    margin: 0.5rem 0;
    font-size: 0.8em;
    font-weight: 500;
}

.movie-info__text {
    margin-bottom: 2rem;
    font-size: 0.9em;
    font-weight: 300;
}

.movie-info__poster__image {
    margin-top: 4%;
    width: 40vw;
    border-radius: 0.4em;
    box-shadow: 1px 1px 5px 1px rgb(15, 15, 15);
}

/* Pagination */

.pagination {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #222831;
}

.pagination__text {
    color: #ff5722;
    font-size: 1em;
    margin: 0.5rem;
    margin-bottom: 0;
}

.pagination__buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    margin: 0.5rem;
}

.page-buttons {
    padding: 0.5em;
    margin: auto;
    border: 0;
    border-radius: 3px;
    background-color: #eeeeee;
    cursor: pointer;
    margin: 5px;
    font-size: 1em;
}

.page-buttons:hover {
    background-color: rgb(159, 163, 189);
}

/* Tablet Layout */

@media (min-width: 768px) {
    html {
        font-size: 18px;
    }
    .nav-bar__spacer {
        display: none;
    }
    .nav-bar__logo__img {
        height: 1.8rem;
    }
    .search-top {
        display: flex;
        flex: 3;
        padding: 0 60px;
    }
    .nav-bar {
        height: 4em;
        margin: 0 3.2%;
    }
    .search-bottom {
        display: none;
    }
    .nav-bar__title {
        flex: 1;
    }
    .nav-dropdown-icon {
        font-size: 1.8em;
    }
    .search-text {
        margin: 3.2%;
    }
    .movie-info__poster__image {
        width: 25vw;
    }
    .background-image {
        height: 30vw;
    }
    .movie {
        width: calc(84% / 4);
    }
    .poster-container__image {
        height: 35vw;
    }
}

/* Desktop Layout */

@media (min-width: 960px) {
    html {
        font-size: 20px;
    }
    .container {
        width: 85%;
    }
    .nav-bar {
        margin: 0 2.67%;
    }
    .nav-bar__logo__img {
        height: 2rem;
    }
    .nav-dropdown-icon {
        font-size: 2em;
    }
    .search-text {
        margin: 2.67%;
    }
    .movie-info__poster__image {
        width: 20vw;
    }
    .background-image {
        height: 25vw;
    }
    .movie {
        width: calc(84% / 5);
    }
    .poster-container__image {
        height: 23vw;
    }
}