@import url('https://fonts.googleapis.com/css2?family=Courgette&display=swap');

*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body{
  overflow-x: hidden;
  color: white;
  background-color: #1a1a1a;
  font-family: 'Courgette', cursive;
}

.nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 0 20px;
  font-size: 1.5rem;
}

.wrapper{
  display: grid;
  grid-template-columns: 300px 1fr;
}

.menu, .responsive-menu{min-height: calc(100vh - 70px);}

.menu a , .responsive-menu a{
  color: white;
  text-decoration: none;
}

.menu li, .responsive-menu li{
  cursor: pointer;
  list-style-type: none;
  transition: 1s ease;
  padding: 10px;
}

.menu li:hover, .responsive-menu li:hover{background-color: rgba(255, 255, 255, 0.5);}

.responsive-menu i{font-size: 1.5rem;}

.responsive-menu{display: none;}

.user{
  padding: 20px 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.user i{
  padding-bottom: 15px;
  font-size: 3.5rem;
  color: white;
}

.user p{text-align: center;}

.display{ 
  padding: 20px;
  background-color: black;
}

.search h2{
  font-size: 1.5rem;
}

.search input{
  width: 100%;
  padding: 8px;
  border: none;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  font-family: inherit;
  color: white;
  background-color: #1a1a1a;
}

.my-recipe-cards,
.saved-recipe-cards,
.search-recipe-cards,
.view-recipe-card{
  overflow: hidden;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card, .big-card{
  width: 300px;
  height: auto;
  transition: 1s ease;
  background-color: #1a1a1a;
  padding-bottom: 10px;
}

.big-card{width: 700px;}

.card p, .big-card p{color:white;}

.images, .big-image{
  width: 100%;
  height: 200px;
  background-position: center;
  background-size: cover;
}

.big-image{height: 400px;}

.name{padding: 10px 10px 10px 18px;}

.name h1{
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.other, .view-other{padding: 0 20px;}

.other p{
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 5px 0;
}

.view-other p{padding: 5px 0;}

.other a{
  color: blue;
  text-decoration: none;
  transition: 1.5s ease;
}

.save-btn, .del-btn{
  text-align: right;
  margin: 0 10px 10px 0;
}

.save-btn button, .del-btn button{
  padding: 8px;
  color: white;
  border: none;
  border-radius: 2px;
  transition: 1s ease;
}

.save-btn button:hover, .del-btn button:hover{background-color: rgba(255, 255, 255, 0.5);}

.save-btn i, .del-btn i{
  color: white;
  cursor: pointer;
  font-size: 2rem;
  transition: 1s ease;
}

.save-btn i:active, .del-btn i:active{
  transform: translateY(4px);
}

.save-btn a{
  color: white;
  text-decoration: none;
}

.add-recipe{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.box textarea{
  resize: none;
  color: white;
  margin: 5px 0;
  padding: 8px;
  border: none;
  border-radius: 2px;
  font-family: inherit;
  background-color: #1a1a1a;
}

.box button{
  margin: 5px 0;
  padding: 10px;
  border: none;
  color: white;
  width: 100%;
  cursor: pointer;
  border-radius: 2px;
  transition: 1s;
}

.box button:active{transform: translateY(4px);}

#recipe-img{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: darkgray;
  width: 350px;
  height: 220px;
  margin: 5px 0 10px 0;
  border-radius: 2px;
  border: 2px dotted lightgray;
  background-color: #1a1a1a;
}

#recipe-img i{
  padding: 10px 0;
  font-size: 2.5rem;
}

#recipe-img input{
  cursor: pointer;
  text-align: center;
  border: 1px solid white;
}

#name{
  width: 350px;
  height: 40px;
}

#description{
  width: 350px;
  height: 220px;
}

#ingredients{
  width: 350px;
  height: 220px;
}

#instructions{
  width: 350px;
  height: 220px;
}

#publish-recipe{height: 40px;}

#snackbar-success{
  visibility: hidden; /* Hidden by default. Visible on click */
  min-width: 250px; /* Set a default minimum width */
  margin-left: -125px; /* Divide value of min-width by 2 */
  color: #fff; /* White text color */
  text-align: center; /* Centered text */
  border-radius: 2px; /* Rounded borders */
  padding: 16px; /* Padding */
  position: fixed; /* Sit on top of the screen */
  z-index: 1; /* Add a z-index if needed */
  left: 50%; /* Center the snackbar */
  bottom: 30px; /* 30px from the bottom */
}

#snackbar-success.show{
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@media(max-width:768px){
  .wrapper{grid-template-columns: 10% 90%;}

  .menu{display: none;}

  .responsive-menu{display: block;}

  .responsive-menu li{
    padding: 10px 0;
    text-align: center;
  }

  .user i{
    font-size: 1.5rem;
    color: white;
  }

  .display i{ font-size: 1.5rem;}

   .card, .box, #recipe-img,#name, #description, #ingredients, #instructions{
   width: 100%;
  }
}

@media(max-width:480px){
  .big-image{ height: 200px;}

  .save-btn i, .del-btn i{ font-size: 1.5rem;}

  .nav, .search h2, .other p, h1{ font-size: 1rem;}
}
