
/*Il bordo è compreso nella larghezza degli oggetti*/
html {
  box-sizing: border-box;
}

/*Inserisce qualcosa prima e dopo ogni elemento */
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  line-height: 1.4;
}

.container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding-left: 10px;
  padding-right: 10px;
  color: #333;
  height: 90vh;
  margin-top: 5vh;
  margin-bottom: 5vh;
  overflow-y: auto;
}

.app-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 80px;
  opacity: 0.5;
}

svg {
  width: 64px;
  height: 64px;
}

.todo-list {
  list-style: none;
  margin-bottom: 20px;
}

.todo-item {
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.todo-item span {
  flex-grow: 1;
  margin-left: 10px;
  margin-right: 10px;
  font-size: 22px;
}

.done span {
  text-decoration: line-through;
  opacity: 0.5;
}

.done .tick {
  opacity: 0.5;
}

input[type="checkbox"] {
  display: none;
}

.tick {
  width: 30px;
  height: 30px;
  border: 3px solid #333;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.tick::before {
  content: "\2713";
  font-size: 20px;
  display: none;
}

.done .tick::before {
  display: inline;
}

.delete-todo {
  border: none;
  background-color: transparent;
  outline: none;
  cursor: pointer;
}

.delete-todo svg {
  width: 30px;
  height: 30px;
  pointer-events: none;
}

form {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
  border: 3px solid #333;
}

.empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none;
}

.todo-list:empty {
  display: none;
}

.todo-list:empty + .empty-state {
  display: flex;
}

.checklist-icon {
  margin-bottom: 20px;
}

.empty-state__title, .empty-state__description {
  margin-bottom: 20px;
}
