/*
 * Template-owned additions, loaded after the purchased theme's CSS. The theme files
 * (main.css etc.) are byte-identical to the legacy sites and stay untouched; the block
 * templates reproduce the legacy markup so those rules apply as before. Only what the
 * legacy markup cannot carry lives here.
 */

/* ---------- Gallery ----------
 * The theme's gallery rules are scoped to #portfolio, the id the legacy gallery section
 * carried. A block's id is its nav anchor (section-<ID>), and two galleries on a page
 * cannot share an id, so the same rules are re-scoped to the block's class. */

.image-gallery-block .container-fluid,
.image-gallery-block .gallery-item {
  overflow: hidden;
  padding: 0;
}

.image-gallery-block .folio-item {
  position: relative;
}

.image-gallery-block .overlay {
  background-color: #000;
  color: #fff;
  left: 0;
  right: 0;
  bottom: -100%;
  height: 0;
  position: absolute;
  text-align: center;
  opacity: 0;
  transition: all 0.5s ease-in-out;
}

.image-gallery-block .folio-item:hover .folio-image {
  transform: scale(1.5) rotate(-15deg);
}

.image-gallery-block .folio-item:hover .overlay,
.image-gallery-block .folio-item:focus-within .overlay {
  opacity: 0.8;
  bottom: 0;
  height: 100%;
}

.image-gallery-block .folio-item:hover .folio-overview .folio-expand,
.image-gallery-block .folio-item:focus-within .folio-overview .folio-expand {
  margin-top: 0;
  margin-left: 0;
}

.image-gallery-block .folio-item:hover .overlay .folio-info,
.image-gallery-block .folio-item:focus-within .overlay .folio-info {
  opacity: 1;
  margin-bottom: 0;
  margin-top: 0;
}

@media (max-width: 767px) {
  .image-gallery-block .gallery-item {
    width: 50%;
    float: left;
  }
}

@media (max-width: 479px) {
  .image-gallery-block .gallery-item {
    width: 100%;
    float: none;
  }
}

/* ---------- Content block ---------- */

/* Several images in columns: flex keeps images of different heights from snagging
 * the float grid (the legacy grid never had more than one image per row to snag). */
.content-block__images {
  display: flex;
  flex-wrap: wrap;
}

.content-block__images::before,
.content-block__images::after {
  display: none;
}


/* ---------- Forms ---------- */

/* Spam honeypot: off-screen, never displayed to people. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Site questions: one row of radio buttons per question, in place of the legacy
 * jQuery UI sliders. main.css scales every radio to 2x with wide margins. */
.microsite-form ul.optionset {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.microsite-form ul.optionset li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.microsite-form ul.optionset input[type="radio"] {
  transform: scale(1.25);
  margin: 0 4px;
}

.microsite-form ul.optionset label {
  font-weight: 400;
  margin: 0;
}

.microsite-form .message.required,
.microsite-form .message.validation {
  display: block;
  margin-top: 4px;
}

/* ---------- Archive page ---------- */

.archived-block .archived-meta {
  font-size: 13px;
  opacity: 0.75;
}

/* Consent tick box: inline plain text after the box, as the legacy <span> was. The
 * <label> is kept for accessibility; Bootstrap would otherwise make it bold. */
.microsite-form input[type="checkbox"] {
  display: inline-block;
  vertical-align: middle;
}

.microsite-form .checkbox-label {
  display: inline;
  font-weight: 400;
}
