:root {
  --primary-color: #003049;
  --light-primary: #669bbc;
  --secondary-color: #780000;
  --light-secondary: #c1121f;
  --ligthest-color: #fdf0d5;
}

/* Modal */

#modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  justify-content: center;
  align-items: center;
}

.overlay {
  visibility: hidden;
  transition: all 0.3s ease;
  opacity: 0;
}

.open {
  visibility: visible;
  opacity: 1;
}

#modal-background {
  background-color: var(--light-primary);
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 0;
  opacity: 0.4;
}

#modal-container {
  z-index: 1;
  background-color: var(--ligthest-color);
  padding: 1rem 3rem;
  border-radius: 10px;
}

#movie-title {
  padding: 1rem 0;
}

#modal-body {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

#movie-poster {
  border-radius: 10px;
}

#movie-info {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  max-width: 300px;
  padding-left: 2rem;
}

#add-to-list {
  border: 3px solid var(--primary-color);
  padding: 0.3rem 0;
  width: 100%;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.8);
  margin: 0.8rem 0;
}

#add-to-list:focus,
#add-to-list:hover {
  background-color: var(--light-primary);
  color: var(--ligthest-color);
}

/* Responsividade Mobile Modal */
@media (max-width: 768px) {
  #modal-container {
    width: 90%;
    max-height: 90dvh;
    overflow-y: auto;
    padding: 1rem 1.5rem;
  }

  #modal-body {
    flex-direction: column;
    align-items: center;
  }

  #movie-poster {
    max-width: 100%;
    height: auto;
  }

  #movie-info {
    padding-left: 0;
    padding-top: 1.5rem;
    max-width: 100%;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }

  #add-to-list {
    width: auto;
    padding: 0.5rem 2rem;
  }
}
