@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
@import url('./common.css');

header {
  display: flex;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0px 3px 5px lightgrey;
  margin-bottom: 3em;
  padding: 0 3em;
}

a {
  display: block;
  width: fit-content;
  padding: .7em 1em;
  border-bottom: .2em solid white;
  text-decoration: none;
  color: white
}

i {
  color: lightgray;
  margin-left: 1em;
  cursor: pointer;
}

i:hover {
  color: var(--secondary)
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: rgb(223, 223, 223);
}

.user-info p {
  text-transform: capitalize;
}

/* .user-info .user-image {
  height: 2em;
  width: 2em;
  border-radius: 50%;
  background-color: white;
  opacity: .3;
  margin-left: .7em;
} */

/* New Task ----------------------------------------------------------- */
.new-task {
  position: relative;
  display: flex;
  align-items: center;
  background-color: white;
  width: 80%;
  margin: 0 10%;
  padding: 1em;
  box-shadow: 2px 2px 10px lightgrey;
  border-radius: .2em;
  z-index: 20;
}

.new-task input[type=text] {
  border: none;
  flex: 1;
  border-bottom: 1px solid lightgrey;
  border-radius: 0;
  padding: .3em;
  font-size: 1.1em;
}

.new-task input:focus {
  outline: none;
  border-bottom: 1px solid grey;
}

.new-task input::placeholder {
  color: rgb(197, 197, 197);
  text-indent: .2em;
}

.new-task button {
  height: 2em;
  width: 2em;
  background-color: transparent;
  margin-left: 2em;
  margin-right: 1em;
  opacity: .5;
}

.new-task button:hover {
  opacity: 1;
}

.new-task button img {
  height: 100%;
  width: 100%;
}

.not-done {
  width: 2em;
  height: 2em;
  background-color: var(--app-grey);
  margin-right: 1em;
  border-radius: 50%;
  cursor: pointer;
}

/* Task list ----------------------------------------------------------- */
.not-done-tasks {
  display: flex;
  flex-direction: column;
  width: 70%;
  list-style: none;
  margin: 2em 15%;
}

.task {
  display: flex;
  align-items: center;
  margin-bottom: 1.5em;
}

.task .not-done {
  position: relative;
  height: 1.5em;
  width: 1.5em;
  background-color: white;
  box-shadow: 2px 2px 5px lightgrey;
  border: 2px solid var(--secondary);
  z-index: 2;
  transition: background-color 200ms linear;
}

.task .not-done:hover {
  background-color: var(--secondary);
}

.task:first-child .not-done::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: calc(.75em - 1px);
  display: block;
  height: 3em;
  width: 2px;
  background-color: var(--secondary);
}

.task:not(:last-child) .not-done::after {
  content: '';
  position: absolute;
  top: 100%;
  left: calc(.75em - 1px);
  display: block;
  height: 4.5em;
  width: 2px;
  background-color: var(--secondary);
}

.task .description {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  background-color: white;
  padding: 1em 2em;
  box-shadow: 2px 2px 5px lightgrey;
}

.task .name {
  color: rgb(95, 95, 95);
}

.task .timestamp {
  font-size: .9em;
  margin-left: auto;
  color: rgb(134, 134, 134);
}

/* Done tasks ----------------------------------------------------------- */
.done-title {
  position: relative;
  width: 8em;
  text-align: center;
  padding: .5em 1em;
  background-color: white;
  border-radius: .2em;
  box-shadow: 3px 3px 5px lightgrey;
  color: rgb(170, 170, 170);
  font-weight: 400;
  font-size: 1.1em;
  margin-left: calc(15% - 4em);
  z-index: 20;
}

.done-tasks {
  display: flex;
  flex-direction: column;
  width: 70%;
  list-style: none;
  margin: 2em 15%;
}

.done-tasks .not-done {
  background-color: lightgrey;
  border-color: grey;
}

.done-tasks .not-done::before,
.done-tasks .not-done::after {
  background-color: grey !important;
}

.done-tasks .task .description {
  background-color: rgb(228, 228, 228);
}

.done-tasks .task .description .name {
  color: grey;
  text-decoration: line-through;
}