/*
 * FaceWall front-end styles ONLY.
 *
 * Never add generic body, h5, .navbar, .nav-collapse, .container, .d-flex,
 * .row, ul or other template-level rules here. The old Bootstrap-responsive
 * and custom stylesheets must not be injected by the shortcode.
 */
.facewall-display {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  clear: both;
}

.facewall-display *,
.facewall-display *::before,
.facewall-display *::after {
  box-sizing: border-box;
}

.facewall-display .items-row.bec_members_row {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.5rem !important;
  padding: 0;
  clear: both;
}

.facewall-display.facewall-scope-joint .items-row.bec_members_row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.facewall-display .items-row.bec_year_row {
  display: block;
  margin: 1.25rem 0 .5rem;
  clear: both;
}

.facewall-display .items-row.bec_members_row > .span2 {
  display: block !important;
  float: none !important;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.facewall-display .items-row .span2 > .item {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.facewall-display .items-row .span2 .page-header {
  padding: 0;
  margin: 0 0 .45rem;
  border: 0;
}

.facewall-display .items-row .span2 h5 {
  font-size: 14px !important;
  line-height: 1.35;
  margin: 0 0 .35rem !important;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.facewall-display .items-row .span2 .pull-left.item-image {
  position: relative;
  display: block;
  float: none !important;
  clear: both;
  width: 100%;
  max-width: 174px;
  margin: 0;
}

.facewall-display .fw_image {
  display: block;
  width: 100%;
  max-width: 174px;
  height: auto;
  opacity: 1;
  transition: opacity .25s ease;
  backface-visibility: hidden;
}

.facewall-display .fw_middle {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .4rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity .25s ease, visibility .25s ease;
  text-align: center;
}

.facewall-display .item-image:hover .fw_image,
.facewall-display .item-image:focus-within .fw_image {
  opacity: .3;
}

.facewall-display .item-image:hover .fw_middle,
.facewall-display .item-image:focus-within .fw_middle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.facewall-display .item-image:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.facewall-display .fw_middle .text {
  color: #111;
  font-size: 12px;
  line-height: 1.35;
  padding: 1px;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .facewall-display .items-row.bec_members_row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .facewall-display .items-row.bec_members_row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
  }
}

@media (max-width: 380px) {
  .facewall-display .items-row.bec_members_row,
  .facewall-display.facewall-scope-joint .items-row.bec_members_row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/*
 * Never force the membership history permanently visible on touchscreens:
 * hybrid touch laptops can still have a mouse. The image container receives
 * keyboard focus via tabindex=0, so a tap or keyboard focus reveals the
 * overlay without placing the text above the photo.
 */
