/* Ajustes básicos para o tema readthedocs */

.rst-content .task-list-item {
  list-style-type: none !important;    
}

.rst-content .task-list-item input[type="checkbox"] {
  margin: 0 .4em .25em -1.6em;
  vertical-align: middle;        
}

/* Marca visualmente tarefas concluídas (- [x]) */
.rst-content li.task-list-item:has(> input[type="checkbox"]:checked) {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(0,0,0,.35);
  opacity: .75;  
}

/* Mantém o checkbox “normal” (sem herdar o risco/efeito) */
.rst-content li.task-list-item > input[type="checkbox"] {
  text-decoration: none !important;
  opacity: 1;    
}

/* Checkbox customizado (independe do accent-color / tema) */
.rst-content .task-list-item input[type="checkbox"] {
  /* mantém seu alinhamento */
  margin: 0 .4em .25em -1.6em;
  vertical-align: middle;

  /* desenhar o checkbox */
  -webkit-appearance: none;
  appearance: none;

  width: 1.05em;
  height: 1.05em;
  border: 2px solid #bdbdbd;
  border-radius: .2em;
  background: #e0e0e0;

  display: inline-grid;
  place-content: center;

  /* como o pymdownx costuma colocar disabled, evita “apagado” */
  opacity: 1;
}

/* O “tick” (fica invisível até marcar) */
.rst-content .task-list-item input[type="checkbox"]::before {
  content: "";
  width: .50em;
  height: .28em;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
}

/* Marcado: fundo verde + borda verde + mostra o tick */
.rst-content .task-list-item input[type="checkbox"]:checked {
  background: #2e7d32;
  border-color: #2e7d32;
}

.rst-content .task-list-item input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}
