/**
 * Make Google Maps snippet fullwidth
 */

.Article:has(#googlemapscontainer) .Article__content {
    max-width: var(--maxBreakoutWidth);
}

/**
 * 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 {
    border-radius: var(--borderRadiusSmall);
}

/** 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 {
    margin-bottom: var(--marginMedium);
}

#informationcontainer {
    background-color: var(--baseLight100);
}

#informationcontainer .pbuic-tablinks {
    background-color: transparent;
}

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

/**
 * tablinks
 */

.googleMapsContainer .pbuic-tablinks a {
    text-decoration: none;
    border-color: transparent;
    color: inherit !important;
}

.googleMapsContainer .pbuic-tablinks .tl-item-is-active a {
    border-color: inherit !important;
}

#searchform {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none;
    border-radius: 0;
}

#searchform fieldset {
    margin-bottom: 0;
}

#searchform select,
#searchform .proFormText,
#searchform input[type='text'] {
    margin: 0;
    padding-block: var(--marginExtraSmall);
}

#searchform button {
    margin-right: 0;
}

#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: var(--preTitleSize);
}

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

#routebox {
    font-size: var(--preTitleSize);
}

.routedescription {
    width: 100%;
}

/**
 * Google maps
 */

#googlemaps {
    height: 400px !important;
    max-height: 90vh;
    border-radius: var(--borderRadiusSmall);
}

@media screen and (min-width: 768px) {
    .informationContainer {
        margin-bottom: 0;
    }

    #googlemapscontainer {
        position: relative;
    }

    #googlemaps {
        width: 100% !important;
        height: 850px !important;
    }

    #informationcontainer,
    #routebox {
        position: absolute;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        inset: var(--marginSmall);
        bottom: auto;
        width: 50% !important;
        max-height: 800px;
        padding: var(--marginSmall);
        border-radius: var(--borderRadiusSmall);
        z-index: 1;
        box-shadow: var(--boxShadow);
    }

    #searchform {
        margin-bottom: 0;
    }
}

@media screen and (min-width: 1024px) {
    #informationcontainer,
    #routebox {
        inset: var(--marginMedium);
        bottom: auto;
        width: 40% !important;
    }
}

/**
 * Google info window (popup)
 */

.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;
}
