/* Room page (stay_room.php), checkout and reserve pages. Colours have fallbacks: the site's Bootstrap build lacks the 5.3 variables. */

/* ---------- photo grid */
.stay-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 11rem 11rem;
    gap: .5rem;
    position: relative;
}

.stay-gallery .stay-gallery-main {
    grid-row: 1 / span 2;
    grid-column: 1;
}

.stay-gallery a,
.stay-gallery .stay-gallery-main {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: .5rem;
    background: var(--bs-secondary-bg, #e9ecef);
}

.stay-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stay-gallery-empty {
    grid-template-columns: 1fr;
    grid-template-rows: 14rem;
}

.stay-gallery-empty .stay-gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 1;
}

.stay-gallery-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-weight: 700;
}

.stay-gallery-note {
    position: absolute;
    inset-inline-start: .75rem;
    bottom: .5rem;
    background: rgba(255, 255, 255, .85);
    padding: .1rem .5rem;
    border-radius: 1rem;
}

@media (max-width: 767.98px) {
    .stay-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 13rem 6rem;
    }

    .stay-gallery .stay-gallery-main {
        grid-row: 1;
        grid-column: 1 / span 2;
    }

    .stay-gallery .stay-gallery-tile:nth-child(n+4) {
        display: none;
    }
}

/* ---------- lightbox */
.stay-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 4rem;
}

.stay-lightbox[hidden] {
    display: none;
}

.stay-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stay-lightbox button {
    position: absolute;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.stay-lightbox button:hover {
    background: rgba(255, 255, 255, .3);
}

.stay-lb-close {
    top: 1rem;
    inset-inline-end: 1rem;
}

.stay-lb-prev {
    inset-inline-start: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.stay-lb-next {
    inset-inline-end: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.stay-lb-cap {
    position: absolute;
    bottom: 1rem;
    color: #fff;
    font-size: .9rem;
}

body.stay-lb-open {
    overflow: hidden;
}

/* ---------- content sections */
.stay-sec {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.stay-sec:last-child {
    border-bottom: 0;
}

.stay-sec-title {
    font-weight: 700;
    margin-bottom: .75rem;
}

.stay-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

.stay-chip {
    background: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-body-color, #212529);
    font-weight: 500;
}

.stay-box {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .5rem;
    padding: .6rem .8rem;
    background: var(--bs-body-bg, #fff);
}

.stay-pairs li {
    padding: .15rem 0;
}

.stay-desc {
    line-height: 2;
    white-space: normal;
}

.stay-rules {
    padding-inline-start: 1.1rem;
    margin-bottom: .5rem;
}

/* ---------- booking card */
.stay-booking {
    position: sticky;
    top: 1rem;
}

#stay-quote {
    transition: opacity .15s ease;
}

#stay-quote.is-loading {
    opacity: .5;
}

.stay-quote td {
    padding-inline: 0;
}

/* ---------- checkout and reserve pages */
.stay-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .12em;
    direction: ltr;
    display: inline-block;
}

.stay-steps li {
    margin-bottom: .35rem;
}
