@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body{
    overflow-x: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

.overlay {
    position: fixed;
    top: 50px;
    left: 250px;
    width: 25vw;
    max-width: 400px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    overflow: auto;
    z-index: 1000;
    display: none;
    /* Initial state */
    border-radius: 0 0 10px 10px;
    animation: slideIn 0.5s ease-in-out;
}

.overlay-zoom-low {
    width: 32px !important;
    height:auto;
    max-width: 32px !important;
}

.parent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-template-rows: auto;
    grid-gap: 10px;
}

.parent div {
    padding: 10px;
    margin-bottom: 1%;
    background-color: #2b2b2b;
    /* Similar to Material UI background */
    border-radius: 4px;
    /* Material UI rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Material UI shadow */
}

/* Responsive rules */
@media (max-width: 1400px) {
    .overlay {
        width: 50vw;
        max-width: 300px;
        padding: 8px;
    }

    .parent {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        grid-gap: 8px;
    }

    .parent div {
        padding: 8px;
    }
}

@media (max-width: 900px) {
    .overlay {
        width: 70vw;
        max-width: 250px;
        padding: 6px;
    }

    .parent {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        grid-gap: 6px;
    }

    .parent div {
        padding: 6px;
    }
}

@media (max-width: 600px) {
    .overlay {
        width: 90vw;
        max-height: 50vh;
        padding: 4px;
    }

    .parent {
        grid-template-columns: 1fr;
        grid-gap: 4px;
    }

    .parent div {
        padding: 4px;
    }
}

.driver-name {
    grid-area: 1 / 1 / 2 / 5;
    text-align: center;
    background-color: #2b2b2b;
    border-radius: 5%;
    align-self: center;
}

.truck-model {
    grid-area: 2 / 1 / 3 / 3;
}

.cargo-name {
    grid-area: 4 / 1 / 5 / 5;
}

.truck-speed {
    grid-area: 2 / 3 / 3 / 5;
        ;
}

.source-city {
    grid-area: 5 / 1 / 6 / 3;
}

.destination-city {
    grid-area: 5 / 3 / 6 / 5;
}

.title {
    font-size: 1.2em;
    font-weight: bold;
}

.data {
    font-size: 0.9em;
}