﻿.modal-backdrop.book-modal-backdrop {
    align-content: flex-start;
    align-items: flex-start;
}

@media (min-width: 1024px) {
    .modal-backdrop.book-modal-backdrop {
        align-content: center;
        align-items: center;
    }
}

.modal.book-modal {
    width: 90vw;
    height: 80vh;
    max-height: 520px; /* otherwise the modal might grow insanely large, if the parent iframe is really high */
    margin-top: min(10vh, var(--max-modal-topmargin-mobile));
}

@media (min-width: 1024px) {
    .modal.book-modal {
        height: 450px;
    }
}

.modal.book-modal .modal-header.with-facility-properties {
    flex-flow: row wrap;
}

.modal.book-modal .modal-header.with-facility-properties > span {
    max-width: calc(100% - 30px);
}

@media (min-width: 1024px) {
    .modal.book-modal .modal-header.with-facility-properties > span {
        max-width: auto;
    }
}

.modal.book-modal .bookfacility-properties {
    width: 100%;
}

.modal.book-modal .bookfacility-properties ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: inline;
    /*display: flex;
    flex-flow: row wrap;*/
    width: 100%;
}

.modal.book-modal .bookfacility-properties li {
    font-size: 13px;
    display: inline;
    padding-left: 8px;
    padding-right: 8px;
    border-right: 1px solid #000000;
}

.modal.book-modal .bookfacility-properties li:first-child {
    padding-left: 0;
}

.modal.book-modal .bookfacility-properties li:last-child {
    border-right: 0;
    padding-right: 0;
}

/*.modal.book-modal .bookfacility-properties li::after {
    content: ", ";
}

.modal.book-modal .bookfacility-properties li:last-of-type::after {
    content: "";
}*/

.form-row.bookingtime-row {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-content: flex-end;
    align-items: flex-end;
    width: 100%;
    padding-top: 20px;
    /*padding-top: 32px;*/
}

@media (min-width: 1024px) {
    .form-row.bookingtime-row {
        flex-flow: row nowrap;
        justify-content: space-between;
        /*padding-top: 32px;*/
    }
}

.form-row.bookingdate-row {
    min-height: 40px;
}

@media (min-width: 1024px) {
    .form-row.bookingdate-row.multi-bookingdate,
    .form-row.bookingdate-row.has-rentalcosts {
        justify-content: space-between;
    }
}

.form-row .rentalcosts {
    font-weight: bold;
    width: 100%;
}

@media (min-width: 1024px) {
    .form-row .rentalcosts {
        width: auto;
    }
}

.form-row.bookingdate-row.multi-bookingdate label:not(.bookingdate-end):not(.bookingdate-mobile),
.form-row.bookingdate-row.multi-bookingdate .bookingdate-end {
    display: none;
}

@media (min-width: 1024px) {
    .form-row.bookingdate-row.multi-bookingdate label:not(.bookingdate-end):not(.bookingdate-mobile),
    .form-row.bookingdate-row.multi-bookingdate .bookingdate-end {
        display: block;
        width: calc((100% - 24px) / 2);
    }

    .form-row.bookingdate-row.multi-bookingdate .bookingdate-mobile {
        display: none;
    }
}

.bookingtime-row .bookingtime {
    height: 62px;
    width: 100%;
}

@media (min-width: 1024px) {
    .bookingtime-row .bookingtime {
        width: calc((100% - 24px) / 2);
    }
}

.bookingtime.booking-starttime {
    margin-bottom: 10px;
}

@media (min-width: 1024px) {
    .bookingtime.booking-starttime {
        margin-bottom: 0;
    }
}

.form-row.daypart-row {
    flex-flow: row wrap;
    margin-top: 20px;
}

.form-row.daypart-row .bookingtime-label {
    width: 100%;
}

.bookingtime-label {
    font-size: 12px;
    color: var(--font-dark);
}

.bookingtime select,
.form-row.daypart-row select {
    margin-top: 8px;
    height: 40px;
    width: 100%;
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius);
}

.form-row.daypart-row select {
    max-width: 250px;
}

/* Bookcontrol pages */
.book-page {
    display: none;
    width: 100%;
    height: 100%;
    padding-left: 10px;
    padding-right: 10px;
}

