body:has(dialog[open]) {
    overflow: hidden;
}
body:has(dialog[open]) > main {
    scrollbar-gutter: stable;
    overflow: hidden;
}
/* 
 * Background of Searchform
 */
.searchform-small-wrapper {
    width: fit-content;
    margin: 0 auto;
    /* background-color: var(--beon-fp-search-bg-color); */
    padding: 7px 8px;
    border: var(--beon-fp-search-border);
    border-radius: var(--beon-fp-search-border-radius);
}

/* 
 * Generell Stylings of searchform
 */
#searchform.frontpage-searchform {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}
#searchform.frontpage-searchform .form-group {
    border: var(--beon-fp-search-info-border);
    border-radius: var(--beon-fp-search-border-radius);
    color: var(--beon-fp-search-info-text);
    background-color: var(--beon-fp-search-info-bg-color);
    cursor: pointer;
    height: 48px;/* FIX Frontpage */
    font: var(--beon-fp-search-font);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-width: 150px;
}
#searchform.frontpage-searchform .icon-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-right: 10px;
}
#searchform.frontpage-searchform .icon-wrapper img {
    height: 18px;
    max-width: 20px;
    filter: var(--beon-fp-search-info-icon-filter);
}

/*
 * Styling of Regionselect
 */
#searchform.frontpage-searchform .form-group.wrap-regions {
    border-radius: var(--beon-fp-search-region-border-radius);
    position: relative;
    padding: 0;
}
#searchform.frontpage-searchform .wrap-regions .icon-wrapper {
    position: absolute;
    left: 20px;
}
#searchform.frontpage-searchform .wrap-regions .select2-selection__rendered {
    line-height: normal;
    color: var(--beon-fp-search-info-text);
    padding-left: 50px;/* FIX Frontpage */
    padding-right: 20px;/* FIX Frontpage */
}

/*
 * Styling of Dateinput
 */
#searchform.frontpage-searchform .form-group.wrap-range {
    border-radius: var(--beon-fp-search-calendar-border-radius);
    min-width: 280px;
}
#searchform.frontpage-searchform .dateInput {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 20px; /* FIX Frontpage */
    height: 48px;
    background-color: transparent;
    color: var(--beon-fp-search-info-text);
    font: var(--beon-fp-search-font);
}

/*
 * Styling of Guestinput
 */
#searchform.frontpage-searchform .form-group.wrap-guests {
    border-radius: var(--beon-fp-search-guests-border-radius);
    min-width: 200px;
}
#searchform.frontpage-searchform .wrap-guests .icon-wrapper {
    padding-left: 20px;/* FIX Frontpage */
}
#searchform.frontpage-searchform #guests {
	width: 100%;
	display: flex;
	align-items: center;
    padding: 10px 20px 10px 50px;
    margin-left: -50px;/* FIX Frontpage */
    height: 48px;
    z-index: 1;
    background-color: transparent;
    color: var(--beon-fp-search-info-text);
    font: var(--beon-fp-search-font);
    justify-content: center;
}

/*
 * Styling of Search-Button
 */
#searchform.frontpage-searchform .button_btn {
    border: var(--beon-fp-search-button-border);
    color: var(--beon-fp-search-button-text);
    background-color: var(--beon-fp-search-button-bg-color);
    cursor: pointer;
    padding: 10px 20px 10px 35px;
    font: var(--beon-fp-search-font);
    height: 48px;
    border-radius: var(--beon-fp-search-button-border-radius);
    min-width: 200px;
}
#searchform.frontpage-searchform .button_btn:hover {
    color: var(--beon-fp-search-button-text-hover);
    background-color: var(--beon-fp-search-button-bg-color-hover);
}
#searchform.frontpage-searchform .button_btn img {
    height: 12px;
    max-width: 10px;
    left: 0px;
    margin-left: 15px;
    position: relative;
    transition: left ease-out 0.3s;
    filter: var(--beon-fp-search-button-icon-filter);
}
#searchform.frontpage-searchform .button_btn:hover img {
    left: 5px;
}
/*
 * Styling of Popups
 */
