/* Start global rules */

* {
    box-sizing: border-box;
}

body {
    background-color: aliceblue;
    font-family: "Cairo", sans-serif;
    padding-top: 77px;
}

::selection {
    background-color: #222c38;
    color: white;

}

input {
    outline: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

a {
    text-decoration: none;
}

.unselectable {
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Old versions of Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently supported by Chrome, Edge, Opera, and Firefox */
}

.container {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

/* Small */
@media (min-width: 768px) {
    .container {
        width: 750px;
    }
}

/* Medium */
@media (min-width: 992px) {
    .container {
        width: 970px;
    }
}

/* Large */
@media (min-width: 1200px) {
    .container {
        width: 1170px;
    }
}

/* End global rules */


/* Start header */

.theme {
    background-color: #18315380;
    width: 100%;
    height:100%;
    z-index: 3;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    transition: 0.3s;
}


header {
    width: 100%;
    height: 75px;
    background-color: white; 
    box-shadow: 0 3px 10px 0px #ddd;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
}

header .container {
    width: 90%;
    margin-left: 50px;
    display: flex;
    padding-top: 15px;
    letter-spacing: 1px;
    justify-content: space-between;
    transition: 0.3s;
}

header .container > .header-icons {
    font-size: 2rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 20px;
}

header .container > .header-icons > div {
    position: relative;
}

header .container > .header-icons i {
    cursor: pointer;
    color: #222c38;
    transition: 0.3s;
}

header .container > .header-icons i:active {
    color: #898989;
}



header .container .header-icons span {
    position: absolute;
    bottom: -25px;
    left: -25px;
    font-size: initial;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
    opacity: 0;
    transition: 0.3s;
    user-select: none;

}

 header .container .header-icons > div:nth-child(2) span {
    left: -15px;
}



header .container .header-icons > div i:hover + span {
    opacity: 1;
    z-index: 1;
    bottom: -35px;    
}

header .container .header-icons .settings i:hover {
    transform: rotateZ(90deg);
}


header .container h2 span {
    color:#17c9ed;
}

header .container h2 {
    font-size: 2.5rem;
    flex: 1;
    transition: 0.3s;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

header .header-welcome {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow: hidden;
}

header .header-welcome i {
    font-size: 20px;
    display: none;
    cursor: pointer;
    padding: 5px;
    transition: 0.3s;
    
}

header .header-welcome span {
    text-transform: capitalize;
}



@media (max-width: 992px) {
    header .container {
        padding: 15px 5px;
        margin: 7px 10px 0;
        
    }
    header .container h2 {
        font-size: 2rem;
    }

    header .container > .header-welcome i {
        display: block;
    }
}

@media (max-width: 492px) {
    header .container h2 {
        font-size: 1.3rem;
    }

    header .container > .header-icons {
        font-size: 1.4rem;
    }

    header .container {
        margin-left: 10px;
        padding-right: 0;
        
    }
}

/* End header */

/* Start nav  */
.all {
    display: grid;
    grid-template-columns: 20% 80%;
    position: relative;
    
}

.all nav {
    border-right: 1px solid #b2b0b0;
    min-height: calc(100vh - 75px);
    background-color: white;
    box-shadow: 0 0 10px -3px #ddd;
    transition: 0.3s;
    
    
}

.all nav .categories {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}


.all nav .categories > div {
    border: 1px solid #222c38;
    border-radius: 10px;
    text-align: center;
    padding: 10px;
    transition: 0.3s;
    cursor: pointer;
    
}


.all nav .categories > div:hover {
    background-color: #222c38;
    color: white;
}

.all nav .categories > div:active {
    background-color: #898989;
}



.all nav .categories > div p {
    flex-grow: 1;
}

.all nav .categories > div i{
    cursor: pointer;
    transition: 0.3s;
}

.all nav .categories > div i:active {
    color: #898989;

}

.all .categories-header {
    padding: 30px 0;
    background-color:#ebf8ff;
    border-bottom: 1px solid #b2b0b0;
    height: 95px;
}

.all nav .categories-header h3 {
    font-size: 1.8rem;
    color: #222c38;
    margin: 0;
    text-align: center;
    
    
}




.all .categories ul {
    margin-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.all .categories ul li {
    display: flex;
    text-align: center;
    font-size: 1.1rem;
    padding: 20px 5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    border-radius: 15px;
    height: 63px;
    max-width: 100%;
    
}

.all .categories ul li .category_name {
    width: 80%;
}

.all .categories ul li span {
    width: 20%;
}



.all .categories ul li::before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: -100%;
    top: 0;
    background-color: #dddddd32;
    transition: 0.3s;
}

.all .categories ul li:hover::before {
    left: 0;
}

.all .categories ul li.selected-category-choice::before {
    left: 0 !important;
}


.category-form {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 400px;
    border: 1px solid #ddd;
    transform: translate(-50%, -50%) scale3d(1, 1, 1);
    box-shadow: 0 0 5px 0 #ddd;
    border-radius: 5px;
    background-color: white;
    transition: transform 0.3s;
    opacity: 0;
    z-index: -1;
    padding-top: 10px;
    padding-bottom: 20px;
}

.category-form form > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    width: 80%;


}

.category-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-form h2 {
    text-align: center;
    color: #222c38;
    font-size: 30px;
}

.category-form .category-form-header {
    border-bottom: 1px solid #ddd;
    height: 40px;
    margin-bottom: 20px;
}

.category-form form>div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    width: 80%;


}

.category-form label {
    font-size: 20px;
    color: #222c38;
}



.category-form form>div .input {
    width: 100%;
    border: 1px solid #ddd;
    font-size: 18px;
    border-radius: 5px;
    padding: 2px 10px;
    height: 40px;

}

.category-form form>div:last-of-type input {
    width: 30%;
    background-color: #222c38;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin: 30px auto 20px auto;
    cursor: pointer;
    transition: 0.3s;
}

.category-form form>div:last-of-type input:active {
    background-color: #898989;
}

.category-form .close {
    position: absolute;
    top: -7px;
    right: -7px;
    transition: 0.3s;
    font-size: 25px;
    cursor: pointer;
}

.category-form .close:hover {
    color: red;
}

@media (max-width: 442px) {
    .category-form {
        width: 80%;
    }

        .category-form h2 {
        font-size: 25px;
    }

    .category-form label,
    .category-form form input {
        font-size: 16px;
    }
}

.form-shown {
    opacity:1 !important;
    z-index: 5 !important;
    transform: translate(-50%, -50%) scale3d(1.1, 1.1, 1.1) !important;
}

.clicked-rotate {
    transform: rotateZ(90deg) !important;
}

.clicked-rotate-arrow {
    transform: rotateZ(0deg) !important;
}

.clicked-shown {
    transform: rotateX(0deg) translateX(0) !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

.clicked-delete {
    right: 60px !important;
    opacity: 1 !important;
    z-index: 6 !important;
}


.clicked-rename {
    right: 0px !important;
    opacity: 1 !important;
    z-index: 6 !important;
}

.clicked-li {
    color: #17c9ed;
}

.clicked-li-wrap {
    white-space: wrap;
    overflow: visible;
}

.header-nav-shown-shadow {
    box-shadow: 0 0 5px 0 #ddd;
}

.nav-shown {
    left: 0 !important;
    
}

.message-shown {
    opacity: 1 !important;

}

.task-done {
    opacity: 0.7 !important;
    
}

.selected-task-choice {
    background-color: #dddddd76;
}




/* End nav */

/* Start tasks */

.tasks--wrapper {
    min-height: calc(100vh - 75px);
    background-color: white;
}

.tasks--wrapper .tasks-header {
    width: 100%;
    padding: 30px 0 30px 30px;
    border-bottom: 1px solid #b2b0b0;
    background-color: #ebf8ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 10%;
    height: 95px;
    
}

.tasks--wrapper .tasks-header h3 {
    color: #222c38;
    font-size: 1.8rem;
    
}

.tasks--wrapper .tasks-header > div:first-of-type {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 20px;
}

.tasks--wrapper .tasks-header>div:first-of-type i {
    font-size: 25px;
}

.tasks--wrapper .tasks-header .icon {
    height: 40px;
    padding: 25px 10px;
    background-color: white;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: 0.3s;
    position: relative;
}

.tasks--wrapper .tasks-header .icon span {
    color: #222c38;
    content: 'Add Task';
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 10px;
    left: -200%;
    background-color: white;
    padding: 5px;
    border-radius: 10px;
    width: 150%;
    height: 70%;
    transform: translateX(20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.1s;
    
}

.tasks--wrapper .tasks-header .icon i{
    cursor: pointer;
    display: block;
}



.tasks--wrapper .tasks-header .icon > i:hover + span{
    transform: translateX(0);
    opacity: 1;
}


.tasks--wrapper .tasks-header .icon:active {
    color: #898989;
}


@media (max-width: 992px) {
    .all {
        grid-template-columns: 1fr;
    }
    .all nav {
        
        position: fixed;
        top: 76px;
        left: -50%;
        z-index: 4;
        width: 50%;

    }
}


.tasks--wrapper .tasks-choices {
    display: flex;
    background-color: #ebf8ff;
    justify-content: space-between;
    padding: 10px 20% 10px 10%;
    border-bottom: 1px solid #b2b0b0;
    color: #222c38;
    transition: 0.3s;
    min-height: 70px;
    flex-wrap: wrap;
    align-content: center;
}

@media(max-width:442px) {
    .tasks--wrapper .tasks-choices {
        padding: 10px 5%;
    }

    
}

.tasks--wrapper .tasks-choices > div {
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    transition: 0.3s;
    cursor: pointer;
}

.tasks--wrapper .tasks-choices > div:hover {
    background-color: #dddddd76;

}


.tasks--wrapper .tasks-number {
    font-size: 18px;
    padding: 0 15% 10px;
    border-bottom: 1px solid #222c38;
    background-color: #ebf8ff;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    text-align: center;
}

.tasks--wrapper .tasks-number span {
    background-color: #222c38;
    color: white;
    margin-right: 10px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 10px;
    display: inline-block;
    height: 30px;
    align-content: center;
    min-width: 30px;
    text-align: center;
}


.tasks--wrapper .tasks-number .sort {
    display: flex;
    gap: 5px;
    transition: 0.3s;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    position: relative;
}

.tasks--wrapper .tasks-number .sort:hover {
    background-color: #dddddd76;
}

.tasks--wrapper .tasks-number .sort .new-old {
    position: absolute;
    bottom: -85px;
    left: 0px;
    width: 100%;
    display: flex;
    background-color: #ebf8ff;
    flex-direction: column;
    /* gap: 10px; */
    /* padding: 10px 0; */
    border-radius: 10px;
    border: 1px solid #222c38;
    text-align: center;
}

.tasks--wrapper .tasks-number .sort .new-old div:first-of-type {
    
    border-bottom: 1px solid #222c38;
    transition: 0.3s;
}

.tasks--wrapper .tasks-number .sort .new-old div {
    padding: 10px 0;
}

.tasks--wrapper .tasks-number .sort .new-old div:hover {
    background-color: #dddddd76;
    
}




@media(max-width:442px) {

    .tasks--wrapper .tasks-number {
        padding: 0 5%;
    }
}



.tasks--wrapper .container{
    background-color: #d3f0fe75;
    border-radius: 10px;
    margin-top: 30px;
    width: 90%;
    padding-top: 20px;
    padding-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tasks--wrapper .container .tasks {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tasks--wrapper .container .tasks > p{
    text-align: center;
    font-size: 18px;
    word-spacing: 2px;
}


.tasks--wrapper .container .task-details {
    background-color: white;
    border-radius: 10px;
    padding: 10px 25px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.tasks--wrapper .container .task-details p {
    font-size: 18px;
    line-height: 50px;
    transition: 0.3s;
}

.tasks--wrapper .container .task-details small {
    text-align: right;
    font-size: 16px;
    margin-top: 10px;
    width:max-content;
    align-self: flex-end;
    border-top: 1px solid #222c38;
    border-bottom: 1px solid #222c38;
    padding: 5px;
}   



.tasks--wrapper .container .task-details .task-header {
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    
}




.tasks--wrapper .container .task-details .task-header h2 {
    font-size: 30px;
    position: relative;
    transition: 0.3s;
}




.tasks--wrapper .container .task-details .task-header i {
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
}

.tasks--wrapper .container .task-details .task-header i:hover {
    color: #17c9ed;
}

.tasks--wrapper .container .task-details .task-header .icons {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}


@media (max-width: 492px) {
    .tasks--wrapper .container .task-details p {
        line-height: 40px;

    }

        .tasks--wrapper .container .task-details .task-header h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
}

.tasks--wrapper .container .task-details .task-settings {
    position: absolute;
    top: -35px;
    right: 55px;
    background-color: #dae4e6;
    transform: rotateX(30deg) translateX(30px);
    opacity: 0;
    transition: 0.3s;
    border-radius: 10px;
    width: 70px;
    text-align: center;
    z-index: -1;

}

.tasks--wrapper .container .task-details .task-settings p {
    
    cursor: pointer;
    transition: 0.3s;
    border-radius: 10px;

}


.tasks--wrapper .container .task-details .task-settings p:active {
    
    color: #898989;
    
}

.tasks--wrapper .container .task-details .task-settings p:hover {
    background-color:aliceblue;
}

.tasks--wrapper .container .task-details .task-settings p:first-of-type {
    border-bottom: 1px solid #898989;
}


/* Add task form */

.form-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 400px;
    border: 1px solid #ddd;
    transform: translate(-50%, -50%) scale3d(1, 1, 1);
    box-shadow: 0 0 5px 0 #ddd;
    border-radius: 5px;
    background-color: white;
    transition: transform 0.3s;
    opacity: 0;
    z-index: -1;
    padding-top: 10px;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-container h2 {
    text-align: center;
    color: #222c38;
    font-size: 30px;
}

.form-container .task-form-header {
    border-bottom: 1px solid #ddd;
    height: 40px;
    align-content: center;
}

.form-container form > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    width: 80%;


}

.form-container label {
    font-size: 20px;
    color: #222c38;
}

.form-container #description {
    height: 70px;
}

.form-container form > div .input {
    width: 100%;
    border: 1px solid #ddd;
    font-size: 18px;
    border-radius: 5px;
    padding-left:10px;

}

.form-container form > div input[type="text"] {
    height: 40px;
}

.form-container textarea {
    min-height: 150px;
    padding-top: 10px;
}


.form-container form > div:last-of-type input {
    width: 30%;
    background-color:#222c38;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin: 30px auto 20px auto;
    cursor: pointer;
    transition: 0.3s;
}

.form-container form>div:last-of-type input:active {
    background-color: #898989;
}

.form-container .close {
    position: absolute;
    top: -7px;
    right: -7px;
    transition: 0.3s;
    font-size: 25px;
    cursor: pointer;
}

.form-container .close:hover {
    color: red;
}


@media (max-width: 442px) {
    .form-container {
        width: 80%;
    }

    .form-container h2 {
        font-size: 25px;
    }

    .form-container label,
    .form-container form > div .input {
        font-size: 16px;
    }
}

.delete-form {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 400px;
    border: 1px solid #ddd;
    transform: translate(-50%, -50%) scale3d(1, 1, 1);
    box-shadow: 0 0 5px 0 #ddd;
    border-radius: 5px;
    background-color: white;
    transition: transform 0.3s;
    opacity: 0;
    z-index: -1;
    padding: 20px 50px;
}

.delete-form form{
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    
}

.delete-form .delete-message p {
    font-size: 20px;
}

.delete-form .buttons input{
    background-color: white;
    color: #222c38;
    padding: 10px;
    border: 1px solid #222c38;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.1s;
}

.delete-form .buttons .cancel:hover {
    color: white;
    background-color: #222c38;
}

.delete-form .buttons .delete:hover {
    background-color: red;
    color: white;
    border: 1px solid red;
}

.delete-form .close {
    position: absolute;
    top: -7px;
    right: -7px;
    transition: 0.3s;
    font-size: 25px;
    cursor: pointer;
}

.delete-form .close:hover {
    color: red;
}


/* end tasks */


/* Start Messages */
.message {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222c38;
    color: white;
    border-radius: 15px;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    transition:0.3s;
    z-index: 6;
    opacity: 0;
    line-height: 2;
}


.message i {
    cursor: pointer;

    display: block;
}

.message p{
    text-align: center;
}



.message span {
    background-color: white;
    border-radius: 50%;
    height: 20px;
    width: 20px;
    text-align: center;
    color: #222c38;
    align-content: center;
    transition: 0.1s;
}

.message span:active {
    background-color: #222c38;
    color: white;
}

@media (max-width: 400px) {
    .message span {
        width: 30px;
    }
}

/* End messages */

/* Change Categories */

.change-categories {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 0 5px 0 #ddd;
    text-align: center;
    gap: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale3d(1, 1, 1);
    opacity: 0;
    z-index: -1;
    background-color: white;
    width: 400px;
    transition: transform 0.3s;
}

.change-categories h2 {
    border-bottom: 1px solid #ddd;
    font-size: 30px;
    height: 40px;
    transition: 0.3s;
}


.change-categories ul {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.change-categories ul li {
    position: relative;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    height: 30px;
    align-items: center;
}

.change-categories ul li .icons {
    display: flex;
    position: relative;
    gap: 10px;
}

.change-categories ul li .icons i {
    color: #222c38;
    cursor: pointer;
    transition: 0.3s;
}

.change-categories ul li .icons .fa-trash-can:hover {
    color: red;
}



.change-categories .confirm-delete {
    position: absolute;
    right: 40px;
    top: -1px;
    color: white;
    background-color: #222c38;
    padding: 5px;
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: 0.3s;
    display: flex;
    gap: 10px;
}


.change-categories .confirm-delete i {
    transition: 0.3s;
    cursor: pointer;
}

.change-categories .confirm-delete i.fa-check:hover {
    color: greenyellow;
}


.change-categories .confirm-delete i.fa-xmark:hover {
    color: red;
}


.change-categories .close {
    position: absolute;
    top: -7px;
    right: -7px;
    transition: 0.3s;
    font-size: 25px;
    cursor: pointer;
}

.change-categories .close:hover {
    color: red;
}



@media (max-width: 442px) {
    .change-categories {
        width: 80%;
    }

    .change-categories h2{
        font-size: 25px;
    }

}

/* end Change categories */

/* start logout message */

.logout-form {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 400px;
    border: 1px solid #ddd;
    transform: translate(-50%, -50%) scale3d(1, 1, 1);
    box-shadow: 0 0 5px 0 #ddd;
    border-radius: 5px;
    background-color: white;
    transition: transform 0.3s;
    opacity: 0;
    z-index: -1;
    padding: 20px 50px;
}

.logout-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;

}

.logout-form .confirm-message p {
    font-size: 20px;
}

.logout-form .buttons input {
    background-color: white;
    color: #222c38;
    padding: 10px;
    border: 1px solid #222c38;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.1s;
}

.logout-form .buttons .cancel:hover {
    color: white;
    background-color: #222c38;
}

.logout-form .buttons .logout:hover {
    background-color: red;
    color: white;
    border: 1px solid red;
}

.logout-form .close {
    position: absolute;
    top: -7px;
    right: -7px;
    transition: 0.3s;
    font-size: 25px;
    cursor: pointer;
}

.logout-form .close:hover {
    color: red;
}



/* end logout message */