.book-page.active {
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    align-items: flex-start;
}

/* Book recurrence stuff */
.general-book-page::-webkit-scrollbar {
    width: 11px;
}

.book-page.general-book-page {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-background) var(--scrollbar-background);
}

.general-book-page::-webkit-scrollbar-track {
    background: var(--scrollbar-background);
}

.general-book-page::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-background);
    border-radius: 6px;
    border: 3px solid var(--scrollbar-background);
}

.modal-content .form-row.recurring-facility-row {
    min-height: 50px;
}

.recurring-facility-row .recurring-facility-label {
    width: 200px;
}

.recurring-facility-row select {
    margin-left: 5px;
    height: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color-light);
}

/* Book extras page */
.book-page .book-page-header {
    width: 100%;
    height: 30px;
    font-size: 20px;
}

.book-page.bookextras-page .book-extras {
    width: 100%;
    height: calc(100% - 30px);
    overflow-x: hidden;
    overflow-y: auto;
}

.book-extras::-webkit-scrollbar {
    width: 11px;
}

.book-extras {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-background) var(--scrollbar-background);
}

.book-extras::-webkit-scrollbar-track {
    background: var(--scrollbar-background);
}

.book-extras::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-background);
    border-radius: 6px;
    border: 3px solid var(--scrollbar-background);
}

.book-dategroup-header {
    width: 100%;
    height: 24px;
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: var(--dategroupindex);
}

.book-extragroup {
    width: 100%;
    margin-bottom: 10px;
}

.book-extragroup-header {
    height: 24px;
    position: sticky;
    top: 0;
    background-color: #ffffff;
    font-weight: bold;
}

.recurring-book-extras .book-extragroup-header {
    top: 24px;
}

.book-extra {
    height: 70px;
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-rows: 30px 1fr;
    grid-template-areas: "extraname extraname"
                        "amount deliveron";

    /*grid-template-columns: 80px 1fr 200px;
    grid-template-rows: 1fr;*/
    grid-column-gap: 10px;
    align-items: center;
}

.book-extra.description-visible {
    height: auto;
    grid-template-rows: 30px 1fr 40px;
    grid-template-areas: "extraname extraname"
                        "description description"
                        "amount deliveron";
}

@media (min-width: 1024px) {
    .book-extra {
        height: 50px;
        grid-template-columns: 80px 1fr 200px;
        grid-template-rows: 1fr;
        grid-template-areas: "amount extraname deliveron";
    }

    .book-extra.description-visible {
        height: auto;
        grid-template-columns: 80px 1fr 200px;
        grid-template-rows: 50px 1fr;
        grid-template-areas: "amount extraname deliveron"
                            "description description description";
    }
}

.book-extra input[type="text"] {
    grid-area: amount;
    height: 40px;
    width: 80px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color-light);
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    align-content: center;
    align-items: center;
}

.book-extra .extra-amount-display {
    grid-area: amount;
    height: 40px;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
}

.book-extra > div {
    grid-area: deliveron;
    display: flex;
    width: 100%;
    height: 100%;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
}

.book-extra .extra-deliveron-display {
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
    gap: 5px;
}

.book-extra .extra-deliveron-display svg {
    width: 20px;
    height: 20px;
}

.book-extra .extra-deliveron-display svg path {
    fill: var(--invalid-input);
}

.book-extra .extra-name {
    grid-area: extraname;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
    /*text-overflow: ellipsis;
    white-space: nowrap;*/
}

.book-extra .extra-name > div {
    max-width: calc(100% - 35px);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/*.book-extra .extra-name > svg {
    margin-left: 5px;
    width: 18px;
    height: 18px;
}*/
.book-extra .extra-name button {
    margin-left: 5px;
    width: 20px;
    height: 20px;
    background-color: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    position: relative;
}

.book-extra.description-visible .extra-name button::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #000000;
    transform: rotate(45deg);
}

.book-extra .extra-name button svg {
    width: 18px;
    height: 18px;
}

.book-extra .extra-description {
    grid-area: description;
    display: none;
    padding: 5px 10px 5px 0;
}

.book-extra .extra-description > div::before {
    content: "";
    width: 14px;
    height: 14px;
    border-bottom: 7px solid #cccccc;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    position: absolute;
    top: -14px;
    left: 10px;
}

