:root {
  --color-primary--500: #003d31;
  --color-primary--400: #33645a;
  --color-primary--300: #668b83;
  --color-primary--200: #99b1ad;
  --color-primary--100: #ccd8d6;
  --color-warning--500: #edb211;
  --color-heart--500: #f43664;
  --color-white: #fff;
}

/* css reset */
/* Box sizing rules */
* *::before *::after {
  box-sizing: border-box;
}
/* Remove default margin */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0 0 1.5rem;
}
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}
/* Set core root defaults */
html {
  line-height: 1.5;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
html:focus-within {
  scroll-behavior: smooth;
}
/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  margin: 0;
}
/* A elements that don't have a class get default styles */
a {
  text-decoration-skip-ink: auto;
  color: #36bf7f;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}
svg {
  fill: currentColor;
}
svg:not(:root) {
  overflow: hidden;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}
/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* global */
body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

header {
  background-color: var(--color-primary--500);
  .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  h1 {
    margin: 0;
  }
  a {
    color: var(--color-white);
  }
}

.logo {
  color: var(--color-white);
  text-align: center;
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.5rem;
  padding: 0.5rem 0;
}

.footer {
  background-color: var(--color-primary--100);
  color: var(--color-primary--500);
  padding: 0.25rem;
  text-align: center;
}

button {
  all: unset;
}

.container {
  max-width: 65rem;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  text-decoration: none;
  color: var(--color-primary--400);
}

.button {
  min-width: 6rem;
  background-color: none;
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 1.125rem;
  text-align: center;
  border-radius: 0.25rem;

  display: flex;
  justify-content: center;
  align-items: center;
}

.button_primary {
  background-color: var(--color-primary--400);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.button_secondary {
  background-color: none;
  color: var(--color-primary--400);
  border: 1px solid var(--color-primary--400);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.button_ghost {
  gap: 0.5rem;
  font-size: 1.125rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* home */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  justify-content: center;
  align-items: center;

  input {
    width: 80%;
  }
}

.filter-item {
  display: flex;
  gap: 0.5rem;
}

/* search results */

/* cards */
.movie-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0;
  margin-top: 1rem;
}

.movie-card {
  min-height: 10rem;
  display: flex;
  gap: 0.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--color-primary--200);
}

.movie-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;

  padding: 0.75rem;

  .button {
    align-self: flex-end;
  }
}

.movie-image {
  width: 40%;
  object-fit: cover;
}

/* details */
.details {
  .tag {
    font-weight: 700;
  }
}

.movie-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.hidden {
  display: none;
}

.show {
  display: flex;
}

#saved {
  color: var(--color-heart--500);
}

.movie-stats {
  padding: 1rem;
}

.movie-detail_image {
  width: 100%;
  object-fit: cover;
}

.movie-actions {
  align-self: stretch;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
}

/* 404 page */
.content_404 {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.not_found {
  font-size: 3rem;
  display: flex;
  flex-direction: column;

  .material-icons {
    color: var(--color-warning--500);
  }
}

/* favourites */
.result {
  h2 {
    text-align: center;
  }
}
.movie-list {
  p {
    text-align: center;
    display: flex;
    flex-direction: column;

    .material-icons {
      color: var(--color-warning--500);
    }
  }
}

@media only screen and (min-width: 45rem) {
  .movie-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .movie-detail_image {
    width: 50%;
  }
}
