*,
*::after,
*::before {
  box-sizing: border-box;
}

body {
  background-color: gainsboro;
  font-family: Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

h1 {
  text-align: center;
}

.todo {
  display: grid;
  max-width: 25rem;
  margin: auto;
}

.todo-field {
  font-size: medium;
  color: #6b6666;
  padding: 0.6rem;
  margin-block-end: 1rem;
  border-radius: 8px;
  border: 2px solid chartreuse;
}

.todo-list-container {
  position: relative;
}

.menu {
  position: fixed;
  display: flex;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  list-style: none;
  background-color: #fff;
  width: 9rem;
  padding: 0;
  border: 1px solid #c3bfbf;
  z-index: 1;
}

.menu-item button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 0.4rem 1.3rem;
  border-radius: 0;
  border: none;
  background-color: #fff;
  border-bottom: 1px solid chartreuse;
}

.menu-item button:hover {
  background-color: chartreuse;
  color: #fff;
  font-weight: bold;
}

.menu span {
  cursor: context-menu;
}

.todo-create-btn {
  font-weight: bold;
  font-size: medium;
  background-color: chartreuse;
  padding-block: 0.7rem;
  border: 2px solid #fff;
  border-radius: 8px;
}

.todo-create-btn:hover {
  background-color: rgb(119, 238, 1);
}

.todo-create-btn:active {
  background-color: rgb(106, 209, 3);
}

.icon {
  font-size: larger;
}

.icon-delete {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: red;
  font-weight: normal;
  font-size: 2rem;
}

.icon-delete:hover {
  font-weight: bold;
}

.icon-done {
  margin-inline-end: 0.2rem;
  color: chartreuse;
}

.todo-list {
  position: relative;
  display: none;
  line-height: 1.4;
  list-style-type: decimal;
  background-color: #fff;
  padding: 0.8rem 2rem;
  border: 1px solid #c3bfbf;
  border-radius: 8px;
}

.todo-list:hover::before {
  position: absolute;
  content: "right click to open menu";
  top: -55px;
  right: -60px;
  display: block;
  background-color: #fff;
  padding: 1rem;
  border: 1px solid #c3bfbf;
  color: #6b6666;
}

.todo-item {
  position: relative;
  color: #3e3d3d;
  cursor: pointer;
}

.todo-item > div {
  display: flex;
  align-items: start;
  gap: 0.1rem;
}

.todo-item:hover {
  font-weight: 700;
}

.todo-item::marker {
  color: green;
}

.todo-item + .todo-item {
  margin-block-start: 0.8rem;
}
