/**
 * Show relations on the map (Google Maps)
 *
 * There is a bit of javascript which scrolls to the Google Maps container when
 * a result is clicked. This to make sure it works logically on mobile devices
 */

#googlemapscontainer {
    background-color: #fff;
}

/** Fix map controls */
#googlemapscontainer img {
    max-width: none !important;
}

#informationcontainer,
#googlemaps,
#routebox {
    float: none !important;
    width: 100% !important;
    height: auto !important;
}

#informationcontainer,
#routebox {
    padding-inline: 0;
}

/**
 * Information container
 */

#informationcontainer,
#informationcontainer .pbuic-tablinks {
    margin-bottom: 1em;
    background-color: #ebf7f9;
}

#tablinks_informationwindow_search {
    display: inline-block !important;
}

#googlemapscontainer legend {
    margin-bottom: 0.4em;
    font-size: 1.6em;
}

@media screen and (min-width: 720px) {
    #googlemapscontainer legend {
        font-size: 2em;
    }
}

#searchform {
    padding: 0 !important;
    background: #ebf7f9 !important;
}

#searchform fieldset {
    margin-bottom: 0;
}

#searchform select,
#searchform .proFormText,
#searchform input[type='text'] {
    margin: 0;
    padding-block: .4em;
}

#searchform button {
    margin-right: 0;
    background-color: var(--callToActionDark);
    border: 1px solid var(--callToActionDark);
}

#searchform button:hover {
    color: var(--callToActionDark);
    background-color: var(--baseLight100);
}

#searchform .submit {
    margin-bottom: 0;
}

#search_result_box {
    width: 100% !important;
    height: auto !important;
}

#searchbox,
.searchresult {
    width: 100% !important;
}

/** Results table */

#googlemapscontainer .searchresult {
    margin: 0;
    padding: 0;
    border-spacing: 0;
    border-collapse: collapse;
    font-size: 0.9em;
}

#googlemapscontainer .searchresult td,
#googlemapscontainer .searchresult th {
    padding: 0.5em;
    text-align: left;
    border: 1px solid #ddd;
}

#routebox {
    font-size: 0.8em;
}

.routedescription {
    width: 100%;
}

/**
 * Google maps
 */

#googlemaps {
    height: 400px !important;
    max-height: 90vh;
}

#googlemaps button {
    border-radius: 2px;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.3) 0 1px 4px -1px;
}

@media screen and (min-width: 820px) {
    /**
     * Information container
     */

    #googlemapscontainer {
        overflow: hidden;
        width: 100%;
    }

    #informationcontainer,
    #routebox {
        float: left !important;
        width: 300px !important;
    }

    /**
     * Google maps
     */

    #googlemaps {
        float: right !important;
        width: calc(100% - 300px - 2rem) !important;
        height: 850px !important;
    }
}

@media screen and (min-width: 1080px) {
    #googlemapscontainer {
        position: relative;
    }

    #googlemaps {
        width: 100% !important;
    }

    #informationcontainer,
    #routebox {
        position: absolute;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        top: 20px;
        left: 20px;
        width: 340px !important;
        max-height: calc(90vh - 30px);
        padding: 20px;
        border-radius: 2px;
        z-index: 1;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    #searchform {
        margin-bottom: 0;
    }
}

@media screen and (min-height: 940px) {
    #informationcontainer,
    #routebox {
        max-height: 810px;
    }
}

@media screen and (min-width: 1685px) {
    #informationcontainer,
    #routebox {
        left: calc(50vw - 480px - 340px);
    }
}
/**
 * Google info window
 */

.google-infowindow {
    line-height: 1.5em;
    max-width: 350px;
}

.google-infowindow h3 {
    display: inline-block;
    margin-block: 0 .5em;
    font-size: var(--h3Size);
    line-height: 1.1;
}

.google-infowindow dl {
    margin-top: 1.4em;
    border-top: 1px solid #c3d8e5;
}

.google-infowindow dt {
    clear: both;
    float: left;
    width: 60px;
    font-weight: bold;
}

.google-infowindow dd {
    display: block;
    margin: 0 0 0 60px;
}

.google-infowindow a {
    word-break: break-word;
}

.google-infowindow [onclick*='showDirections'] {
    margin: 1em 0;
    display: block;
}