@media (min-width: 1024px) {
    .book-extra .extra-description > div::before {
        left: 100px;
    }
}

.book-extra .extra-description > div {
    background-color: #f3f3f3;
    border: 1px solid #cccccc;
    padding: 5px 10px;
    position: relative;
}

.book-extra.description-visible .extra-description {
    display: block;
}

@media (min-width: 1024px) {
    .book-extra .extra-description {
        /*position: absolute;
        box-shadow: var(--boxshadow-chained);*/
    }
}

.book-extra select {
    margin-left: 5px;
    height: 40px;
    width: 70px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color-light);
}

/* bookextra beyond end warning */
.deliveronbeyond-warning {
    position: sticky;
    top: 0;
    margin-bottom: 10px;
    background-color: #ffffff;
    z-index: 10;
    padding: 0 10px 0 0;
}

.deliveronbeyond-warning > div {
    width: 100%;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--invalid-input);
    background-color: var(--warning-color);
}

/* Booking extrainfo fields */
.book-page .book-extrainfos {
    width: 100%;
    height: calc(100% - 30px);
    overflow-x: hidden;
    overflow-y: auto;
}

.book-extrainfos::-webkit-scrollbar {
    width: 11px;
}

.book-extrainfos {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-background) var(--scrollbar-background);
}

.book-extrainfos::-webkit-scrollbar-track {
    background: var(--scrollbar-background);
}

.book-extrainfos::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-background);
    border-radius: 6px;
    border: 3px solid var(--scrollbar-background);
}

.book-extrainfo {
    width: 100%;
    height: 75px;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    padding-right: 10px;
}

.book-extrainfo.has-grow-wrap {
    height: auto;
    min-height: 75px;
    padding: 5px 10px 5px 0;
}

@media (min-width: 1024px) {
    .book-extrainfo {
        height: 50px;
        flex-flow: row nowrap;
        justify-content: space-between;
    }

    .book-extrainfo.has-grow-wrap {
        height: auto;
        min-height: 50px;
        align-content: flex-start;
        align-items: flex-start;
    }
}

.book-extrainfo label {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

@media (min-width: 1024px) {
    .book-extrainfo label {
        width: 200px;
        margin-bottom: 0;
    }

    .book-extrainfo.has-grow-wrap label {
        margin-top: 16px;
    }
}

.book-extrainfo .extrainfo-control {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
}

@media (min-width: 1024px) {
    .book-extrainfo .extrainfo-control {
        width: calc(100% - 220px);
    }
}

.book-extrainfo select,
.book-extrainfo input,
.book-extrainfo textarea {
    /*width: calc(100% - 220px);*/
    width: 100%;
    /*height: 40px;*/
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius);
    padding-left: 10px;
    padding-right: 10px;
}

.book-extrainfo select,
.book-extrainfo input {
    height: 40px;
}

.book-extrainfo select.valid,
.book-extrainfo select.invalid,
.book-extrainfo input.valid,
.book-extrainfo input.invalid,
.book-extrainfo .grow-wrap.valid,
.book-extrainfo .grow-wrap.invalid {
    /*width: calc(100% - 245px);*/
    width: calc(100% - 25px);
}

.book-extrainfo select.valid,
.book-extrainfo input.valid,
.book-extrainfo textarea.valid {
    border-color: var(--valid-input);
}

.book-extrainfo select.invalid,
.book-extrainfo input.invalid,
.book-extrainfo textarea.invalid {
    border-color: var(--invalid-input);
}

.book-extrainfo .valid-icon,
.book-extrainfo .invalid-icon {
    width: 20px;
    height: 20px;
    margin-left: 5px;
}

.book-extrainfo .valid-icon path {
    fill: var(--valid-input);
}

.book-extrainfo .invalid-icon path {
    fill: var(--invalid-input);
}

.book-extrainfo select:not(.valid) ~ .valid-icon,
.book-extrainfo input:not(.valid) ~ .valid-icon,
.book-extrainfo .grow-wrap:not(.valid) ~ .valid-icon {
    display: none;
}

.book-extrainfo select:not(.invalid) ~ .invalid-icon,
.book-extrainfo input:not(.invalid) ~ .invalid-icon,
.book-extrainfo .grow-wrap:not(.invalid) ~ .invalid-icon {
    display: none;
}

