input[type="checkbox"] {
  /* border: 1px solid var(--text-normal); */
  transition: background-color 200ms ease-out 0s;
  cursor: pointer;
  filter: none;
  border-radius: 4px;
}

input[type="checkbox"]:checked {
  background-color: var(--interactive-accent);
  background-image: none;
}

input[type="checkbox"]:hover {
  background-color: var(--background-primary-alt);
}

/* input[type="checkbox"]:checked::before {
  position: absolute;
  color: white;
  text-align: center;
  font-weight: 900;
  line-height: 15px;
  width: 12px;
  left: 2px;
  right: 2px;
} */

.markdown-preview-view ul > li.task-list-item {
  font-weight: normal;
  color: var(--text-normal);
}

/* SVG check mark for done ('- [x]') */
li[data-task="x"] input[type="checkbox"]::before {
  content: " ";
  top: 2px;
  bottom: 2px;
  background-color: var(--background-primary-alt);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpolygon points='5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039'%3E%3C/polygon%3E%3C/svg%3E");
}
body:not(.tasks) .HyperMD-task-line[data-task]:is([data-task="x"]),
.markdown-preview-view ul > li.task-list-item[data-task="x"] {
  color: #a9a7a7;
}

/* SVG chevron right for deferred/scheduled ('- [>]') */
.markdown-preview-view
  li[data-task=">"]
  .task-list-item-checkbox:checked::before,
input[type="checkbox"][data-task=">"]::before {
  content: "";
  top: 2px;
  bottom: 2px;
  left: 2.5px;
  background-color: var(--background-primary-alt);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.12 7L3.26667 11.76L4.57333 13.0667L10.7333 7L4.57333 0.933332L3.26667 2.24L8.12 7Z'/%3E%3C/svg%3E");
}

/* SVG line for cancelled/non-task ('- [-]') */
.markdown-preview-view
  li[data-task="-"]
  .task-list-item-checkbox:checked::before,
input[type="checkbox"][data-task="-"]::before {
  content: "";
  top: 2px;
  bottom: 2px;
  background-color: var(--background-primary-alt);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.5' y='6.5' width='13' height='1'/%3E%3C/svg%3E");
}
/* greyed-out background colour for cancelled/non-task ('- [-]') */
.markdown-preview-view li[data-task="-"] > .task-list-item-checkbox:checked {
  background-color: var(--text-faint);
}

/* '?' for question/more info task ('- [?]') */
.markdown-preview-view
  li[data-task="?"]
  .task-list-item-checkbox:checked::before,
input[type="checkbox"][data-task="?"]::before {
  content: "?";
}
/* text style for question/more info task ('- [?]') */
.markdown-preview-view ul > li[data-task="?"].task-list-item.is-checked {
  color: var(--text-normal) !important;
  text-decoration: none;
}
/* yellow background colour for question/more info task ('- [?]') */
.markdown-preview-view li[data-task="?"] > .task-list-item-checkbox:checked {
  background-color: #a99400 !important;
}

/* '!' for important task ('- [!]') */
.markdown-preview-view
  li[data-task="!"]
  .task-list-item-checkbox:checked::before,
input[type="checkbox"][data-task="!"]::before {
  content: "!";
}
/* text style for important task ('- [!]') */
.markdown-preview-view ul > li[data-task="!"].task-list-item.is-checked {
  color: var(--text-normal);
  text-decoration: none;
  font-weight: 900;
}
/* red background colour for important task ('- [!]') */
.markdown-preview-view li[data-task="!"] > .task-list-item-checkbox:checked {
  background-color: #a90000 !important;
  left: 2.5px;
}

/* text style for important task ('- [n]') */
.markdown-preview-view ul > li[data-task="n"].task-list-item.is-checked {
  color: #5d656b !important;
  text-decoration: line-through !important;
  font-style: italic;
  /* font-weight: 900; */
}
