.persportal-gallery {
  background: #fff;
  border: 1px solid var(--signal-border);
  margin: 28px 0;
  padding: 18px;
}

.persportal-gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--signal-border);
  padding-bottom: 13px;
  margin-bottom: 14px;
}

.persportal-gallery-title>span {
  display: block;
  color: var(--signal-red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.persportal-gallery-title h2 {
  font: 850 23px/1.15 Georgia,"Times New Roman",serif;
  color: var(--signal-black);
  margin: 4px 0 0;
}

.persportal-gallery-head>strong {
  font-size: 11px;
  color: var(--signal-muted);
  white-space: nowrap;
}

.persportal-gallery-stage {
  position: relative;
  background: #101216;
  min-height: 250px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gallery-open {
  display: block;
  width: 100%;
  height: clamp(260px,52vw,680px);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(34,35,38,.86);
  color: #fff;
  font-size: 29px;
  cursor: pointer;
}

.gallery-prev {
  left: 12px;
}

.gallery-next {
  right: 12px;
}

.persportal-gallery-photo-info {
  padding: 11px 0;
  color: var(--signal-muted);
  font-size: 12px;
}

.persportal-gallery-credit {
  display: flex;
  gap: 8px;
}

.persportal-gallery-credit strong {
  color: var(--signal-black);
}

.persportal-gallery-thumbs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 6px 0 2px;
}

.gallery-thumb {
  flex: 0 0 90px;
  height: 66px;
  padding: 0;
  border: 2px solid transparent;
  background: #ddd;
  cursor: pointer;
  opacity: .72;
}

.gallery-thumb.is-active {
  border-color: var(--signal-red);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.t112-gallery-core-open {
  overflow: hidden;
}

.t112-gallery-core-lightbox[hidden] {
  display: none!important;
}

.t112-gallery-core-lightbox:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.t112-gallery-core-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #08090deF;
  cursor: pointer;
}

.t112-gallery-core-panel {
  position: relative;
  z-index: 1;
  width: min(1100px,96vw);
  height: min(92vh,850px);
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  grid-template-rows: 1fr auto;
  align-items: center;
  color: white;
}

.t112-gallery-core-close {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid #ffffff55;
  background: #17191f;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.t112-gallery-core-figure {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
}

.t112-gallery-core-image {
  display: block;
  max-width: 100%;
  max-height: calc(100% - 68px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.t112-gallery-core-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 50px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  color: #fff;
  font-size: 12px;
}

.t112-gallery-core-caption span {
  color: #ff777c;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.t112-gallery-core-caption strong {
  font-weight: 800;
}

.t112-gallery-core-caption small {
  flex-basis: 100%;
  font-size: 11px;
  color: #c4c6cb;
}

.t112-gallery-core-nav {
  grid-row: 1;
  z-index: 3;
  border: 0;
  background: #ffffff19;
  color: #fff;
  width: 48px;
  height: 56px;
  font-size: 36px;
  cursor: pointer;
}

.t112-gallery-core-prev {
  grid-column: 1;
}

.t112-gallery-core-next {
  grid-column: 3;
}

.t112-gallery-core-counter {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  color: #d6d8dc;
  font-size: 11px;
  padding-top: 7px;
}

.t112-gallery-core-loader {
  display: none;
}

.t112-gallery-core-figure .t112-privacy-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.t112-gallery-core-close:hover,.t112-gallery-core-nav:hover {
  background: var(--signal-red);
  color: #fff;
}

@media(max-width:640px) {
  .persportal-gallery {
    padding: 12px;
    margin: 22px 0;
  }

  .persportal-gallery-title h2 {
    font-size: 19px;
  }

  .gallery-open {
    height: 58vw;
    min-height: 220px;
  }

  .gallery-thumb {
    flex-basis: 74px;
    height: 56px;
  }

  .t112-gallery-core-lightbox:not([hidden]) {
    padding: 8px;
  }

  .t112-gallery-core-panel {
    width: 100vw;
    height: 90vh;
    grid-template-columns: 40px 1fr 40px;
  }

  .t112-gallery-core-nav {
    width: 36px;
    height: 46px;
    font-size: 27px;
  }

  .t112-gallery-core-image {
    max-height: calc(100% - 75px);
  }

  .t112-gallery-core-close {
    right: 5px;
    top: 3px;
  }
}
