.agent-gallery-open {
  overflow: hidden;
}

.agent-gallery-modal {
  align-items: center;
  background: rgba(10, 10, 10, 0.9);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 60px 72px 42px;
  position: fixed;
  z-index: 100000;
}

.agent-gallery-modal.is-open {
  display: flex;
}

.agent-gallery-frame {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  max-height: 100%;
  max-width: 100%;
}

.agent-gallery-frame img {
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  max-height: calc(100vh - 130px);
  max-width: min(100%, 1180px);
  object-fit: contain;
}

.agent-gallery-frame figcaption {
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
}

.agent-gallery-close,
.agent-gallery-prev,
.agent-gallery-next {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: center;
  position: fixed;
  transition: background 0.15s ease, transform 0.15s ease;
}

.agent-gallery-close:hover,
.agent-gallery-prev:hover,
.agent-gallery-next:hover,
.agent-gallery-close:focus-visible,
.agent-gallery-prev:focus-visible,
.agent-gallery-next:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.agent-gallery-close {
  font-size: 34px;
  height: 46px;
  right: 18px;
  top: 18px;
  width: 46px;
}

.agent-gallery-prev,
.agent-gallery-next {
  font-size: 58px;
  height: 68px;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
}

.agent-gallery-prev {
  left: 18px;
}

.agent-gallery-next {
  right: 18px;
}

@media (max-width: 700px) {
  .agent-gallery-modal {
    padding: 58px 14px 34px;
  }

  .agent-gallery-frame img {
    max-height: calc(100vh - 125px);
    max-width: 100%;
  }

  .agent-gallery-prev,
  .agent-gallery-next {
    bottom: 16px;
    height: 46px;
    top: auto;
    transform: none;
    width: 52px;
  }
}
