@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
/* ======== CSS RESET ===== */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
/* ====ROOT CSS STYLES ===== */
:root {
  --tenne-tawny: #d65108;
  --tenne-tawny-dark: #b54507;
}

body {
  font-weight: 2s00;
  font-size: 1.05rem;
  line-height: 1.6;
  font-family: "Poppins", sans-serif;
}

/* ===== */
.btn {
  font-family: inherit;
  cursor: pointer;
  outline: 0;
  font-size: 1.05rem;
}

.text {
  opacity: 0.8;
}

.title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.container {
  min-height: 100vh;
}

.mealWrapper {
  min-width: 1280px;
  margin: 0 auto;
  padding: 5rem;
  background: #fff;
  text-align: center;
}

.mealSearch {
  margin: 2rem 0;
}

.mealSearch cite {
  font-size: 1rem;
}

.mealSearchBox {
  margin: 1.2rem 0;
  display: flex;
  align-items: stretch;
}

.searchControl,
.searchBtn {
  width: 100%;
}

.searchControl {
  padding: 0 1rem;
  font-size: 1.1rem;
  font-family: inherit;
  border: 1px solid var(--tenne-tawny);
  color: var(--tenne-tawny);
  border-top-left-radius: 2rem;
  border-bottom-left-radius: 2rem;
}

.searchControl::placeholder {
  color: var(--tenne-tawny);
}

.searchBtn {
  width: 55px;
  height: 55px;
  font-size: 1.8rem;
  background: var(--tenne-tawny);
  color: #fff;
  border: none;
  border-top-right-radius: 2rem;
  border-bottom-right-radius: 2rem;
  transition: all 0.4s linear;
}

.searchBtn:hover {
  background: var(--tenne-tawny-dark);
}

.mealResult {
  margin-top: 4rem;
}

#meal {
  margin: 2.4rem 0;
}

.mealItem {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0px 4px 21px -12px rgba(0, 0, 0, 0.79);
  margin: 2rem;
}

.mealImg img {
  width: 100%;
  display: block;
}

.mealName {
  padding: 1.5rem 0.5rem;
}

.mealName h3 {
  font-size: 1.4rem;
}

.recipeBtn {
  color: #fff;
  text-decoration: none;
  background: var(--tenne-tawny);
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.75rem 0;
  display: block;
  width: 175px;
  margin: 1rem auto;
  border-radius: 2rem;
  transition: all 0.4s linear;
}

.recipeBtn:hover {
  background: var(--tenne-tawny-dark);
}

/* ======== MEAL DETAILS ========= */
.mealDetails {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  background: var(--tenne-tawny);
  border-radius: 1rem;
  width: 90%;
  height: 90%;
  overflow-y: scroll;
  padding: 2rem 0;
  display: none;
}

.mealDetails::-webkit-scrollbar {
  width: 10px;
}

.mealDetails::-webkit-scrollbar-thumb {
  background: #f0f0f0;
  border-radius: 2rem;
}

/* ======= FROM JS ============== */
.showRecipe {
  display: block;
}

.mealDetailsContent {
  margin: 2rem;
}

.mealDetailsContent p:not(.mealCategory) {
  padding: 1rem 0;
}

.recipeCloseBtn {
  position: absolute;
  right: 2rem;
  top: 2rem;
  font-size: 1.8rem;
  background: #fff;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.9;
}

.recipeTitle {
  letter-spacing: 1px;
  padding-bottom: 1rem;
}

.mealCategory {
  background: #fff;
  font-weight: 600;
  color: var(--tenne-tawny);
  padding: 0.2rem 0.5rem;
  display: inline-block;
  border-radius: 0.3rem;
}

.recipeInstruction {
  padding: 1rem 0;
}

.recipeMealImg img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
}

.recipeLink {
  margin: 1.4rem 0;
}

.recipeLink a {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.4s linear;
  text-decoration: none;
}

.recipeLink a:hover {
  opacity: 0.8;
}

.notFound {
    grid-template-columns: 1fr !important;
    color: var(--tenne-tawny);
    font-size: 1.8rem;
    font-weight: 600;
    width: 100%;
}

/* ========RESPONSIVE DESIGN ===== */
@media screen and (min-width: 600px) {
  .mealSearchBox {
    width: 540px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ======== */
@media screen and (min-width: 768px) {
  #meal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .mealItem {
    margin: 0;
  }

  .mealDetails {
    width: 700px;
  }
}
/* ======== */
@media screen and (min-width: 992px) {
  #meal {
    grid-template-columns: repeat(3, 1fr);
  }
}
