@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");
* {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  background: rgb(198, 198, 198);
  background: linear-gradient(
    90deg,
    rgba(198, 198, 198, 1) 0%,
    rgba(229, 240, 231, 1) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

img {
  max-width: 100%;
}

.mobile-container {
  background-color: #fff;
  width: 400px;
  box-shadow: 0 0 10px 2px #3333331a;
  border-radius: 3px;
  overflow: hidden;
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
header input {
  background-color: #efefef;
  border: none;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  font-family: inherit;
}

header button {
  background-color: transparent;
  color: #aaa;
  font-size: 1.5rem;
  border: none;
  margin-left: 10px;
}

.fav-container {
  background-color: rgb(239, 226, 247);
  padding: 0.2rem 1rem;
  text-align: center;
}
.fav-meals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style-type: none;
  padding: 0;
}

.fav-meals li {
  margin: 5px;
  width: 75px;
  position: relative;
  cursor: pointer;
}

.fav-meals li img {
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px 2px #3333331a;
  border-radius: 50%;
  object-fit: cover;
  height: 70px;
  width: 70px;
}
.fav-meals li span {
  display: inline-block;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 75px;
  position: absolute;
  bottom: -1rem;
  left: 0;
}

.fav-meals li:hover span {
  white-space: normal;
  overflow: auto;
}

.fav-meals li .clear {
  background-color: transparent;
  position: absolute;
  top: -0.5rem;
  right: -1rem;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  opacity: 0;
}

.fav-meals li:hover .clear {
  opacity: 1;
}

.meal {
  margin: 1.5rem;
  box-shadow: 0 0 10px 2px #3333331a;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.meal-header {
  position: relative;
}

.meal-header .random {
  position: absolute;
  top: 1rem;
  background-color: #fff;
  padding: 0.25rem 0.5rem;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.meal-header img {
  height: 250px;
  width: 100%;
  object-fit: cover;
}

.meal-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.meal-body h4 {
  margin: 0;
}

.meal-body .fav-btn {
  border: none;
  background-color: transparent;
  font-size: 1.2rem;
  color: rgba(202, 202, 202, 0.884);
  cursor: pointer;
}

.meal-body .fav-btn.active {
  color: rebeccapurple;
}

.popup-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.5);
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.popup {
  background-color: #fff;
  max-width: 600px;
  max-height: 100vh;
  width: 100%;
  padding: 0 2rem;
  border-radius: 5px;
  position: relative;
  overflow: auto;
}

.popup h1 {
  text-align: center;
}

.popup .close-popup {
  background-color: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.popup-container.hidden {
  opacity: 0;
  pointer-events: none;
}