/* Popup-Buttons */
#searchform.frontpage-searchform .toggleGuests #calcGuests, #searchform.frontpage-searchform #nights-wrapper #calender_select {
    border: var(--beon-fp-search-button-border);
    border-radius: var(--beon-fp-search-border-radius);
    color: var(--beon-fp-search-button-text);
    background-color: var(--beon-fp-search-button-bg-color);
    cursor: pointer;
    padding: 10px 20px;
    font: var(--beon-fp-search-font);
    height: 48px;
}
#searchform.frontpage-searchform .toggleGuests #calcGuests {
	width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#searchform.frontpage-searchform .toggleGuests #calcGuests:hover, #searchform.frontpage-searchform #nights-wrapper #calender_select:hover {
    color: var(--beon-fp-search-button-text-hover);
    background-color: var(--beon-fp-search-button-bg-color-hover);
}
#searchform.frontpage-searchform .toggleGuests #calcGuests img, #searchform.frontpage-searchform #nights-wrapper #calender_select img {
    height: 12px;
    max-width: 10px;
    left: 0px;
    margin-left: 5px;
    position: relative;
    transition: left ease-out 0.3s;
    filter: var(--beon-fp-search-button-icon-filter);
}
#searchform.frontpage-searchform .toggleGuests #calcGuests:hover img, #searchform.frontpage-searchform #nights-wrapper #calender_select:hover img {
    left: 5px;
}
/* Popup-Overlay */
.beon-fp-popup::backdrop {
    background-color: var(--beon-popup-overlay-bg-color);
    backdrop-filter: var(--beon-popup-overlay-backdrop-filter);
}
/* Popup */
.beon-fp-popup {
    background-color: transparent;
    border: none;
    padding: 16px;
}
.beon-fp-popup-main {
    border: var(--beon-popup-border);
    border-radius: var(--beon-popup-border-radius);
    background-color: var(--beon-popup-bg-color);
    padding: 30px;
}
.beon-fp-popup #calendar-popup-close, .beon-fp-popup #guest-popup-close {
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 16px;
    right: calc(-1 * (100% - 16px));
    width: 32px;
    height: 32px;
    padding: 5px;
    cursor: pointer;
    border: var(--beon-popup-close-border);
    border-radius: var(--beon-popup-close-border-radius);
    box-shadow: var(--beon-popup-close-shadow);
    background-color: var(--beon-popup-close-bg-color);
}
.beon-fp-popup #calendar-popup-close img, .beon-fp-popup #guest-popup-close img {
    filter: var(--beon-popup-close-icon-filter);
}
.beon-fp-popup-headline {
    display: flex;
    align-items: center;
    font: var(--beon-popup-headline-font);
    gap: 5px;
    padding-bottom: 15px;
}
.beon-fp-popup-headline img {
    height: 23px;
    filter: var(--beon-popup-headline-icon-filter);
}
hr.beon-fp-hr {
    color: var(--beon-popup-hr);
    background-color: var(--beon-popup-hr);
    height: 1px;
    border: none;
    margin: 0;
}
.beon-fp-adults, .beon-fp-children, .beon-fp-babys, .beon-fp-pets {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 9px;
    padding-bottom: 9px;
    gap: 9px;
}
.beon-fp-label {
    width: 170px;
    font-weight: 300;
    font-size: var(--beon-font-size-regular);
}
/* Popup Guests */
#searchform.frontpage-searchform .toggleGuests {
    cursor: default;
}
#searchform.frontpage-searchform .toggleGuests label {
	margin: 0;
    display: flex;
    width: 25px;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    font-size: var(--beon-font-size-regular);
}
#searchform.frontpage-searchform .toggleGuests button.inc, #searchform.frontpage-searchform .toggleGuests button.dec {
    background-color: var(--beon-guest-icon-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--beon-guest-icon-border-radius);
    height: 30px;
    width: 30px;
    padding: 0;
    /* border:1px solid var(--beon-border-color); */
}
#searchform.frontpage-searchform .toggleGuests button.inc.disabled, #searchform.frontpage-searchform .toggleGuests button.dec.disabled {
    background-color: var(--beon-guest-icon-bg-color-disabled);
    cursor: not-allowed;
    border:1px solid var(--beon-border-color);
}
#searchform.frontpage-searchform .toggleGuests button.inc img, #searchform.frontpage-searchform .toggleGuests button.dec img{
    filter: var(--beon-guest-icon-filter);
    width: 13px;
    height: 13px;
}
#searchform.frontpage-searchform .toggleGuests button.inc.disabled img, #searchform.frontpage-searchform .toggleGuests button.dec.disabled img{
    filter: var(--beon-guest-icon-filter-disabled);
}
/* Optional display version for pets - if pets_search_switch is true */
#searchform.frontpage-searchform .beon-fp-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 25px;
}
#searchform.frontpage-searchform .beon-fp-switch input {
    opacity: 0;
    height: 0;
    width: 0;
}
#searchform.frontpage-searchform .beon-fp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--beon-guest-switch-background-color);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: var(--beon-guest-switch-background-border-radius);
    border:1px solid var(--beon-border-color);
}
#searchform.frontpage-searchform .beon-fp-slider:before {
    position: absolute;
    content: "";
    height: 23px;
    width: 23px;
    left: 0px;
    bottom: 0px;
    background-color: var(--beon-guest-switch-color);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: var(--beon-guest-switch-border-radius);
}
#searchform.frontpage-searchform input:checked + .beon-fp-slider {
    background-color: var(--beon-guest-switch-background-color-active);
}
#searchform.frontpage-searchform input:checked + .beon-fp-slider:before {
    background-color: var(--beon-guest-switch-color-active);
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}
/* Popup Calendar & Nights Select */
#searchform.frontpage-searchform #calender-wrapper {
    cursor: default;
}
#searchform.frontpage-searchform #nights-wrapper {
	justify-content: space-between;
	display: none;/*will be displayed as flex, as soon as dates are selected*/
    align-items: end;
    gap: 50px;
    width:100%;
}
#searchform.frontpage-searchform #nights-wrapper #calender_select, #searchform.frontpage-searchform #nights-wrapper #calcNights {
    width: 50%;
}
#searchform.frontpage-searchform #calcNights {
	display: flex;
	justify-content: space-between;
	align-items: center;
    gap: 10px;
    /* width: -webkit-fill-available; */
}
#searchform.frontpage-searchform .nights_min-wrapper .select2-selection::before {
	content: "Min.";
    align-self: flex-start;
	padding-right: 5px;
	font: var(--beon-cal-nights-mini-text-font);
    color: var(--beon-cal-nights-mini-text-color);
}
#searchform.frontpage-searchform .nights_max-wrapper .select2-selection::before {
	content: "Max.";
    align-self: flex-start;
	padding-right: 5px;
	font: var(--beon-cal-nights-mini-text-font);
    color: var(--beon-cal-nights-mini-text-color);
}
#calender-wrapper .select2-dropdown {
    bottom: 50px;
}
#searchform.frontpage-searchform .nightselect-wrapper .select2-container .select2-selection--single {
    flex-direction: column;
}
#searchform.frontpage-searchform .nightselect-wrapper .select2-container .select2-selection--single .select2-selection__rendered {
    color: var(--beon-cal-nights-text-color);
    font: var(--beon-cal-nights-text-font);
}
#searchform.frontpage-searchform .nightselect-wrapper .select2 {
    border: var(--beon-cal-nights-border);
    border-radius: var(--beon-cal-nights-border-radius);
    padding: 5px 15px;
    padding-right: 25px;
	user-select: none;
    min-width: 120px;
}
#searchform.frontpage-searchform .nightselect-wrapper .select2-selection__rendered {
    padding-top: 5px;
    padding-left: 0px;
}
#searchform.frontpage-searchform .nightselect-wrapper .select2-selection__rendered::after {
    content: "";
    background: url(/wp-content/themes/bernstein-resorts/assets/images/arrow_down.svg);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    width: 10px;
    height: 15px;
    top: 50%;
    transform: translate(0, -50%);
    right: 15px;
    /* TODO Filter! */
}
.select2-container--default .select2-results>.select2-results__options {
    border-radius: 5px;
	background-color: var(--beon-popup-bg-color);
	border: 1px solid var(--beon-border-color);
	min-width: 120px;
	max-height: 200px;
	overflow-y: auto;
    scrollbar-color: var(--beon-border-color) var(--beon-popup-bg-color);
    scrollbar-width: thin;
}
.select2-results__option {
	border-bottom: 1px solid var(--beon-border-color);
	padding: 7px;
    padding-left: 12px;
    text-align: left;
    color: var(--beon-fp-search-info-text);
    font: var(--beon-fp-search-font);
}
#calender-wrapper .select2-results__option {
    color: var(--beon-cal-nights-text-color);
    font: var(--beon-cal-nights-text-font);
}
.select2-results__option:hover, .select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: var(--beon-fp-search-info-text);
    background-color: var(--beon-primary-color);
}
#calender-wrapper .select2-results__option:hover, #calender-wrapper .select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: var(--beon-cal-nights-hover-text-color);
    background-color: var(--beon-cal-nights-hover-bg-color);
}
/*Select2 ( for the regions) */
#searchform.frontpage-searchform .wrap-regions .select2-container {
	height: 100%;
    width: 100% !important;
    max-width: 300px;/* FIX Frontpage */
}
#searchform.searchpage-searchform .select2-container .select2-dropdown {
    border: var(--beon-fp-search-info-border);
    border-radius: var(--beon-fp-search-border-radius) !important;
    overflow: hidden;
}
#searchform.frontpage-searchform .select2-container--default .select2-selection--single {
	border: none;
	background: transparent;
}
#searchform.frontpage-searchform .select2-container .select2-selection--single {
	height: 100%;
	display: flex;
	align-items: center;
    /* width: 100%; */
    border-radius: var(--beon-fp-search-border-radius);
}
#searchform.frontpage-searchform span.select2-selection__arrow {
	opacity: 0;
}

