#wrapper, #map {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#wrapper #map img {
    max-height: none;
    max-width: none;
}

#gliderSelectorPopup {
    display: none;
    z-index: 9999;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

#gliderSelectorPopup > div {
    position: absolute;
    min-width: 200px;
    min-height: 200px;
    top: 50%;
    left: 50%;
    margin-top: -100px;
    margin-left: -100px;
    background-color: #fff;
    padding: 10px;
    -webkit-box-shadow: 0 0 10px #777;
    -moz-box-shadow: 0 0 10px #777;
    box-shadow: 0 0 10px #777;
}

#gliderSelectorPopup select {
    display: block;
    margin-bottom: 0.5rem;
    margin-top: 0.2rem;
}

#gliderSelectorPopup .closebutton {
    background: none repeat scroll 0 0 transparent;
    color: #c3c3c3;
    font: bold 16px/14px Tahoma, Verdana, sans-serif;
    height: 14px;
    padding: 4px 4px 0 0;
    position: absolute;
    right: 0;
    text-align: center;
    text-decoration: none;
    top: 0;
    width: 18px;
}

#gliderSelectorPopup .closebutton:hover {
    color: #ec0000;
}

h2 {
    font-family: GalaxiePolaris-Medium, sans-serif;
    font-size: 1.05rem;
    padding-bottom: 0.2rem;
}

h3 {
    font-family: GalaxiePolaris-Medium, sans-serif;
}

.leaflet-map-pane,
.leaflet-popup-pane {
    width: 100%;
    max-width: 900px;
}

.leaflet-popup img {
    height: 2rem;
    width: auto;
    max-width: 100% !important;
    max-height: 100% !important;
}

.leaflet-popup h3 {
    padding-top: 5px;
    color: #4a4a49;
    font-size: 1rem;
    line-height: normal;
    text-decoration: none;
}

.leaflet-popup h2 {
    color: #4a4a49;
    font-size: 1.1rem;
    line-height: normal;
    text-decoration: none;
}

.leaflet-right {
    left: 0;
}

#wrapper ul {
    width: 100%;
    padding-top: 0.2rem;
    display: table;
}

#wrapper ul div.row {
    display: table-row;
    width: 100%;
}

#wrapper li {
    display: table-cell;
    width: 49%;
    box-sizing: border-box;
    padding: 0 5px;
}

.leaflet-popup li {
    white-space: nowrap;
}

.leaflet-popup li:before {
    color: #ff0000;
    content: "_ ";
}

.glider_list li.even {
    padding-right: 0.6rem;
}

/*From http://stackoverflow.com/questions/6879467/how-do-i-justify-a-horizontal-list*/
.stretch {
    height: 0.0001rem !important;
    z-index: -1 !important;
    display: inline-block !important;
    width: 100% !important;
}

#showSidebarNav {
    font-family: GalaxiePolaris-Medium, sans-serif;
    display: none;
    z-index: 999;
    position: absolute;
    top: 50%;
    right: 0;
    height: 2rem;
    line-height: 2rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    -webkit-transform-origin: right top;
    -moz-transform-origin: right top;
    transform-origin: right top;
    -webkit-transform: translateX(-2rem) rotate(-90deg);
    -moz-transform: translateX(-2rem) rotate(-90deg);
    transform: translateX(-2rem) rotate(-90deg);
}

#hidesidebarNav {
    color: #49494a;
    position: absolute;
    top: 0;
    right: 0.5rem;
    font-size: 1.4rem;
    /* Stretch x so it's more quadratic */
    -webkit-transform: scale(1, 0.8);
    -moz-transform: scale(1, 0.8);
    -o-transform: scale(1, 0.8);
    -ms-transform: scale(1, 0.8);
    transform: scale(1, 0.8);
    display: block;

}

#sidebar_nav {
    display: block;
    width: 200px;
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    padding: 10px;
    padding-top: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 15;
}

