@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poppins:wght@400;500;600&family=Press+Start+2P&family=Quicksand:wght@300;400&family=Roboto:wght@100&display=swap');

:root{

    --unchecked: url(/assets/images/unchecked.png);
    --checked: url(/assets/images/checked.png);

}

*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins';
}

.container{
    width: 100%;
    min-height: 100vh;
    /* background:linear-gradient(135deg, #c8c8c8, #ffffff); */
    padding: 10px;
}

.todo-app{
    width: 100%;
    max-width: 540px;
    background-color: #FFFF99;
    margin: 100px auto 20px;
    padding: 20px 30px 70px;
    border-radius: 10px;
    
}

.title{
    color: black;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: center;
    font-size: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-weight: bolder;
}

.row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    border-radius: 30px;
    padding-left:20px;
    margin-bottom: 25px;
    height: 3rem;
}

#input-box{
    height: 100%;
    flex: 1;
    outline: none;
    border: none;
    padding: 10px;
    font-weight: 14px;
    background-color: white;

}

button.add{
    height: 100%;
    border:none;
    outline: none;   
    padding: 0 50px;
    background-color: #221a4e;
    color:white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 40px;
    text-align: center;
}

button.add:active{
    transform: scale(0.9);
}

ul li{
    list-style-type: none;
    font-size: 17px;
    padding: 12px 8px 12px 50px;
    user-select: none;
    cursor: pointer;
    position: relative;
    overflow-wrap:2rem;
    
}

ul li::before{
    content: '';
    position: absolute;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background-image:var(--unchecked);
    background-size: cover;
    background-position: center;
    top:12px;
    left:8px;
}

ul li.checked{
    color:#555;
    text-decoration: line-through;
}

ul li.checked::before{
    background-image: var(--checked);
    background-size: cover;
    background-position: center;
}

ul li span{
    position: absolute;
    right: 0;
    top: 5px;
    width: 40px;
    height: 40px;
    font-size: 22px;
    color: #555;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    margin-left: 3rem;
    align-content: center;
}

ul li span:hover{
    background-color: rgba(255, 0, 0, 1);
    color:white;
}

.buttons{
    justify-content: center;
    gap:1rem;
    display: flex;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(128, 128, 128,0.5);
}

.btn{
    height: 40px;
    width: 40px;
    border:none;
    outline: none; 
    color:white;
    cursor: pointer;
    border-radius: 40px;
    text-align: center;
    background-color: #002765;
}

.btn:hover{
    font-size: 1rem;
    background-color: #376cc3;
    transform: scale(1.2);
}

.btn:active{
    transform: scale(0.9);
}

button.error {
    animation: shake .6s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
  }


.msg{
    display: flex;
    text-align: center;
    text-transform: uppercase;
    font-style: italic;
    font-size: 0.8rem;
    height: 3rem;
    width: fit-content;
    padding: 0 1rem;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
}

.msg.deleteMsg{
    background-color: rgba(255, 0, 0, 0.5);
    color:white;
    animation: showMsg 3s linear forwards;
}

.msg.successMsg{
    background-color: rgba(10, 204, 0,0.5);
    color:white;
    animation: showMsg 3s linear forwards;
}

.msg.loadMsg{
    background-color: rgba(54, 54, 54, 0.69);
    color:white;
    animation: showMsg 3s linear forwards;
}

  /* -------------ANIMATION-------------*/

@keyframes shake {
    10%, 90% {
      transform: translate3d(-1px, 0, 0);
      background-color: red;
    }
    
    20%, 80% {
      transform: translate3d(2px, 0, 0);
      background-color: red;
    }
  
    30%, 50%, 70% {
      transform: translate3d(-4px, 0, 0);
      background-color: red;
    }
  
    40%, 60% {
      transform: translate3d(4px, 0, 0);
      background-color: red;
    }
  }
  
  @keyframes showMsg{
    0%,100% { opacity: 0 }
    50% { opacity: 1 }
}

/* -------------TOOLTIP-------------*/

  .tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
  }
  
  .tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    text-align:center;
    padding: 0 0.5rem;
  }
  
  .tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
  }
  
  .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }

  /* -------------MEDIA QUERIES-------------*/

@media (width < 400px){

    .row{
        overflow:hidden;
        flex: 1;
        width: 100%;
        display: flex;
        padding: 0;
    }

    button.add{
        padding: 0 2rem;
    }

    #input-box {
        flex: 0;
        margin: 0 auto;
    }
}

@media screen and (width < 399px){

    .row{
        overflow: hidden;
        height: 2.5rem;
        text-align: center;
    }

    button.add{
        position: absolute;
        height: 2.5rem;
        width: 3rem;
        font-size: 0.8rem;
        margin-left: 70%;
        padding: 0;
    }

    #input-box {
        height: 2rem;
        padding: 0;
        margin-left: 20px;
    }

    ul li{
        font-size:0.8rem;
    }
}
