html,
body {
  margin: 0;
  padding: 0;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 100%;
  vertical-align: baseline;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: antialiased;
  font-smoothing: antialiased;
}

body {
  font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.4em;
  color: #4d4d4d;
  min-width: 230px;
  max-width: 550px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: antialiased;
  font-smoothing: antialiased;
  font-weight: 300;
  padding: 15px;
}

header {
  position: relative;
}

button,
input[type="checkbox"] {
  outline: none;
}

.hidden {
  display: none !important;
}

#new-todo,
.edit {
  position: relative;
  margin: 0;
  width: 100%;
  font-size: 24px;
  font-family: inherit;
  font-weight: inherit;
  line-height: 1.4em;
  outline: none;
  color: inherit;
  padding: 6px;
  border: 1px solid #999;
  box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: antialiased;
  font-smoothing: antialiased;
}

#new-todo {
  padding: 16px 16px 16px 16px;
  border: none;
  background: rgba(0, 0, 0, 0.003);
  box-shadow: inset 0 -2px 1px rgba(0, 0, 0, 0.03);
}

#add-todo {
  display: block;
  position: absolute;
  top: 2px;
  right: 0;
  padding: 8px 20px;
  font-size: 35px;
  color: #777;
  transition: color 0.2s ease-out;
  cursor: pointer;
}

#add-todo:hover {
  color: #4d4d4d;
}

#add-todo:after {
  content: "+";
}

#main {
  position: relative;
  border-top: 1px solid #e6e6e6;
}

#todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#todo-list li {
  position: relative;
  font-size: 24px;
  border-bottom: 1px solid #ededed;
}

#todo-list li:last-child {
  border-bottom: none;
}

#todo-list li .toggle {
  text-align: center;
  width: 40px;
  /* auto, since non-WebKit browsers doesn't support input styling */
  height: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto 0;
  border: none; /* Mobile Safari */
}

#todo-list li .title {
  white-space: pre-line;
  word-break: break-all;
  padding: 15px 60px 15px 15px;
  margin-left: 45px;
  display: block;
  line-height: 1.2;
  transition: color 0.4s;
}

#todo-list li.completed .title {
  color: #d9d9d9;
  text-decoration: line-through;
}

#todo-list li .destroy {
  display: none;
  position: absolute;
  top: 2px;
  right: 0;
  padding: 8px 20px;
  font-size: 35px;
  color: #cc9a9a;
  transition: color 0.2s ease-out;
  cursor: pointer;
}

#todo-list li .destroy:hover {
  color: #af5b5e;
  cursor: pointer;
}

#todo-list li .destroy:after {
  content: "×";
}

#todo-list li:hover .destroy {
  display: block;
}

#todo-list li .edit {
  padding: 15px 100px 15px 15px;
  margin-left: 45px;
  line-height: 1.2;

  border: none;
  background: rgba(0, 0, 0, 0.003);
  box-shadow: inset 0 -2px 1px rgba(0, 0, 0, 0.03);
}

#action-bar {
  color: #777;
  padding: 10px 15px;
  height: 20px;
  text-align: center;
  border-top: 1px solid #e6e6e6;
}

#todo-count {
  float: left;
  text-align: left;
}

#todo-count strong {
  font-weight: 300;
}

#filters {
  margin: 0;
  padding: 0;
  list-style: none;
  position: absolute;
  right: 0;
  left: 0;
}

#filters li {
  cursor: pointer;
  display: inline;
  color: inherit;
  margin: 3px;
  padding: 3px 7px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
}

#filters li.selected,
#filters li:hover {
  border-color: rgba(175, 47, 47, 0.1);
}

#filters li.selected {
  border-color: rgba(175, 47, 47, 0.2);
}

#clear-completed {
  float: right;
  position: relative;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}

#clear-completed:hover {
  text-decoration: underline;
}

#toast {
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  align-items: flex-end;
  display: flex;
  flex-direction: column;
}

.toast-div {
  padding: 1rem 2rem;
  margin: 0.5rem;
  border-radius: 20px;
  color: white;
}

@media (max-width: 430px) {
  #todo-count,
  #clear-completed {
    display: none;
  }

  #toast {
    align-items: center;
  }
}

@media (hover: none) {
  .destroy {
    display: inherit !important;
    color: #af5b5e !important;
  }

  #add-todo {
    color: #4d4d4d !important;
  }
}

#menu-open {
  float: right;
  margin-left: 10px;
  position: relative;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}

#nav-background {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 50%);
}

nav {
  line-height: 1.4;
  padding: 25px 35px;
  background: #d9d9d9;
  width: 300px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  position: fixed;
  border-radius: 20px;
  box-shadow: 0 0 30px 0 black;
  font-size: 18px;
}

nav li {
  text-decoration: none;
  list-style: none;
}

#menu-close {
  float: right;
  font-size: 16px;
}

.menu-option {
  width: fit-content;
  text-decoration: none;
  cursor: pointer;
}

.menu-option:hover {
  text-decoration: underline;
}
