html,body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-y: initial;
}

body {
    display: flex;
    flex-direction: column;
    align-content: stretch;
}

nav {
    background-color: var(--grey);
}

div.olControlLayerSwitcher {
    width: 240px;
    font-size: 13px;
    top: 20px;
}
div.olControlLayerSwitcher .layersDiv {
    background-color: #575757;
    padding-right: 220px;
}

div.olControlLayerSwitcher label {
    color:white;
    font-weight: bold;
    text-align: left;
    white-space:nowrap;
    left: 20px;
    /* Bootstrap Hack */
    top: -10px;
    position: relative;
    float: none !important;
    line-height: 0px;
}

div.olControlPermalink {
    margin-right: 3px;
    bottom: 2.0em;
    display: block;
    position: absolute;
    font-size: smaller;
    font-size: 12px;
}

div.olControlAttribution {
    font-size: smaller;
    margin-right: 3px;
    bottom: 0.5em;
    position: absolute;
    display: block;
    font-size: 11px;
}


#karte_nav {
    margin-top: 3px;
    margin-right: 30px;
    width: 100%;
    text-align: right;
}

#karte_nav ul {
    display: inline-block;
    margin-bottom: 3px;
    margin-right: 10px;
}

div#karte_nav ul li {
    list-style-type: none;
    display: inline;
    margin: 0;
    padding: 0 0 0 15px;
}

.lnav a:link {
    text-decoration: none;
    color: #3375A1;
    border-bottom: none;
}

.lnav a:visited {
    text-decoration: none;
    color: #3375A1;
    border-bottom: none;
}

.lnav a:hover {
    border-bottom: 1px solid #A9A9A9;
    color: #3FA9F5;
}

#controls-row {
    display: flex;
    padding-left: 20px;
    align-items: center;
}

#osm_logo {
    height: 50px;
}

#tfSearch {
    width: 270px;
    padding: 5px 10px;
    font-size: 12px;
}

#search {
    margin-left: 10px;
    margin-top: 3px;
    font-size: 12px;
}

#search a:focus {
    outline: none;
}

/* Route Button Dropdown
------------------------------------------ */

.descRoute {
    color: grey;
    text-align: right;
    position: absolute;
    right: 10px;
}

.descRouteORS {
    color: grey;
    text-align: right;
    position: absolute;
    right: 18px;
}

.menu-dropdown, .dropdown-menu {
    max-width: 520px;
}

a.menu::after, .dropdown-toggle::after {
    border: none;
}

.dropdown-menu a {
    text-shadow: none !important;
}

.btn .dropdown-toggle {
    text-shadow: none !important;
}

/* Code copied and slightly motified from Bootstrap 2 */

.dropup,
.dropdown {
    position: relative;
}

.dropdown-toggle:active,
.open .dropdown-toggle {
    outline: 0;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    vertical-align: top;
    border-top: 4px solid #000000;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    content: "";
}

.dropdown .caret,
.btn .caret {
    margin-top: 6px;
    margin-left: 5px;
    margin-right: -5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1337;
    display: none;
    float: left;
    min-width: 400px;
    padding: 5px 0;
    margin: 2px 0 0;
    list-style: none;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
}

.dropdown-menu.pull-right {
    right: 0;
    left: auto;
}

.dropdown-menu .divider {
    height: 1px;
    margin: 9px 1px;
    overflow: hidden;
    background-color: #e5e5e5;
    border-bottom: 1px solid #ffffff;
}

.dropdown-menu a {
    display: block;
    padding: 3px 20px;
    clear: both;
    font-weight: normal;
    line-height: 20px;
    color: #333333;
    white-space: nowrap;
}

