/* Offline runtime for the static copy of edwin-van-nuil.squarespace.com (Squarespace 7.0 "Wexley").
   Replaces what Squarespace's image loader and scripts used to do at runtime. */

/* Images the image loader used to crop or fit with pixel offsets. */
img.evn-fit-cover,
img.evn-fit-contain {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}
img.evn-fit-cover { object-fit: cover; }
img.evn-fit-contain { object-fit: contain; }

/* Gallery page slideshow: one slide at a time, faded. */
#slideshow .slide { transition: opacity 0.35s ease, visibility 0.35s; }
.collection-type-gallery #thumbList .thumb { cursor: pointer; }

/* Phones: the template hides the thumbnail grid and shows the gallery as a column of photos
   (site.css, max-width 800px). Undo the slideshow's stacking so they don't overlap. */
@media only screen and (max-width: 800px) {
  .collection-type-gallery #slideshowWrapper { height: auto !important; }
  .collection-type-gallery #slideshow .slide { position: relative !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; height: auto !important; }
  .collection-type-gallery #slideshow .slide img.evn-fit-contain { position: static !important; display: block; width: 100% !important; height: auto !important; }
  .collection-type-gallery #imageInfoToggle { display: none; }
}

/* Features that need Squarespace's servers. */
.sqs-simple-like,
.squarespace-social-buttons,
.sqs-block-search,
.comment .controls,
.new-comment-area,
.reply-area-wrapper,
.comment-controls { display: none !important; }

/* Forms cannot post anywhere offline. */
.evn-offline-note { margin: 1em 0 0; padding: 10px 14px; font-size: 14px; color: #777; background: #f6f6f6; border-left: 3px solid #ff8c00; }

/* Embedded video (local file, or poster linking to Vimeo). */
.evn-video { display: block; width: 100%; max-width: 960px; height: auto; margin: 0 auto; background: #000; }
.evn-video-link { position: relative; display: block; max-width: 960px; margin: 0 auto; text-decoration: none; }
.evn-video-link img { display: block; width: 100%; height: auto; }
.evn-video-link span { display: block; padding: 10px 0; font-size: 14px; color: #ff8c00; }
.sqs-block-embed .intrinsic-inner, .sqs-block-embed .sqs-embed-container { padding-bottom: 0 !important; height: auto !important; }

/* Image-block lightbox. */
.evn-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.92);
  color: #ddd;
  cursor: zoom-out;
}
.evn-lightbox.evn-light { background: rgba(255, 255, 255, 0.96); color: #333; }
.evn-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; box-shadow: 0 0 30px rgba(0, 0, 0, 0.3); }
.evn-lightbox .evn-desc { margin-top: 14px; max-width: 900px; text-align: center; font-size: 14px; line-height: 1.5; }
.evn-lightbox .evn-desc p { margin: 0; }
.evn-lightbox .evn-desc strong { display: block; margin-bottom: 4px; font-weight: normal; color: #ff8c00; }
.evn-lightbox .evn-nav {
  position: absolute;
  top: 50%;
  margin-top: -36px;
  padding: 0 18px;
  font: 300 64px/72px Arial, sans-serif;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.7;
}
.evn-lightbox .evn-nav:hover { opacity: 1; }
.evn-lightbox .evn-prev { left: 0; }
.evn-lightbox .evn-next { right: 0; }
.evn-lightbox .evn-close {
  position: absolute;
  top: 12px;
  right: 20px;
  font: 300 34px/1 Arial, sans-serif;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
