/* The Fasting Club promo popup (markup: inc/fasting-popup.php, behaviour: js/fasting-popup.js) */
.fc-popup {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 36, 26, .72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.fc-popup[hidden] { display: none; }
.fc-popup.is-open { opacity: 1; visibility: visible; }

.fc-popup__dialog {
  position: relative;
  width: 100%;
  /* Never wider than the image can be at the available height (image is 3:2), so the shadow hugs the image. */
  max-width: min(960px, calc((100vh - 48px) * 1.5));
  transform: translateY(16px) scale(.97);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.fc-popup.is-open .fc-popup__dialog { transform: none; }

.fc-popup__link { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); outline-offset: 4px; }
.fc-popup__link:focus-visible { outline: 3px solid #fff; }
.fc-popup__img { display: block; width: 100%; height: auto; max-height: calc(100vh - 48px); object-fit: contain; transition: transform .4s ease; }
.fc-popup__link:hover .fc-popup__img { transform: scale(1.01); }

.fc-popup__close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #4a5a3c;
  font-size: 26px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.fc-popup__close:hover, .fc-popup__close:focus-visible { background: #4a5a3c; color: #fff; transform: rotate(90deg); outline: none; }

/* Safety net: never on phones, even if the script runs. */
@media (max-width: 767px) { .fc-popup { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .fc-popup, .fc-popup__dialog, .fc-popup__img, .fc-popup__close { transition: none; }
}
