/*
  pages/stay.css
  Accommodation / stay page: accommodation grid, image lightbox.
*/


/* ─── Accommodation grid ─────────────────────────────────────────────────── */

.accommodation {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "image"
    "info"
    "gallery"
    "separator";
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0 0;

  @media screen and (max-width: 1023px) {
    max-width: calc(100% - 40px);
  }

  @media screen and (min-width: 601px) {
    grid-template-columns: 1fr 320px;
    gap: 30px;
    grid-template-areas:
      "info image"
      "gallery gallery"
      "separator separator";
    padding: 50px 0 0;
  }

  @media screen and (min-width: 1024px) {
    grid-template-columns: 1fr 390px;
    gap: 50px;
    max-width: 1080px;
  }

  &:last-of-type::after {
    display: none;
  }

  &::after {
    grid-area: separator;
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    margin: 0;
    background-color: var(--gold);
  }
}

.accommodation__info {
  grid-area: info;
  align-content: center;

  & h3 {
    margin: 0;
    color: var(--emerald);
    text-align: left;
  }

  & a:not(.cta) {
    color: var(--emerald);
    font-weight: 600;
    text-decoration: none;
  }
}

.accommodation__image {
  grid-area: image;

  & img {
    max-width: 390px;
  }
}

.accommodation__gallery {
  grid-area: gallery;

  & ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
  }

  & ul li {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
  }
}


/* ─── Image lightbox ─────────────────────────────────────────────────────── */

.simple-lightbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 600;

  & .content {
    display: flex;
    align-items: center;
    justify-content: center;

    & img {
      width: auto;
      height: auto;
      max-width: calc(90vw - 60px);
      max-height: 90vh;
    }
  }

  & .closer {
    align-self: flex-end;
    width: 44px;
    height: 44px;
    border: 0;
    background-color: transparent;
    background-image: url('/static/images/window-close.svg');
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: center;
    font-size: 0;
    position: absolute;
    top: -40px;
    right: -40px;
    z-index: 1000;
    cursor: pointer;

    @media screen and (max-width: 600px) {
      right: -20px;
    }
  }
}

.simple-lightbox-overlay {
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
}