.dropdown-menu li > a:hover,
.dropdown-menu li > a:focus,
.dropdown-submenu:hover > a {
    color: #ffffff;
    text-decoration: none;
    background-color: #0088cc;
    background-color: #0081c2;
    background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
    background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
    background-image: -o-linear-gradient(top, #0088cc, #0077b3);
    background-image: linear-gradient(to bottom, #0088cc, #0077b3);
    background-repeat: repeat-x;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}

.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
    color: #ffffff;
    text-decoration: none;
    background-color: #0088cc;
    background-color: #0081c2;
    background-image: linear-gradient(to bottom, #0088cc, #0077b3);
    background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
    background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
    background-image: -o-linear-gradient(top, #0088cc, #0077b3);
    background-repeat: repeat-x;
    outline: 0;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}

.dropdown-menu .disabled > a,
.dropdown-menu .disabled > a:hover {
    color: #999999;
}

.dropdown-menu .disabled > a:hover {
    text-decoration: none;
    cursor: default;
    background-color: transparent;
}

.open > .dropdown-menu {
    display: block;
}

.pull-right > .dropdown-menu {
    right: 0;
    left: auto;
}

.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
    border-top: 0;
    border-bottom: 4px solid #000000;
    content: "";
}

.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-bottom: 1px;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > a:after {
    display: block;
    float: right;
    width: 0;
    height: 0;
    margin-top: 5px;
    margin-right: -10px;
    border-color: transparent;
    border-left-color: #cccccc;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    content: " ";
}

.dropdown-submenu:hover > a:after {
    border-left-color: #ffffff;
}

.dropdown .dropdown-menu .nav-header {
    padding-right: 20px;
    padding-left: 20px;
}

/* Buttons
------------------------------------------ */

#Route {
    margin-left: 10px;
    margin-top: 3px;
    font-size: 14px;
    position: relative;
}

#Route button {
    width: 85px;
}

#editMap {
    margin-left: 10px;
    margin-top: 3px;
    font-size: 14px;
}

#errorMap {
    margin-left: 10px;
    margin-top: 3px;
    font-size: 14px;
}

/* ------------------------------------------ */

#copyright {
    text-align: right;
    margin-right: 3px;
    margin-bottom: 3px;
    font-size: 10px;
}

#mapkey_area iframe {
    width: 295px;
    height: 95%;
    border: none;
    background-color: #ffffff;
    border: 0;
    z-index: 20002;
    overflow: auto;
}

#mapkey_area {
    height: 95%;
}

#map {
    padding-right: 30px;
    padding-left: 30px;
    flex-grow: 1;
    flex-shrink: 1;
    min-height: 200px;
    /* Safari needs this. Otherwise div#map will be 0px high. */
    width: 100%;
    height: 100%;
}

#resultBox {
    display: none;
    position: absolute;
    background-color: white;
    z-index: 1030;
    max-height: 80%;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: 15px;
    border: 1px solid #bebebe;
    min-height: 80px;
    border-radius: 6px;
    width: 270px;
    align-items: flex-start;
    overflow-y: scroll;
}

#information {
    display: block;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 240px;
    overflow-y: auto;
}

#closeResultBox {
    display: block;
    width: 17px;
    flex-grow: 0;
    cursor: pointer;
}

a {
    color: var(--primary-darker);
}


#everything-else {
    position: absolute;
    width: 100%;
    top: 68px;
    height: calc(100% - 68px);
}

@media (max-width: 850px) {
    #tfSearch {
        width: 225px;
    }
}

/* layout for smartphones */
@media (max-width: 640px) {
    #uploadfilter-banner {
        font-size: 12px;
        font-weight: bold;
        margin-bottom: 3px;
    }

    #donation-drive {
        display:  none;
    }
    #everything-else {
        height: 100%;
        top: 0px;
    }

    /*Logo und Buttons ausblenden*/
    #osm_logo {
        display: none;
    }

    #errorMap, #Route, #editMap {
        display: none;
    }

    #search {
        margin: 0 0 0 0;
        display: flex;
        width: 100%;
        align-items: stretch;
        padding-bottom: 3px;
    }

    #tfSearch {
        width: 210px;
        padding: 3px 10px 3px 10px;
        margin-right: 10px;
        flex-grow: 1;
        flex-shrink: 1;
    }

    #searchButton {
        padding-top: 3px;
        padding-bottom: 3px;
    }

    /*Navigation formatieren*/
    ul.lnav {
        text-align: center;
    }

    ul, ol {
        margin-left: 0px !important;
    }

    #karte_nav {
        font-size: 12px;
    }

    div#karte_nav ul li {
        padding: 0 7px 0 7px;
    }

    #controls-row {
        padding-left: 10px;
        padding-right: 10px;
    }

    /*iLike und Zoom-Controls ausblenden*/
    div.olILikeOSM {
        display: none;
    }

    #panzoombar {
        display: none;
    }

    /*LayerSwitcher anpassen*/
    div.olControlLayerSwitcher {
        top: 10px !important;
    }

    input[type="checkbox"], input[type="radio"] {
        height: 20px !important;
        width: 20px !important;
    }

    div.olControlLayerSwitcher label {
        top: -20px !important;
        left: 30px !important;
        line-height: 15px !important;
    }

    /*Slider für Suchergebnisse schmaler machen*/
    #slider {
        width: 300px !important;
    }

    /*Footer*/
    #legend {
        display: none;
    }

    #copyright {
        right: 5px !important;
        text-align: right;
        top: 110%;
    }
}
