@import url('https://fonts.googleapis.com/css?family=Lato:400,900');
* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

#app {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    min-height: 100vh;
    font-family: 'Lato', sans-serif;
    background-color: whitesmoke;
}

h1, h2, p, ul {
    line-height: 1.2;
}

h1:not(:last-child), h2:not(:last-child), p:not(:last-child), ul:not(:last-child) {
    margin-bottom: 12px;
}

p, li {
    font-size: 0.9em;
    line-height: 1.5;
}

p+ul {
    margin-top: -10px;
}

h1, h2, strong {
    font-weight: 900;
}

input {
    padding: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    border: 1px solid gainsboro;
    border-radius: 2px;
    -webkit-appearance: none;
}

.list--inline {
    padding: 0;
}

.list--inline li {
    display: inline-block;
}

.list--inline li:not(:last-child) {
    margin-right: 12px;
}

.movie {
    position: relative;
    overflow: hidden;
    margin: 12px auto;
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: 0.8em;
    box-shadow: rgba(0, 0, 0, 0.2) 0 30px 18px -24px;
}

.movie__data {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

@media (min-width: 600px) {
    .movie__data {
        flex-direction: row;
    }
}

.movie__search {
    position: absolute;
    top: 24px;
    right: 24px;
    margin: auto;
    width: calc(100% - (12px * 4));
}

@media (min-width: 400px) {
    .movie__search {
        max-width: 200px;
    }
}

.movie__tags {
    font-size: 0.75em;
    color: darkgray;
}

.movie__poster {
    position: relative;
    display: flex;
    width: 100%;
    transform: translateZ(0);
}

@media (min-width: 600px) {
    .movie__poster {
        margin-right: 12px;
        width: 200px;
    }
}

.movie__poster--fill {
    position: absolute;
    overflow: hidden;
    top: -80%;
    bottom: -20%;
    left: -20%;
    width: 150%;
    height: 150%;
    background-color: gainsboro;
    transform: rotate(5deg);
}

@media (min-width: 600px) {
    .movie__poster--fill {
        top: -20%;
        width: 100%;
    }
}

.movie__poster--fill img {
    filter: blur(6px);
    object-fit: cover;
    width: 100%;
    height: 100%;
    transform: scale(1.4);
}

.movie__poster--featured {
    position: relative;
    align-self: center;
    margin-top: 84px;
    margin-left: 24px;
    width: 140px;
    background-color: lightgray;
    border-radius: 2px;
    z-index: 1;
}

@media (min-width: 600px) {
    .movie__poster--featured {
        left: 56px;
        margin: auto;
    }
}

.movie__poster--featured img {
    display: block;
    width: 100%;
    box-shadow: rgba(0, 0, 0, 0.6) 0 6px 12px -6px;
}

.movie__poster--featured img[src="N/A"] {
    min-height: 206px;
    opacity: 0;
}

.movie__details {
    flex: 1;
    padding: 24px;
}

@media (min-width: 600px) {
    .movie__details {
        padding: 72px;
    }
}

.movie__title {
    font-family: 'Lato', sans-serif;
    font-size: 2em;
}

.movie__error {
    display: flex;
    height: 400px;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.loader-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: white;
    z-index: 100;
}

.loader-overlay--active {
    display: flex;
}

.hidden {
    display: none;
}

.skeleton-loader .skeleton-box {
    height: 1.5em;
    position: relative;
    overflow: hidden;
    background-color: #DDDBDD;
    border-radius: 10px;
}

.skeleton-loader p.skeleton-box>* {
    display: none;
}

p.skeleton-box>* {
    display: block;
}

.skeleton-loader .skeleton-box.movie__poster--featured {
    height: 100%;
    width: 140px;
    height: 208px;
    border: 2px solid rgb(198, 191, 191);
}

.skeleton-loader .skeleton-box::after, .skeleton-loader .movie__poster--fill::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
    content: '';
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}