* {
    box-sizing: border-box;
}

body {
    background-color: #fff;
    margin: 0;
    height: 100vh;
}

#heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 30px;
    /* margin-bottom: 4vh; */
}

#main_heading {
    font-size: 48px;
    padding: 0;
    margin: 10px;
}

.inputs {
    margin: 5px;
}

#heading button {
    cursor: pointer;
    border: 0;
    border-radius: 2px;
    padding: 6px;
    background-color: rgb(229, 226, 226);
}

#heading button:focus {
    transform: scale(0.90);
}

label {
    font-size: 25px;
}

.inputs input {
    width: 50px;
    border: 1px solid;
}

#floors_lifts {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.floor {
    height: 120px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: rgb(207, 207, 207);
    padding: 20px;
    border-bottom: 2px grey solid;
}

#up {
    background-color: coral;
}

#dn {
    background-color: green;
}

.button {
    cursor: pointer;
    border: 0;
    color: #fff;
    border-radius: 5px;
    padding: 5px;
    width: 5%;
}

.button:focus {
    outline: 0;
    transform: scale(0.95);
}

.floor p {
    font-size: 20px;
    font-weight:bolder;
    position: absolute;
    top: 50%;
    right: 5%;
    margin: 0;
    transform: translateY(-50%);
}

.lifts {
    width: 80px;
    height: 120px;
    background-color: #fff;
    position: absolute;
    top: 0;
}

.lifts .gate {
    position: absolute;
    height: 100%;
    width: 50%;
    border: 1px solid #111;
    background-color: grey;
}

.lifts #left_gate {
    left: 0;
}

.lifts #right_gate {
    right: 0;
}

.lifts.stopped .gate {
    animation-duration: 5s;
    animation-name: gate_open_close;
}

.lifts.running {
    transition-property: transform;
    transition-timing-function: ease;
}

@keyframes gate_open_close {
    from {
        width: 50%;
    }

    50% {
        width: 0%;
    }

    to {
        width: 50%;
    }
}

@media (max-width: 1200px) {

    #main_heading {
        font-size: 40px;
        margin: 5px;
    }

    .floor {
        height: 95px;
        padding: 15px;
    }

    .lifts {
        width: 50px;
        height: 95px;
    }

    .button {
        padding: 4px;
        width: 4%;
        font-size: 10px;
    }
}

@media (max-width: 600px) {

    #main_heading {
        font-size: 35px;
        margin: 5px;
    }

    .floor {
        height: 70px;
        padding: 10px;
    }

    .lifts {
        width: 40px;
        height: 70px;
    }

    .button {
        padding: 4px;
        width: 4%;
        font-size: 10px;
    }
}