* {
  text-align: center;
  font-family: Pretendard;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

h1 {
  cursor: pointer;
}

/* ------------- */

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0.5rem;
  gap: 0.5rem;
}

.dateButton {
  border: none;
  background: none;

  font-weight: 900;
  cursor: pointer;
}

#currentDate {
  border: none;
  font-size: 1rem;
}
/* 달력 아이콘 스타일 */
#currentDate::-webkit-calendar-picker-indicator {
  padding: 0;
  margin: 0;
  cursor: pointer;

  margin-left: -0.2rem;
  margin-right: 0.6rem;
}

.todoCount {
  margin-left: 1rem;
}

/* ------------- */

main {
  display: flex;
  align-items: center;
  justify-content: space-between;

  flex-direction: column;
}

.inputContainer {
  display: flex;
  flex-direction: row;

  padding: 0.5rem;
  margin-bottom: 0.8rem;
  width: 100%;
  max-width: 20.8rem;
}

#todoInput {
  text-align: start;
  padding: 0.6rem;
  padding-left: 0.7rem;
  flex: 1;

  border: 1px solid grey;
  border-radius: 5px;
}
#todoInput::placeholder {
  color: #b8b8b8;
}

.appendTodo {
  position: relative;
  top: 2px;

  margin-left: 0.9rem;
  color: grey;
  font-size: 1.5rem;
}
.appendTodo:hover {
  color: black;
  cursor: pointer;
}

#todoInput:valid + .appendTodo {
  color: black;
}
#todoInput:invalid + .appendTodo {
  color: grey;
  cursor: not-allowed;
}

/* ------------- */

.listContainer {
  display: flex;
  align-items: center;

  padding: 0.1rem 0.3rem;
  margin-bottom: 10px;
  margin-left: 1px;
  width: 20rem;
}

.checkboxButton {
  margin-top: 1.5px;
  margin-right: 13px;
  transform: scale(1.4);
  accent-color: #808080; /* 체크 시 배경색 기본 파랑->회색 */

  cursor: pointer;
}

.todoContent {
  flex: 1;
  text-align: left;
  word-break: break-all; /* 문자열 길어지면 강제 줄바꿈*/
}

/* 체크되었을 때 글자 색 변경 */
.checkboxButton:checked ~ .todoContent,
.checkboxButton:checked ~ .deleteButton {
  color: #8b8b8b;
}
/* 체크되었을 때 취소선 */
.checkboxButton:checked ~ .todoContent {
  text-decoration: line-through;
  color: #8b8b8b;
}

.deleteButton {
  position: relative;
  top: -2px;
  margin-left: 0.9rem;

  font-size: 1.3rem;
  border: none;
  background: none;

  cursor: pointer;
}
.deleteButton:hover,
.checkboxButton:checked ~ .deleteButton:hover {
  color: #d1a29f;
}