/* costs overview */
.book-page.bookcostsoverview-page {
    gap: 10px;
}

@media (min-width: 768px) {
    .book-page.bookcostsoverview-page {
        gap: 5px;
    }
}

.bookcosts-line {
    width: 100%;
    display: grid;
    grid-template-columns: calc(100% - 120px) 100px;
    grid-template-rows: 1fr 1fr;
    gap: 0px 20px;
    /*display: flex;
    flex-flow: row nowrap;
    gap: 20px;
    justify-content: space-between;*/
}

@media (min-width: 768px) {
    .bookcosts-line {
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        gap: 20px;
    }
}

.bookcosts-line > div:first-child,
.bookcosts-line:not(.bookcosts-total) > div:nth-child(2) {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bookcosts-line > div:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

@media (min-width: 768px) {
    .bookcosts-line > div:first-child,
    .bookcosts-line > div:nth-child(2) {
        width: calc((100% - 140px) / 2);
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

.bookcosts-line > div:nth-child(2)::before {
    content: "(";
}
.bookcosts-line > div:nth-child(2)::after {
    content: ")";
}

@media (min-width: 768px) {
    .bookcosts-line > div:nth-child(2)::before,
    .bookcosts-line > div:nth-child(2)::after {
        display: none;
    }
}

.bookcosts-line > div:last-child {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    width: 100px;
    text-align: right;
}

.bookcosts-line.bookcosts-total {
    font-weight: bold;
    margin-top: 10px;
}

.bookcosts-line.bookcosts-total > div:first-child {
    width: calc(100% - 120px);
}

.bookcosts-line.bookcosts-total > div:nth-child(2) {
    border-top: 2px solid #000000;
}

.bookcosts-line.bookcosts-total > div:nth-child(2)::before,
.bookcosts-line.bookcosts-total > div:nth-child(2)::after {
    display: none;
}

@media (min-width: 1024px) {
    /*.modal.book-modal .modal-buttons button:not(.modal-cancel):not(.modal-save):disabled {
        display: none;
    }*/

    .modal.book-modal .modal-buttons button.modal-save:not(.modal-cancel):disabled {
        opacity: 0.5;
        display: flex;
    }
}

.bookingresult-message {
    width: 100%;
    height: 50px;
    display: flex;
    align-content: center;
    align-items: center;
    font-size: 16px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: var(--border-radius);
}

.bookingresult-message.result-success {
    border: 1px solid var(--info-border-color);
    background-color: var(--info-background);
}

.bookingresult-message.result-error {
    border: 1px solid var(--warning-color-dark);
    background-color: var(--warning-color);
}

/* facility longdescription in bookmodal */
.bookfacilitylongdescription-container {
    width: 100%;
    position: relative;
}

.bookfacilitylongdescription-container .longdescription-toggle {
    border: 0;
    padding: 0 0 1px 0;
    background-color: transparent;
    border-radius: 0;
    border-bottom: 1px solid var(--button-color);
    height: auto;
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
    color: var(--button-font-dark);
    font-weight: bold;
    cursor: pointer;
    gap: 5px;
}

.bookfacilitylongdescription-container .longdescription-toggle svg {
    width: 16px;
    height: 16px;
}

.bookfacilitylongdescription-container .longdescription-toggle svg path {
    fill: var(--button-font-dark);
}

.bookfacilitylongdescription-container .longdescription-toggle span {
    font-size: 15px;
    color: var(--button-font-dark);
}

.bookfacilitylongdescription-wrapper {
    position: absolute;
    top: 20px;
    max-width: 100%;
    width: 100%;
    max-height: 290px;
    height: 290px;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 8px;
}

.bookfacilitylongdescription-wrapper::before {
    content: "";
    position: absolute;
    left: 20px;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 14px solid var(--border-color-light);
    top: 0;
    z-index: 100;
}

.bookfacilitylongdescription {
    position: absolute;
    position: relative;
    height: 100%;
    max-width: 90%;
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--boxshadow-chained-dark);
    padding: 10px;
    border: 1px solid var(--border-color-light);
    overflow-y: auto;
    overflow-x: hidden;
}
