/* 添付画像の画面内拡大表示（chat-image-viewer.js / 橋元さん 10/5 依頼）。
   飯塚デザインの app.css には触らず、追加分だけをこのファイルで足す。 */

.chat-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(0, 0, 0, 0.92);
  overscroll-behavior: contain;
}

.chat-image-viewer[hidden] {
  display: none;
}

.chat-image-viewer-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 押せる範囲は 44px 以上（指で確実に押せる大きさ）。 */
.chat-image-viewer-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 8px);
  right: calc(env(safe-area-inset-right) + 8px);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
}

/* 表示中は後ろの画面をスクロールさせない。 */
.chat-image-viewer-open,
.chat-image-viewer-open body {
  overflow: hidden;
}
