﻿.result-mapview {
    grid-area: main;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.result-mapview .map-wrapper {
    /*margin-left: 24px;
    margin-right: 24px;*/
    width: 100%;
    height: 100%;
}

@media (min-width: 1024px) {
    .result-mapview .map-wrapper {
        margin-left: 24px;
        margin-right: 24px;
        height: calc(100% - 40px);
        margin-top: 40px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

.map-wrapper > svg {
    width: 100%;
    height: 100%;
}

.map-wrapper svg .has-background-circle {
    stroke: #000000;
    stroke-width: 20;
}

.map-wrapper svg .has-background-circle:not(.available):not(.unavailable) .icon-background-circle {
    fill: #ffffff;
}

.map-wrapper svg .available,
.map-wrapper svg .available [data-isnodegroup] circle {
    fill: var(--available-background)!important; /* important seems to be necessary, otherwise we'd have to demand that all "object elements" are inline and not implemented as, for example, an svg embedded in the svg */
    cursor: pointer;
}

.map-wrapper svg .available.editbooking-node {
    fill: var(--editbooking-background)!important;
}

.map-wrapper svg .has-background-circle.available,
.map-wrapper svg .has-background-circle.available.editbooking-node {
    fill: #000000 !important;
}

.map-wrapper svg .has-background-circle.available .icon-background-circle {
    fill: var(--available-background) !important;
}

.map-wrapper svg .has-background-circle.available.editbooking-node .icon-background-circle {
    fill: var(--editbooking-background)!important;
}

.map-wrapper svg .has-transparent-background-circle .icon-background-circle-transparent {
    fill: transparent!important;
    stroke: #000000;
    stroke-width: 40;
}

.map-wrapper svg .has-transparent-background-circle.available .icon-background-circle-transparent {
    stroke: var(--available-background) !important;
}

.map-wrapper svg .unavailable {
    fill: var(--unavailable-background) !important; /* important seems to be necessary, otherwise we'd have to demand that all "object elements" are inline and not implemented as, for example, an svg embedded in the svg */
    cursor: pointer;
}

.map-wrapper svg .has-transparent-background-circle.unavailable {
    fill: transparent!important;
    cursor: pointer;
}

.map-wrapper svg .has-background-circle.unavailable {
    fill: #000000 !important;
}

.map-wrapper svg .has-background-circle.unavailable .icon-background-circle {
    fill: var(--unavailable-background) !important;
}

.map-wrapper svg .has-transparent-background-circle.unavailable .icon-background-circle-transparent {
    stroke: var(--unavailable-background) !important;
}

.map-wrapper svg .available.contactfound,
.map-wrapper svg .unavailable.contactfound {
    fill: var(--contact-found-color) !important; /* important seems to be necessary, otherwise we'd have to demand that all "object elements" are inline and not implemented as, for example, an svg embedded in the svg */
}

.map-wrapper svg .has-background-circle.available.contactfound,
.map-wrapper svg .has-background-circle.unavailable.contactfound {
    fill: #000000 !important;
}

.map-wrapper svg .has-background-circle.available.contactfound .icon-background-circle,
.map-wrapper svg .has-background-circle.unavailable.contactfound .icon-background-circle {
    fill: var(--contact-found-color) !important;
}

.map-wrapper svg .has-background-circle.not-bookable .icon-background-circle {
    fill: #cccccc !important;
}

.map-wrapper svg .available ~ text,
.map-wrapper svg .unavailable ~ text {
    cursor: pointer;
}

.map-wrapper [data-isoverview="true"]::after {
    content: attr(data-available-spots);
    display: block;
    color: #ffffff;
}

.map-wrapper svg [data-objectid].hide-node {
    display: none;
}

/* hide the title nodes of the object-elems */
.map-wrapper svg .unavailable title {
    display: none;
}

/* Map selector */
.map-selector {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    /*background-color: #ffffff;*/
}

@media (min-width: 1024px) {
    .map-selector {
        right: auto;
    }
}

.map-selector-toggle {
    border: 0;
    padding: 0 16px;
    cursor: pointer;
    min-width: 280px;
    height: 40px;
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--boxshadow-chained);
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--button-font-dark);
}

.map-selector-toggle svg {
    width: 12px;
    height: 12px;
    transform: rotate(90deg);
}

.map-selector-toggle svg path {
    fill: var(--button-font-dark);
}

.map-selector-box {
    position: absolute;
    bottom: calc(100% + 8px);
    width: 100%;
    max-height: 10em;
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--boxshadow-chained);
    display: flex;
}

.map-selector-list:not(.noflex) {
    flex: 1;
}

.map-selector-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: y mandatory;
    border-radius: var(--border-radius);
}

.map-selector-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.map-selector-list li.selected {
    background-color: var(--button-color);
    color: var(--font-light);
}