#sidebar_nav select, #sidebar_nav input {
    width: 100%;
    margin-top: 0.2rem;
    margin-bottom: 1rem;
}

#sidebar_nav select:last-of-type, #sidebar_nav input:last-of-type {
    margin-bottom: 0.2rem;
}

.glider_list {
    max-height: 120px;
    overflow: auto;
    padding-right: 15px;
}

#sidebar_nav select option.disabled {
    /*font-family: GalaxiePolaris-Medium, sans-serif;*/
    color: #000;
}

#map_legend {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 0.84rem;
    z-index: 15;
    vertical-align: top;
}

#map_legend a {
    color: #8f0000;
    text-decoration: none;
}

.no-js #map_legend a:hover,
.no-touch #map_legend a:hover {
    color: #ec0000;
}

#map_legend #closed_legend {
    display: none;
    width: 5rem;
    background-color: rgba(255, 255, 255, 0.7);
}

#map_legend ul {
    padding: 5px 0;
    background-color: rgba(255, 255, 255, 0.7);
    padding-top: 0;
}

#map_legend li {
    vertical-align: top;
    box-sizing: border-box;
    padding: 0 5px;
    display: block;
    width: 100%;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid #cececa;
}

#map_legend li.legendEntry {
    display: none;
}

#map_legend li:last-of-type {
    margin-bottom: 0;
    border-bottom: 0;
}

#map #map_legend li img {
    vertical-align: top;
    max-height: 1.35rem;
    max-width: 100%;
    margin-right: 0.3rem;
    margin-left: 0.25rem;
}

#map_legend li span {
    display: inline-block;
    cursor: help;
}

#storeSearch .tt-dropdown-menu,
#regionSearchForm .tt-dropdown-menu {
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.9);
}

#storeSearch .tt-suggestion.tt-cursor,
#regionSearchForm .tt-suggestion.tt-cursor {
    background-color: rgba(200, 200, 200, 0.9);
}

#storeSearch input,
#regionSearchForm input {
    width: 200px;
    box-sizing: border-box;
    font-size: 0.84rem !important;
}

#storeSearch .tt-suggestion,
#regionSearchForm .tt-suggestion {
    font-size: 0.85rem !important;
    border-bottom: 1px solid #585147;
}

#storeSearch .tt-suggestion:last-of-type,
#regionSearchForm .tt-suggestion:last-of-type {
    border-bottom: none;
}

.try-and-buy__introduction {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5000;

    background-color: rgba(255, 255, 255, 0.5);

    opacity: 0;
    pointer-events: none;

    transition: opacity 400ms;
}

.try-and-buy__introduction--active {
    opacity: 1;
    pointer-events: auto;
}

.try-and-buy__introduction .introduction__body {
    width: 300px;
    max-width: 90vw;

    position: relative;

    padding: 30px 30px 30px 30px;

    background-color: #fff;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, .16);
    border-radius: 5px;
}

.try-and-buy__introduction .introduction__close {
    position: absolute;
    top: 0;
    right: 0;

    padding: 12px 15px 5px 5px;
    font-family: "GalaxiePolaris-Medium", sans-serif;
    cursor: pointer;
}

.try-and-buy__introduction .introduction__body-title {
    color: #4a4a49;
    font-family: "GalaxiePolaris-Medium", sans-serif;
    font-size: 1.5rem;
    line-height: normal;
    padding-bottom: 1rem;
}

.try-and-buy__introduction .introduction__body-text {

}

span.reverse_mail {
    direction: rtl;
    unicode-bidi: bidi-override;
}

@media only screen and (max-width: 999px) {
    #showSidebarNav, #map #map_legend #closed_legend {
        display: block;
    }

    #sidebar_nav, #map #opened_legend {
        display: none;
    }

    body footer {
        display: none;
    }

    .leaflet-control {
        top: 2rem;
    }
}

/*Hide mapquest logo and facebook box*/
.mq-logo-control,
#so-me-box {
    display: none;
}
