#map {
    width: 100dvw;
    height: 100dvh;
}
div.leaflet-left:has(> #map-legend) {
    padding: 0;
    margin: 0;
    left: 50%;
    transform: translate(-50%, 0%);
}
#map-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 400px;
    margin-left: 0;
    margin-bottom: 10px;
}
#map-legend .version-number {
    color: black;
}
#map-legend a {
    color: white;
    text-decoration: none;
}
#map-legend-main-group {
    display: flex;
    align-items: center;
    height: fit-content;
    box-sizing: border-box;
    width: 100%;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
}
#map-legend-data-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#rain-legend {
    width: 100%;
    margin-left: 0;
    margin-bottom: 0;
}
#time-legend {
    width: 100%;
    z-index: 10;
    aspect-ratio: 15.9375; /* value extracted from gif image size. It asumes the gif image size never change */
    overflow: hidden;
}
#time-legend img {
    width: 259%;
    transform: translate(-35%, -97.272727%); /* value extracted from gif image size. It asumes the gif image size never change */
    z-index: -1;
}
#marker-legend-div, #drawer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--dark-blue-1);
    border: solid 2px var(--dark-blue-2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
    font-family: var(--app-font);
}
#marker-legend-div .details-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#marker-legend-div .title-1,
#marker-legend-div .title-2 {
    font-size: 14px;
}
#marker-legend-div .title-1 {
    font-weight: bold;
}
#marker-legend-div .subtitle {
    font-size: 11px;
    font-style: italic;
}
#marker-legend-div .buttons-list {
    margin-top: 20px;
}
#rain-gif-wrapper {
    aspect-ratio: 985/850;
    overflow: hidden;
}
#rain-gif {
    width: 100%;
}
#rain-gif-ref {
    visibility: hidden;
}

/* Drawer -- Start */
#drawer.hidden {
    display: none;
}
/* Drawer -- Stop */

/* Message -- Start */
#message.hidden {
    display: none;
}
#message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--dark-blue-1);
    border: solid 2px var(--dark-blue-2);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 5px;
    font-family: var(--app-font);
}
#message.error {
    background-color: var(--red-1);
    border-color: var(--red-2);
    color: var(--red-2);
}
/* Drawer -- Stop */

/* For small screens: */
@media (width <= 640px) {
    #map-legend {
        width: 90dvw;
    }
    /* Hide rain blue pixels when time bar is not perfectly resized - Start */
    #time-legend {
        position: relative;
    }
    #time-legend img {
        position: relative;
    }
    #time-legend-border {
        position: absolute;
        width: 100%;
        height: 100%;
        box-shadow: 0 0 0 1px white inset;
    }
    /* Hide rain blue pixels when time bar is not perfectly resized - End */

    #marker-legend-div {
        width: 100%;
    }
}