/* Styling for the body */
body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  height: 100%;
  background: linear-gradient(to bottom, #fec5c4, #ff7c7c);
  background-repeat: no-repeat;
  background-size: cover;
  margin: 0;
}

/* Styling for ALL elements */
* {
  box-sizing: border-box;
}

/* Html and Body styling */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Styling for the container */
.container {
  box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px;
  margin: 17px auto 0;
  width: 737px;
  padding: 30px 20px;
  text-align: center;
  background-color: white;
  animation-name: up-down-up;
  animation-duration: 0.4s; /* How long the animation should last */
  animation-delay: 0.01s;
  animation-fill-mode: forwards; /* Animations stays on the last keyframe */
  min-height: 313px;
  opacity: 0.1;
}

/* Animation keyframes that goes up and down when entering site */
@keyframes up-down-up {
  0% {
    opacity: 0.4;
    margin-top: -150px;
  }
  75% {
    opacity: 0.6;
    margin-top: 120px;
  }
  100% {
    opacity: 1;
  }
}

/* Styling for the h1 element */
#header {
  opacity: 0;
  margin-top: -15px;
  margin-bottom: 5px;
  font-size: 75px;
  padding-top: 8px;
  letter-spacing: 1px;
  animation: fade-in 1s;
  animation-delay: 0.5s;
  animation-fill-mode: forwards;
}

/* Styling for the completed paragraph */
#finishedCount {
  opacity: 0;
  animation-name: fade-in;
  animation-delay: 0.6s;
  animation-fill-mode: forwards;
  margin-bottom: 20px;
  margin-top: 22px;
  padding-bottom: 30px;
  font-size: 22px;
  font-family: sans-serif;
  font-weight: 600;
}

/* Styling the input field */
#input {
  opacity: 0;
  animation-name: fade-in;
  animation-delay: 0.7s;
  animation-fill-mode: forwards;
  height: 50px;
  width: 346px;
  border: solid black 1px;
  border-top-width: 2px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 30px;
  outline: none;
  margin-right: 7px;
  margin-bottom: 16;
  padding-left: 10px;
  vertical-align: middle;
}

/* Styling for the addBTN with text: "OK" */
#addBtn {
  opacity: 0;
  animation-name: fade-in;
  animation-delay: 0.7s;
  background-color: #ededed;
  animation-fill-mode: forwards;
  border: 1px solid black;
  border-top-width: 2px;
  height: 50px;
  width: 79px;
  border-radius: 5px;
  font-size: 30px;
  font-weight: 600;
  margin-left: 10px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}

/* Hover effect on the button to add responsivnes */
#addBtn:hover {
  background-color: #e0e0e0;
}

/* Animation to go from invisible to visible */
@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Styling for when the input is focused */
#input:focus {
  border: solid 2px blue;
}

/* Styling of the text when someone tried to enter an empty string */
#empty-input-text {
  display: none;
  opacity: 0;
  margin-top: 0;
  margin-right: 38px;
  padding-bottom: 20px;
  height: 27px;
  color: red;
  font-family: Helvetica, sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  text-indent: 5px;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

/* The keyframes for blinking 3 times */
@keyframes blink-3 {
  20% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  80% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

ul {
  padding: 0;
  margin: 0;
}

/* Styling for the added tasks text */
li {
  font-family: sans-serif;
  font-weight: 500;
  list-style: none;
  font-size: 36px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 15px;
  transition-property: color;
  transition-duration: 0.3s;
  transition-timing-function: ease-in;
  color: black;
}

li:first-of-type {
  padding-top: 40px;
}

/* Hover effect on the listed tasks */
li:hover {
  text-decoration: line-through;
}

/* Animation effect class for fading in and up for when task is added */
.new-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

/* FadeinUp animation */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Class style for when list task is pressed */
.completed {
  text-decoration: line-through;
  color: #7c7c7c;
}

/* Styling the delete button */
.delete-btn {
  width: 50px;
  height: 50px;
  border: none;
  background-color: white;
  font-size: 20px;
  cursor: pointer;
  filter: brightness(110%); /* Make to animation */
  transition: 0.3s;
}

.delete-btn:hover {
  filter: brightness(100%);
}

/* Div container with the input and button */
.input-buttons-container {
  padding-bottom: 8px;
  color: #7c7c7c;
}

/* Scaling down alot of sizes when the width is 844 or lower */
@media only screen and (max-width: 844px) {
  .container {
    width: 80vw;
    max-width: 400px;
    padding: 15px 10px;
  }

  .input-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #input {
    width: 75%;
    margin-bottom: 10px;
    font-size: 1rem;
  }

  #addBtn {
    width: 75%;
    font-size: 1rem;
  }
}

/* Scaling down things for screens 600px and below */
@media only screen and (max-width: 600px) {
  .container {
    width: 90vw;
    max-width: 350px;
    padding: 10px 8px;
  }

  #input {
    width: 100%;
    font-size: 0.9rem;
  }

  #addBtn {
    width: 100%;
    font-size: 0.9rem;
  }
}
/* For screens 480px and below */
@media only screen and (max-width: 480px) {
  .container {
    width: 95vw;
    padding: 8px 5px;
  }

  #input {
    width: 100%;
    font-size: 0.8rem;
  }

  #addBtn {
    width: 100%;
    font-size: 0.8rem;
  }
}