@media only screen and (max-width: 1200px) {
    /* 
    * Background of Searchform
    */
    .searchform-small-wrapper {
        background-color: var(--beon-fp-search-bg-color-m);
        padding: 7px 8px;
        /* padding: 0px; */
        border: var(--beon-fp-search-border-m);
        border-radius: var(--beon-fp-search-border-radius-m);
    }
    /* 
    * Generell Stylings of searchform
    */
    #searchform.frontpage-searchform {
        flex-wrap: wrap;
        /* max-width: 300px; */
        gap: 10px;
        justify-content: space-between;
    }
    #searchform.frontpage-searchform .form-group:not(.wrap-guests) {
        width: 100%;
    }
    /*
    * Styling of Regionselect
    */
    #searchform.frontpage-searchform .form-group.wrap-regions {
        border-radius: var(--beon-fp-search-region-border-radius-m);
    }
    /*
    * Styling of Dateinput
    */
    #searchform.frontpage-searchform .form-group.wrap-range {
        border-radius: var(--beon-fp-search-calendar-border-radius-m);
    }
    #searchform.frontpage-searchform .dateInput {
        justify-content: left;
    }
    /*
    * Styling of Guestinput
    */
    #searchform.frontpage-searchform .form-group.wrap-guests {
        border-radius: var(--beon-fp-search-guests-border-radius-m);
        width: calc(50% - 5px);
        min-width: unset;
    }
    /*
    * Styling of Search-Button
    */
    #searchform.frontpage-searchform .button_btn {
        border-radius: var(--beon-fp-search-button-border-radius-m);
        width: calc(50% - 5px);
        min-width: unset;
    }
    /*
    * Styling of Popups
    */
    .beon-fp-popup {
        max-width: 90vw;
        /* padding: 20px; */
    }
    .beon-fp-popup-main {
        padding: 20px;
    }
    .beon-fp-popup #calendar-popup-close, .beon-fp-popup #guest-popup-close {
        /* top: -32px; */
        /* right: calc(-1*(100% + 0px)); */
    }
    #searchform.frontpage-searchform #nights-wrapper #calender_select, #searchform.frontpage-searchform #nights-wrapper #calcNights {
        width: 100%;
    }
    /* Popup Guests */
    .toggleGuests {
        min-width: 50vw;
    }
    /* Popup Calendar */
    #searchform.frontpage-searchform #nights-wrapper {
        gap: 15px;
        width: 100%;
	}
    .beon-fp-label{
        width: 70%;
    }
}
@media only screen and (max-width:991px){
    .beon-fp-label{
        width: 60%;
    }
}
@media only screen and (max-width:800px){
    #searchform.frontpage-searchform #nights-wrapper #calender_select, #searchform.frontpage-searchform #nights-wrapper #calcNights{
        width:100%;
    }
    #searchform.frontpage-searchform #nights-wrapper{
        flex-wrap: wrap;
        width: min-content;
    }
}

@media only screen and (max-width: 750px) {
    /* Popup Guests */
    .toggleGuests {
        min-width: 80vw;
    }
    #searchform.frontpage-searchform .form-group.wrap-range{
        min-width: 100%;
    }
}

@media only screen and (max-width:425px){
    .beon-fp-label{
        width: 120px;
    }
}