@import url(./normalize.css);

:root {
  --ingredients-color: #3282f7;
  --appareils-color: #68d9a4;
  --ustensiles-color: #ed6454;
  --primary-color: #d04f50;
  --secondary-color: #e7e7e7;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html,
body {
  font-family: "Lato", sans-serif;
  height: 100vh;
  margin: 0;
}

body {
  max-width: 1400px;
  min-width: 400px;
  margin: 0 auto;
  padding-left: 3vw;
  padding-right: 3vw;
}

/************************************ Header *************************************/
.header {
  padding-top: 42px;
  margin-bottom: 17px;
}

.header-logo-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.header-logo {
  width: 50px;
}

.header-logo-title {
  font-family: "DM Sans", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

/************************************ Search Section ******************************/

/****************** Main Search Section *************/
.search-title {
  display: none;
}

.form-search {
  position: relative;
  margin-bottom: 20px;
}
.search-input {
  display: block;
  width: 100%;
  height: 69px;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 400;
  font-family: "Lato", sans-serif;
  color: #000000;
  background-color: var(--secondary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-input:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.search-input::placeholder {
  color: #000000;
  opacity: 50%;
}

.search-input:focus {
  border: 1px solid var(--primary-color);
  outline: none;
}

.search-icon {
  position: absolute;
  font-size: 2rem;
  top: 0;
  right: 20px;
  height: 100%;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

/***************** Tags selected Section *************/
.selected-tag-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 10px;
}

.selected-tag {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  margin-right: 10px;
  margin-bottom: 10px;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: var(--ustensiles-color);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: "Lato", sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.selected-tag-name {
  margin-right: 10px;
}

.delete-icone {
  font-size: 1.3rem;
  cursor: pointer;
  transform: scale(1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.delete-icone:hover {
  opacity: 50%;
  transform: scale(1.02);
}

/***************** Tags Search Section ***************/
.search-tags-container {
  position: relative;
  height: 70px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: left;
}

@media screen and (max-width: 796px) {
  .search-tags-container {
    flex-direction: column;
    height: 100%;
  }
}

.combobox {
  padding-right: 20px;
}

.combobox-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 170px;
  height: 69px;
  padding: 20px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 400;
  font-family: "Lato", sans-serif;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.combobox-btn:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.combobox-form {
  position: relative;
  width: 100%;
}

.combobox-input-icon {
  position: absolute;
  font-size: 18px;
  color: #fff;
  top: 0px;
  right: 20px;
  height: 100%;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.combobox-input {
  display: block;
  width: 100%;
  height: 69px;
  padding: 20px;
  border: none;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  font-size: 18px;
  font-weight: 400;
  font-family: "Lato", sans-serif;
  color: #fff;
  background-color: var(--ingredients-color);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.combobox-input::placeholder {
  color: #fff;
  opacity: 50%;
}

.combobox-input:focus {
  outline: none;
}

.combobox-input-btn {
  background-color: transparent;
  border: none;
  padding: 0;
}

.combobox-list {
  width: 35vw;
  max-width: 660px;
  min-width: 200px;
  max-height: 310px;
  margin: 0;
  padding: 0 20px 20px 20px;
  list-style-type: none;
  border: none;
  color: #fff;
  background-color: var(--ingredients-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  column-gap: 50px;
  row-gap: 10px;
  overflow-y: auto;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.combobox-list-item {
  font-size: 18px;
  font-weight: 400;
  font-family: "Lato", sans-serif;
  line-height: 21px;
  /* grid-column: 1fr; */
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: scale(1);
}

.combobox-list-item:hover {
  opacity: 50%;
  transform: scale(1.01);
}

@media screen and (max-width: 796px) {
  .combobox {
    width: 100%;
    padding-right: 0;
    padding-bottom: 20px;
  }
  .combobox-btn {
    width: 100%;
  }
  .combobox:last-child {
    padding-bottom: 0;
  }
  .combobox-list {
    width: 100%;
    max-width: none;
  }
}

/*********************************** Main Section **********************************/
.main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 30.4%));
  grid-gap: 50px;
  margin-top: 20px;
  padding-bottom: 50px;
}

.recipe {
  height: 364px;
  /* grid-column: 1fr; */
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--secondary-color);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.recipe:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.recipe-header {
  height: 178px;
  width: 100%;
  background-color: #c7c2c2;
}

.recipe-header-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.recipe-content {
  height: 186px;
  width: 100%;
  padding: 20px;
}

.recipe-title {
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
}

.recipe-name {
  font-size: 18px;
  padding-right: 8px;
  font-weight: 400;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-timer {
  white-space: nowrap;
}

.timer-duration {
  font-size: 18px;
  font-weight: 700;
  padding-left: 3px;
}

.recipe-info {
  display: flex;
  font-size: 12px;
}

.recipe-ingredient-list {
  list-style-type: none;
  width: 50%;
  padding: 0;
  margin: 0;
  padding-right: 20px;
}

.recipe-ingredient-item {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recipe-ingredient-item-name {
  font-weight: 700;
}

.recipe-description {
  width: 50%;
  height: 100px;
}

.recipe-description-text {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  line-height: 12px;
  font-weight: 400;
  margin: 0;
  height: 97px;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
}

.error-message {
  color: var(--ustensiles-color);
  text-align: center;
  font-size: 1.2rem;
  grid-column: 1 / span 3;
}

@media screen and (max-width: 1223px) {
  .main {
    grid-template-columns: repeat(auto-fit, minmax(350px, 46.5%));
  }
}

@media screen and (max-width: 796px) {
  .main {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .recipe-description-text {
    font-size: 15px;
    line-height: 15px;
    font-weight: 300;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    hyphens: auto;
    height: 105px;
  }
  .recipe-info {
    font-size: 15px;
  }

  .recipe-ingredient-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
  }

  .recipe-ingredient-item-name {
    font-weight: 600;
  }

  .recipe-ingredient-item-quantity {
    font-weight: 400;
  }
}

/************************************* Utils ***********************************/
.blue {
  background-color: var(--ingredients-color);
}

.green {
  background-color: var(--appareils-color);
}

.red {
  background-color: var(--ustensiles-color);
}

.hidden {
  display: none;
}

.hide {
  display: none;
}
