/*
  First-party styles that replace behavior the legacy Squarespace runtime
  used to apply with JavaScript. Pairs with /site-static.js.
*/

/* Images: Squarespace kept lazy images at opacity 0 until its loader
   added .loaded. The loader no longer runs, so show them directly. */
.sqs-block-summary-v2 .summary-thumbnail-container img,
.sqs-block[data-definition-name="website.components.summary"] .img-wrapper img,
.sqs-gallery-block-grid img,
img[data-load="false"] {
  opacity: 1;
}

/* FAQ accordion: opened by site-static.js */
.accordion-item__dropdown { display: none; }
.accordion-item__dropdown.accordion-item__dropdown--open { display: block; }
.accordion-item--expanded .plus__vertical-line { transform: rotate(90deg); }
.accordion-item__click-target { cursor: pointer; }

/* Summary blocks set to "List, thumbnail left" (homepage insights). The
   Squarespace gallery script used to size these; this reproduces the saved
   settings: 3:2 thumbnails at 38% width, text beside them, 60px gutter. */
.summary-block-setting-design-list-thumbnail-left .summary-item-list .summary-item {
  display: grid;
  grid-template-columns: 38% minmax(0, 1fr);
  column-gap: clamp(20px, 5%, 40px);
  align-items: start;
  width: auto;
  float: none;
  margin: 0 0 60px;
}
.summary-block-setting-design-list-thumbnail-left .summary-item-list .summary-item:last-child {
  margin-bottom: 0;
}
.summary-block-setting-design-list-thumbnail-left .summary-item-list .summary-item.sqs-gallery-design-list-slide .summary-thumbnail-outer-container,
.summary-block-setting-design-list-thumbnail-left .summary-item-list .summary-item.sqs-gallery-design-list-slide .summary-thumbnail-container,
.summary-block-setting-design-list-thumbnail-left .summary-item-list .summary-item.sqs-gallery-design-list-slide .summary-content {
  /* !important: the legacy gallery CSS pins these to 25%/75% (35%/65% on
     phones) with !important, which would shrink them inside the grid. */
  width: auto !important;
  max-width: none;
  float: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
.summary-block-setting-design-list-thumbnail-left .summary-thumbnail-container {
  display: block;
}
.summary-block-setting-design-list-thumbnail-left .summary-thumbnail {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 0;
}
.summary-block-setting-design-list-thumbnail-left .summary-thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.summary-block-setting-design-list-thumbnail-left .summary-title {
  margin-top: 0;
}
/* Phones: the saved Squarespace design keeps the thumbnail beside the text
   at 35% width below 480px. */
@media (max-width: 480px) {
  .summary-block-setting-design-list-thumbnail-left .summary-item-list .summary-item {
    grid-template-columns: 35% minmax(0, 1fr);
    column-gap: 16px;
    margin-bottom: 40px;
  }
}

/* Blog post prev/next links: let long titles wrap instead of pushing the
   arrow off-screen on phones (legacy flex items defaulted to min-width:auto). */
.item-pagination-link,
.item-pagination-link .pagination-title-wrapper {
  min-width: 0;
}
.item-pagination-link .item-pagination-title {
  overflow-wrap: break-word;
  hyphens: auto;
}
@media (max-width: 640px) {
  .item-pagination-link .item-pagination-title {
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: 0.04em;
  }
}

/* Gallery blocks (slideshow and slider). The Squarespace gallery script sized
   and animated these; without it the photos render at full size. Show them as
   a swipeable strip instead; site-static.js wires the existing arrows. */
.sqs-gallery-block-slideshow,
.sqs-gallery-block-slider {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}
.sqs-gallery-block-slideshow .sqs-gallery,
.sqs-gallery-block-slider .sqs-gallery {
  display: flex;
  gap: 8px;
  height: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.sqs-gallery-block-slideshow .sqs-gallery > .slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  scroll-snap-align: start;
  overflow: hidden;
}
.sqs-gallery-block-slideshow .sqs-gallery > .slide img.thumb-image,
.sqs-gallery-block-slider .sqs-gallery > img.thumb-image {
  position: static;
  display: block;
  max-width: none;
  object-fit: cover;
  opacity: 1;
}
.sqs-gallery-block-slideshow .sqs-gallery > .slide img.thumb-image {
  width: 100%;
  height: 100%;
}
.sqs-gallery-block-slider .sqs-gallery > img.thumb-image {
  flex: 0 0 auto;
  width: auto;
  height: clamp(180px, 40vw, 320px);
  scroll-snap-align: start;
}
.sqs-gallery-block-slideshow .sqs-gallery-controls a,
.sqs-gallery-block-slider .sqs-gallery-controls a {
  cursor: pointer;
}
