div.mapinfotooltip {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

div.mapinfotooltip-window {
    margin-top: 1em;
    background: var(--container-bg-color);
    box-shadow: 0px 0px 5px rgba(136, 136, 136, 1);
    border-radius: 0.5em;
    transform: translate(-50%, 0);
    -webkit-font-smoothing: antialiased;
    white-space: nowrap;
    pointer-events: all;
}

div.mapinfotooltip-titlebar {
    background-color: var(--titlebar-bg-color);
    color: var(--titlebar-text-color);
    font-weight: bold;
    padding: 0.25em 0.5em;
    border-radius: 0.5em 0.5em 0 0;
    display: flex;
    align-items: center;
    font-size: 90%;
}

span.mapinfotooltip-title {
    flex: 1 1 auto;
}

button.mapinfotooltip-button {
    flex: 0 0 auto;
    margin-right: 0.5em;
    border: none;
    background-color: transparent;
    background-color: var(--titlebar-bg-color);
    color: var(--titlebar-text-color);
}

button.mapinfotooltip-button:hover {
    color: var(--titlebar-bg-color);
    background-color: var(--titlebar-text-color);
}

div.mapinfotooltip-body {
    padding: 0.25em;
}

div.mapinfotooltip-body:after {
    content: '';
    display: block;
    position: absolute;
    left: calc(50% - 1em);
    top: -1em;
    width: 0;
    height: 0;
    border-left: 1em solid transparent;
    border-right: 1em solid transparent;
    border-bottom: 1em solid var(--titlebar-bg-color);
}

div.mapinfotooltip-body table {
    font-size: 75%;
}

div.mapinfotooltip-body td {
    padding: 0.25em;
}

table.mapinfotooltip-body-routing td:last-child {
    display: flex;
}

table.mapinfotooltip-body-routing td:last-child button {
    flex: 1 1 auto;
}