/* Global styles */
body {
  margin: 0;
  padding: 0;
  background-color: #f8f8f8;
  color: #333;
  font-family: Lato, sans-serif;
}

/* Hat with matrix */
.matrix-info {
  max-width: 500px;
  margin: 0 auto;
  text-align: right;
  padding: 1rem;
}

.matrix-info__image {
  width: 100%;
  height: auto;
  display: block;
}

.matrix-info__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: fantasy, cursive; /* If desired, we leave */
  color: #333;
  text-decoration: none;
}

.matrix-info__link:hover {
  text-decoration: underline;
}

/* Main Application */
.todo-app {
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
}

/* Block for adding a new task */
.todo-app__new-task {
  margin-bottom: 2rem;
}

.todo-app__new-task-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  text-transform: uppercase;
}

.todo-app__new-task-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Universal elements */
.todo-app__input,
.todo-app__text-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  color: #888;
  box-sizing: border-box;
}

.todo-app__input:focus,
.todo-app__text-input:focus {
  color: #333;
  outline: 1px solid #333;
}

.todo-app__add-button,
.todo-app__edit-button,
.todo-app__delete-button {
  background: none;
  border: 0;
  color: #888;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.todo-app__add-button:hover,
.todo-app__edit-button:hover,
.todo-app__delete-button:hover {
  color: #555;
}

/* Section Headings */
.todo-app__section {
  margin-bottom: 2rem;
}

.todo-app__title {
  margin: 0 0 1rem;
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
}

/* List of tasks */
.todo-app__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.todo-app__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.todo-app__label {
  flex-grow: 1;
  font-size: 1rem;
}

.todo-app__checkbox {
  margin-right: 0.5rem;
}

.todo-app__delete-button img {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.2s ease-in;
}

.todo-app__delete-button:hover img {
  transform: rotate(45deg);
}

/* Modifiers */
.todo-app__item--edit-mode .todo-app__label {
  display: none;
}

.todo-app__item--edit-mode .todo-app__text-input {
  display: block;
}

.todo-app__item--completed .todo-app__label {
  text-decoration: line-through;
  color: #888;
}
