#chatImageHdViewer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  background: rgba(3, 7, 14, .96);
  color: #fff;
}

#chatImageHdViewer[hidden] {
  display: none !important;
}

.chat-image-hd-open {
  overflow: hidden !important;
}

.chat-image-hd-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 8px 12px;
  background: rgba(12, 20, 34, .98);
  border-bottom: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  flex: 0 0 auto;
}

.chat-image-hd-title {
  margin-right: auto;
  font-size: 13px;
  font-weight: 800;
}

.chat-image-hd-toolbar button,
.chat-image-hd-toolbar a {
  min-width: 38px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.chat-image-hd-toolbar button:hover,
.chat-image-hd-toolbar a:hover {
  background: rgba(255,255,255,.17);
}

.chat-image-hd-toolbar [data-hd-action="close"] {
  font-size: 24px;
  line-height: 1;
}

.chat-image-hd-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 18px;
  cursor: zoom-out;
}

.chat-image-hd-stage img {
  display: block;
  flex: 0 0 auto;
  max-width: none;
  max-height: none;
  image-rendering: auto;
  object-fit: contain;
  margin: auto;
  box-shadow: 0 10px 36px rgba(0,0,0,.55);
  cursor: default;
}

.chat-image-hd-stage img.is-fit {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100vh - 88px) !important;
  margin: auto !important;
}

@media (max-width: 700px) {
  .chat-image-hd-toolbar {
    flex-wrap: wrap;
  }

  .chat-image-hd-title {
    width: 100%;
  }

  .chat-image-hd-toolbar button,
  .chat-image-hd-toolbar a {
    flex: 1 1 auto;
  }

  .chat-image-hd-stage {
    padding: 8px;
  }
}
