*{
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: "Lato", Helvetica, Arial, sans-serif;
}

header{
    margin: 0;
    width: 100%;
    padding: 5px 0;
    color: white;
    background-color: #400040;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wrapper {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width:40%; 
}

header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
}

button{
    background-color: transparent;
    cursor: pointer;
    border: none;
    outline: none;
    padding: 15px 30px;
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color:#fff;
}

header button:hover {
    color: #16a085;
}

#startBtn{
    background-color: rgb(22, 160, 133);
    font-size: 17px;
    font-weight: 100;
    border-radius: 5px;
    padding: 10px 20px;
}
#startBtn{
    color:#fff;
}

.info_section {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0px 0.1px 5px 0px rgba(0,0,0,0.3);
}
.info {
    display: flex;
    justify-content: center;
    align-items: center;
}
.info .cell {
    width: 23px;
    height: 23px;
    margin-right: 10px;
} 

.cell_unvisited {
    background-color: #fff;
    border: 1px solid black;
}

.cell_visited {
    background-color: rgba(51, 153, 255, 0.75);
}

.cell_wall {
    background-color: rgb(102, 0, 102);
}

.cell_path {
    background-color: yellow;
}

.cell_source {
    background-image:url(./triangletwo-right.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; 
}

.cell_destination {
    background-image:url(./circle.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.cell_weight {
    background:url(./weight.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}


/* *************************************************************Grid *************************************************************************/
.container {
    height: 83vh;
    margin: 5px;
}

#grid {
    height: 100%;
}

.row {
    height:4%;
    width: 100%;
    display: flex;
    margin: 0;
    padding: 0; 
}

.row div:first-child{
    border-left: 1px solid #1dc0dd;
}

#row_0 div {
    border-top: 1px solid #1dc0dd;
}

.row div{
    margin: 0;
    width: 5%;
}

.row .unvisited,.source,.destination,.visited,.null,.visitedInstant {
    border-right:  1px solid #1dc0dd;
    border-bottom: 1px solid #1dc0dd;
}

.row div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.source {
    background:url(./triangletwo-right.svg), rgba(22, 160, 133, 0.7);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.destination {
    background:url(./circle.svg), rgba(22, 160, 133, 0.7);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.weight {
    animation: weightAnimation 0.2s ease-out forwards;
    background:url(./weight.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}   

.visited {
    animation: visitedAnimation 1.2s ease-out;
    border-right:  1px solid rgba(51, 153, 255, 0.8);
    border-bottom: 1px solid rgba(51, 153, 255, 0.8);
    background-color: rgba(51, 153, 255, 0.75);
}

.shortestPathNode {
    animation: shortestPathAnimation 0.6s ease-in;
    border-right:  1px solid yellow;
    border-bottom: 1px solid yellow;
    background-color: rgb(255, 255, 0);
}

.weightInstant{
    background:url(./weight.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.visitedInstant {
    background-color: rgba(51, 153, 255, 0.75);
    border-right:  1px solid rgba(51, 153, 255, 0.8);
    border-bottom: 1px solid rgba(51, 153, 255, 0.8);
}

.shortestPathNodeInstant {
    border-right:  1px solid yellow;
    border-bottom: 1px solid yellow;
    background-color: yellow;
}

.row .wall {
    /* border: 1px solid rgb(102, 0, 102); */
    border-right:  1px solid rgb(102, 0, 102);
    border-bottom: 1px solid rgb(102, 0, 102);
    animation-name: fill-wall-colour;
    animation-duration: 0.2s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes fill-wall-colour{
    0% {
        background-color: rgb(102, 0, 102);
        transform: scale(0.3);
    }
    50% {
        background-color: rgb(102, 0, 102);
        transform: scale(1.1);
        
    }
    100% {
        background-color: rgb(102, 0, 102);
        transform: scale(1);
    }
}

@keyframes weightAnimation {
    0%{
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.2);
    }
    100%{
        transform: scale(1);
    }
}

@keyframes visitedAnimation{
    0% {
        transform: scale(.3);
        background-color: rgba(0, 0, 66, 0.75);
        border-radius: 50%;
      }
    
      50% {
        background-color: rgba(17, 104, 217, 0.75);
      }
    
      75% {
        transform: scale(1.2);
        background-color: rgba(0, 217, 159, 0.75)
      }
    
      100% {
        transform: scale(1.0);
        background-color: rgba(51, 153, 255, 0.75);
    }
}

@keyframes shortestPathAnimation{
    0% {
        background-color: yellow;
        transform: scale(0.3);
    }

    50% {
        background-color: yellow;
        transform: scale(0.8);
    }

    75%{
        background-color: yellow;
        transform: scale(1.2);
    }

    100% {
        background-color: yellow;
        transform: scale(1);
    }
}

/* **********************DropDown***************** */
.dropdown {
    float: left;
    overflow: hidden;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 170px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1;
}

.dropdown-content ul {
    width: 100%;
    float: none;
    color: black;
    display: block;
    text-align: left;
    padding: 0;
    margin: 0;
}

ul li {
    cursor: pointer;
    width: 100%;
    padding: 16px 20px;
    list-style: none;
}

.dropdown-content ul li:hover {
    background-color: #ddd;
}

.show {
    display: block;
}