.map-selector-list li {
    height: 30px;
    padding: .4em 10px;
    font-size: 1em;
    color: var(--font-dark);
    scroll-snap-align: center;
    display: flex;
    justify-content: flex-start;
    align-content: center;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.map-selector-list li.use-nesting:not([data-nestinglevel="0"])::before {
    content: "";
    height: 8px;
    width: calc(var(--nesting-level) * 15px);
    border-left: 1px solid var(--border-color-dark);
    border-bottom: 1px solid var(--border-color-dark);
    margin-left: 5px;
    margin-right: 3px;
}

.map-selector-list li.selected.use-nesting:not([data-nestinglevel="0"])::before {
    border-color: var(--font-light);
}

.map-selector-list li > span {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* tooltip */
.resultmap-tooltip {
    width: 300px;
    position: absolute;
    background-color: #000000;
    color: #ffffff;
    /*left: calc(var(--xpos) + 20px - 290px);*/
    /*left: calc(var(--xpos) - 290px);
    top: calc(var(--ypos) + 0px - 140px);*/
    left: calc(var(--xpos));
    /*top: calc(var(--ypos) + 0px - 170px);*/
    /*top: calc(var(--ypos) + 0px - 180px);*/
    top: calc(var(--ypos) + 0px - (var(--yadjustmobile) * 1px));
    z-index: 100;
    display: flex;
    flex-flow: row wrap;
    border-radius: var(--border-radius);
    /*box-shadow: var(--boxshadow-chained);*/
    /*box-shadow: 3px 5px 5px 3px rgba(0,0,0,0.2);*/
    box-shadow: 0 4px 8px 0 rgba(39, 50, 68, 0.5), 0 0 2px 0 rgba(39, 50, 68, 0.6);
}

.resultmap-tooltip.arrow-top {
    /*top: calc(var(--ypos) + 0px - 170px);*/
    /*top: calc(var(--ypos) + 0px - (var(--yadjustmobile) * 1px) - 10px);*/
    top: calc(var(--ypos) + 0px - (var(--yadjustmobile) * 1px) + (var(--targetheight) * 1px));
}

.resultmap-tooltip.arrow-bottom {
    top: calc(var(--ypos) + 0px - (var(--yadjustmobile) * 1px) - (var(--targetheight) * 1px));
}

@media (min-width: 1024px) {
    .resultmap-tooltip {
        /*left: calc(var(--xpos) - 290px);*/
        left: calc(var(--xpos) - 280px);
        /*top: calc(var(--ypos) + 0px - 140px);*/
        top: calc(var(--ypos) + 0px - (var(--yadjust) * 1px));
    }
}

.resultmap-tooltip.upper-left,
.resultmap-tooptip.arrow-top {
    border-top-left-radius: 0;
}

.resultmap-tooltip.bottom-left,
.resultmap-tooltip.arrow-bottom {
    border-bottom-left-radius: 0;
}

.resultmap-tooltip.upper-right,
.resultmap-tooltip.arrow-top {
    border-top-right-radius: 0;
}

.resultmap-tooltip.bottom-right,
.resultmap-tooltip.arrow-bottom {
    border-bottom-right-radius: 0;
}

.resultmap-tooltip::before {
    content: "";
    position: absolute;
}

.resultmap-tooltip.arrow-left::before {
    border-right: 14px solid #000000;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    left: -14px;
}

.resultmap-tooltip.arrow-right::before {
    border-left: 14px solid #000000;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    left: 100%;
}

.resultmap-tooltip.arrow-top::before {
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 14px solid #000000;
    top: -13px;
    left: calc(var(--arrowxpos) * 1px);
}

.resultmap-tooltip.arrow-bottom::before {
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 14px solid #000000;
    top: 100%;
    left: calc(var(--arrowxpos) * 1px);
}

.resultmap-tooltip.upper-left:not(.arrow-top):not(.arrow-bottom)::before {
    top: 0;
}

.resultmap-tooltip.bottom-left:not(.arrow-top):not(.arrow-bottom)::before {
    bottom: 0;
}

.resultmap-tooltip.upper-right:not(.arrow-top):not(.arrow-bottom)::before {
    top: 0;
}

.resultmap-tooltip.bottom-right:not(.arrow-top):not(.arrow-bottom)::before {
    bottom: 0;
}

.resultmap-tooltip-title {
    width: 100%;
    padding: 5px 10px;
    font-weight: bold;
}

.resultmap-tooltip-content {
    width: 100%;
    padding: 5px 10px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, 20px);
    /*grid-row-gap: 5px;*/
}

.resultmap-tooltip-footer {
    width: 100%;
    height: 40px;
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
}

.resultmap-tooltip-footer button {
    width: auto;
    height: 30px;
    padding-left: 10px;
    padding-right: 10px;
    margin: 0;
    cursor:pointer;
    border: 0;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
    border-radius: var(--border-radius);
}

/* mini tooltip */
.resultmap-tooltip.resultmap-minitooltip {
    min-height: 30px;
    /*width: auto;
    max-width: 300px;*/
    padding: 0 10px 0 5px;
    display: flex;
    flex-flow: row wrap;
    align-content: center;
    align-items: center;
}

.resultmap-tooltip.resultmap-minitooltip.arrow-left {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.resultmap-tooltip.resultmap-minitooltip.arrow-right {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}