/* =============================================================================
   POP-UPS - the home page "LET'S EAT" box and the Careers job listings
   They are <dialog> elements at the bottom of the page; js/popup.js opens them.
   Pop-up sizes use "vw" (% of the window width), because a pop-up covers the window.
   ============================================================================= */

.popup {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

/* dark see-through layer behind the box */
.popup::backdrop { background-color: rgba(0, 0, 0, 0.6); }

/* fade in when opened */
.popup[open] { animation: popup-fade-in 1.2s cubic-bezier(0.445, 0.05, 0.55, 0.95); }
@keyframes popup-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* the box, centred in the window */
.popup__box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.popup__close {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.popup__close svg { display: block; width: 100%; height: 100%; fill: var(--white); }


/* ---------- "JOB LISTING" (careers page) --------------------------------------
   A white panel covering the whole window, showing Bengal's iSolved job board. */
.popup--jobs .popup__box {
  inset: 0;
  transform: none;
  overflow-x: hidden;
  overflow-y: scroll;
  background-color: var(--white);
}
.popup__jobs-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 832px;
  border: 0;
}
.popup--jobs .popup__close {
  top: 44.5px;
  right: 47.8px;
  width: 18px;
  height: 20px;
}
.popup--jobs .popup__close svg { fill: var(--black); }
@media (max-width: 1000px) {
  .popup__jobs-frame { min-height: 476px; }
}


/* ---------- "LET'S EAT" (home page) ------------------------------------------ */
.popup--lunch .popup__box {
  display: grid;
  grid-template-columns: 29.99vw 29.98vw;
  column-gap: 1.6vw;
  padding: 4.71vw 4.71vw 4.7vw 4.66vw;
  background-color: var(--yellow);
}

/* the picture goes on the right on big screens */
.popup--lunch .popup__picture {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 20.62vw;
  object-fit: cover;
}
.popup--lunch .popup__content { grid-column: 1; grid-row: 1; }

.popup__title {
  font-family: var(--font-heading);
  font-size: 3.31vw;
  line-height: 1.3;
  color: var(--black);
}

.popup__text {
  margin-top: 1.1vw;
  font-size: 1.1vw;
  line-height: 1.6;
  color: var(--black);
}

.popup--lunch .popup__button {
  width: 12.81vw;
  height: 4.03vw;
  margin-top: 0.6vw;
  padding: 0;
  font-size: 1.25vw;
}

.popup--lunch .popup__close { top: 5.48vw; right: 5.09vw; }

/* tablet: picture on top, text below */
@media (max-width: 1000px) {
  .popup--lunch .popup__box {
    grid-template-columns: 29.57vw;
    justify-items: center;
    padding: 4.66vw 4.72vw 4.66vw 4.6vw;
  }
  .popup--lunch .popup__picture { grid-column: 1; width: 25.4vw; height: 21.29vw; }
  .popup--lunch .popup__content { grid-row: 2; justify-self: stretch; margin-top: 5.48vw; }
  .popup__text { margin-top: 1.15vw; font-size: 1.6vw; }
  .popup--lunch .popup__button { width: 12.63vw; height: 3.97vw; margin-top: 0.52vw; font-size: 1.24vw; }
  .popup--lunch .popup__close { top: 4.66vw; right: 3.01vw; }
}

@media (max-width: 750px) {
  .popup--lunch .popup__box {
    grid-template-columns: 62.69vw;
    padding: 4.57vw 4.66vw 4.56vw 4.44vw;
  }
  .popup--lunch .popup__picture { width: 51.62vw; height: 43.27vw; }
  .popup--lunch .popup__content { margin-top: 3.4vw; }
  .popup__title { font-size: 4.01vw; }
  .popup__text { margin-top: 1.4vw; font-size: 2.41vw; }
  .popup--lunch .popup__button { width: 26.76vw; height: 8.42vw; margin-top: 0.24vw; font-size: 2.41vw; }
  .popup--lunch .popup__close { top: 8.37vw; right: 8.52vw; }
}
