@import url("https://use.typekit.net/hnp0ckc.css");

*{
    font-family: "poppins", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    outline: none;
}

main{
  background-color: #fff;
  color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
  gap: 30px;
}


li{
  list-style: none;
  display: flex;
  padding: 12px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.319);
  justify-content: space-between;
  align-items: baseline;
}

ul{
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 400px;
  max-width: 400px;
  max-height: 400px;
  overflow: hidden;
  overflow-x: auto;
  overflow-y: auto;

}

.botoes-li{ 
  gap: 10px;
  display: flex;
  
}

.botoes{
  width: 400px;
  display: flex;
  justify-content: space-between;
}

.botoes input {
  width: 82%;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-size: 1rem;
  line-height: 1.5rem; /* garante centralização vertical */
  display: flex;
  align-items: center; /* ajuda na centralização */
}

.botoes input:focus{
  border: 2px solid rgba(128, 128, 128, 0.319);
}

.botoes input::placeholder{
  font-weight: 500;
  font-size: 1rem;
  opacity: 80%;
  
}

.botoes button{
    font-weight: 600;
    font-size: 0.8rem;
    border: none;
    background: #325799;
    color: #fff;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    border-radius: 10px;
    padding: 6px 20px;
}

.editar,
.remover {
  width: 32px;              /* largura fixa */
  height: 32px;             /* altura fixa */
  display: flex;            /* centraliza o conteúdo */
  align-items: center;      /* centraliza vertical */
  justify-content: center;  /* centraliza horizontal */
  border-radius: 7px;
  font-size: 18px;          /* tamanho do ícone */
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.editar {
  background-color: rgba(59, 130, 246, 0.1); /* azul suave */
  color: #3b82f6;  /* azul mais forte no ícone */
}

.remover {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.erro{
  border: 2px solid red !important; /*é uma palavra-chave que dá a uma declaração de estilo a maior prioridade, fazendo-a substituir qualquer outro estilo que possa conflitar com ela, tem que usar se nao nao substitui a cor da borda pois ela ja é definida antes*/
  animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.erro::placeholder{
  color: red;
}

.fade{
  animation: fade 0.6s ease;
}

footer{
  text-decoration: none;
  color: grey;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 30px;
  font-size: 14px;
}

footer a{
  color: black;
  text-decoration: none;
}

@keyframes fade{
  0%{
    opacity: 0;
  }
  100%{
    opacity: 1;
  }
}

@keyframes shake {/*efeito de balançar*/
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}


/* Estilizando scrollbar (apenas em navegadores baseados em Webkit como Chrome/Edge) */
.tarefas::-webkit-scrollbar {
  height: 12px;/*largura do horizontal*/
  width: 3px;  /* largura do scroll vertical */
}

.tarefas::-webkit-scrollbar-track {
  background: transparent; 
}

.tarefas::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 10px;
}

.tarefas::-webkit-scrollbar-thumb:hover {
  background-color: #a8a8a8;
}

@media (max-width: 480px) {
  /* 1. Ajusta o espaçamento principal para telas pequenas */
  main {
    padding: 40px 20px; /* Menos preenchimento nas laterais */
  }

  /* 2. Faz o formulário e a lista de tarefas ocuparem 100% da largura */
  .botoes,
  ul {
    width: 100%;
  }

  .listaTarefa{
    width: 100%;
  }

  /* 3. Ajusta o tamanho do input para dar mais espaço ao botão */
  .botoes input {
    width: 70%;
  }
}
