html {
    scrollbar-gutter: stable;
}

html.media-dialog-open {
    overflow: hidden !important;
}

.pswp .pswp__scroll-wrap {
    margin: 0;
    padding: 0;
}

.media-booking-hidden {
    display: none;
}

#bookingrequestform,
#bookingrequestform :is(form, [role="alert"], .form-response) {
    scroll-margin-top: calc(var(--site-header-height, 50px) + 16px);
}

.inquiry-dialog {
    container: inquiry / inline-size;
    box-sizing: border-box;
    width: min(720px, calc(100% - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 24px;
    border: 0;
    border-radius: 4px;
    overflow: auto;
    overflow-wrap: anywhere;
    color: #000;
    background: #fff;
}

.inquiry-dialog::backdrop {
    background: rgb(0 0 0 / 80%);
}

.inquiry-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1003;
    background: rgb(0 0 0 / 80%);
}

.inquiry-dialog--editor {
    --cmg-editor-highlight-layer: 1005;
    position: fixed;
    inset: 12px;
    height: fit-content;
    z-index: 1004;
}

.inquiry-dialog h2 {
    padding-right: 24px;
    font-size: 18px;
}

.inquiry-dialog .media-close {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #333;
    font-size: 30px;
    cursor: pointer;
}

@media (pointer: coarse) {
    .inquiry-dialog .media-close { width: 44px; height: 44px; }
}

.inquiry-dialog #bookingrequestform,
.inquiry-dialog form,
.inquiry-dialog form > div {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.inquiry-dialog input:not([type="checkbox"]):not([type="radio"]),
.inquiry-dialog select,
.inquiry-dialog textarea {
    box-sizing: border-box;
    max-width: 100%;
}

.inquiry-dialog .cmg_Form label:has(> span) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px 12px;
    min-width: 0;
    margin: 0 0 14px;
}

.inquiry-dialog .cmg_Form label > span {
    float: none;
    width: auto;
    padding: 5px 0;
    font-size: 13px;
    text-align: left;
}

.inquiry-dialog .cmg_Form label > .cmg_FormError {
    text-align: left;
}

.inquiry-dialog .cmg_Form label > .form-validation-message {
    grid-column: 1 / -1;
    margin: 0;
}

.inquiry-dialog .cmg_Form label > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    font-size: 16px;
}

.inquiry-dialog .cmg_Form label > textarea {
    resize: vertical;
}

.inquiry-dialog .cmg_Form :is(.cmg_Form_CheckBoxes, .cmg_Form_RadioButtons) {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px 12px;
}

.inquiry-dialog .cmg_Form :is(.cmg_Form_CheckBoxes, .cmg_Form_RadioButtons) > * {
    grid-column: 1;
}

.inquiry-dialog .cmg_Form :is(.cmg_Form_CheckBoxes, .cmg_Form_RadioButtons) > .field-label {
    width: auto;
    padding: 0;
    text-align: left;
}

@container inquiry (min-width: 560px) {
    .inquiry-dialog .cmg_Form label:has(> span),
    .inquiry-dialog .cmg_Form :is(.cmg_Form_CheckBoxes, .cmg_Form_RadioButtons) {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .inquiry-dialog .cmg_Form label > span,
    .inquiry-dialog .cmg_Form :is(.cmg_Form_CheckBoxes, .cmg_Form_RadioButtons) > .field-label {
        grid-column: 1;
        text-align: right;
    }

    .inquiry-dialog .cmg_Form label > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea, p, .cmg_FormError, .form-validation-message),
    .inquiry-dialog .cmg_Form :is(.cmg_Form_CheckBoxes, .cmg_Form_RadioButtons) > label {
        grid-column: 2;
        font-size: 14px;
    }

    .inquiry-dialog .cmg_Form label > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        grid-row: 1;
    }
}

.inquiry-dialog a {
    color: #166bff;
}

.carousel:has(.media-carousel) {
    background: none;
}

.media-carousel {
    position: relative;
    min-width: 0;
    height: 100%;
}

.media-track {
    display: flex;
    gap: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.media-track > * {
    position: relative;
    box-sizing: border-box;
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.carousel .media-track a {
    display: block;
    height: 100%;
}

.carousel .media-track img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center top;
}

.media-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    padding: 8px 45px;
    color: white;
    background: linear-gradient(transparent, rgb(0 0 0 / 40%));
    text-align: center;
}

.media-controls {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.media-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 30%);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
}

.media-carousel .gallery-shadow {
    pointer-events: none;
}

.property-guestreviews .media-reviews {
    width: calc(94% - 100px);
    margin-left: 120px;
}

.media-reviews .property-review,
.media-reviews .property-review * {
    color: #fff;
}

.media-reviews .media-track > * {
    max-height: 180px;
    overflow-y: auto;
    padding: 0 16px;
}

.media-reviews .media-track {
    height: auto;
    cursor: grab;
}

.media-reviews .media-track.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
}

.media-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.media-dots button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.media-dots button::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgb(255 255 255 / 60%);
}

.media-dots button[aria-current="true"]::before {
    background: #fff;
}

.media-dots button:focus-visible,
.media-reviews .media-track:focus-visible {
    outline: 2px solid #164c60;
    outline-offset: -2px;
}

@media (max-width: 767px) {
    .property-guestreviews .media-reviews {
        width: 100%;
        margin-left: 0;
    }

    .inquiry-dialog {
        padding: 20px 12px;
    }
}
