:root {
  --image-gap: 20px;
}

body {
  box-sizing: border-box;
}

.pgall-tnails{
  display: flex;
  flex-wrap: wrap;
  gap: var(--image-gap);
  justify-content: space-between;
}

.pgall-item{
  border-radius: 10px;
  margin-bottom: var(--image-gap);
  overflow: hidden;
}

.pgall-tnails-col{
  flex: 1;
  flex-grow: 1;
  flex-shrink: 1;
}

.pgall-item img{
  border-radius: 10px;
  width: 100%;
}

.pgall-img-descr{
  line-height: normal;
  padding: 0.5em;
  text-align: center;
}

/* Media Preview */

.pgall-photo-ol {
  align-items: center!important;
  background-color: rgba(0, 0, 0, 0.95)!important;
  bottom: 0!important;
  display: none!important;
  justify-content: center!important;
  left: 0!important;
  margin: 0!important;
  position: fixed!important;
  right: 0!important;
  top: 0!important;
  z-index: 10!important;
}
.pgall-photo-ol.active{
  display: flex!important;
}

.pgall-icb {
  color: #FFF!important;
  cursor: pointer!important;
  font-size: 2em!important;
  opacity: 0.5!important;
}
.pgall-icb:hover {
  opacity: 1!important;
}
.pgall-icb:active {
  opacity: 0.5!important;
}

.pgall-photo-close {
  position: absolute!important;
  right: 20px!important;
  top: 20px!important;
  opacity: 0.5!important;
}
.pgall-photo-prev, .pgall-photo-next {
  margin: 10px!important;
}

.pgall-photo-prev.psv, .pgall-photo-next.psv {
  cursor: auto!important;
  opacity: 0.1!important;
}

.pgall-photo-co {
  align-content: center!important;
  display: flex!important;
  justify-content: center!important;
  height: 90%!important;
  width: 90%!important;
}

.pgall-photo {
  border: 0 none!important;
  height: auto!important;
  max-height: 100%!important;
  max-width: 100%!important;
  object-fit: contain!important;
  width: auto!important;
}

/* Media Preview ends */

@media only screen and (max-width: 576px){
  .pgall-photo-ol{
    align-items: flex-end!important;
    flex-direction: column!important;
  }
  .pgall-photo-co {
    flex-grow: 1!important;
    height: auto!important;
    width: 100%!important;
  }
  .pgall-photo-close {
    position: relative!important;
    right: 10px!important;
    top: 10px!important;
  }
  .pgall-photo-prev, .pgall-photo-next {
    display: none!important;
  }
}