/* --- 基本スタイル --- */
.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s;
}
.clickable-row:hover {
  background-color: #2e6ab1;
  color: #ffffff;
}

/* --- 背景シート --- */
.modal-overlay {
  position: fixed;

  /* 画面の中央に配置するための計算 */
  top: 5%;
  left: 15%;
  width: 70%;
  height: 90%;

  /* 背景のデザイン */
  background-color: rgba(0, 0, 0, 0.85); 
  backdrop-filter: blur(4px);                          /* 背景の後ろの画面を少しボカす */
  border-radius: 16px;                                 /* 角丸 */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);          /* 周囲に影を落とす */

  /* 画像を中央に配置する設定 */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;                                       /* 内側の余白（画像がフチにくっつかないようにする） */
  box-sizing: border-box;

  /* アニメーションと表示制御 */
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95) translate(-5%, -5%);          /* 自身のサイズを考慮した中央からのポップアップ */
  transform-origin: center center;
  transition: opacity 0.5s ease, transform 0.3s ease;
  z-index: 1000;
}

/* モーダル表示中のスタイル */
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translate(0, 0);
}

/* モーダル内の画像 */
.modal-content {
  width: 100%;
  height: 100%;
  object-fit: contain;                                 /* 縦横比を維持して背景内に収める */
  border-radius: 8px;
}

/* --- 閉じる（×）ボタンの設定 --- */
.modal-close {
  position: absolute;
  color: rgba(255, 255, 255, 0.7);
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1010;
  transition: color 0.2s, transform 0.2s;
}
.modal-close:hover {
  color: #fff;
  transform: scale(1.1);
}

/* --- 【PC用】閉じるボタンの配置（画面幅769px以上） --- */
@media (min-width: 769px) {
  .modal-close {
    top: 20px;
    right: 25px;
  }
}

/* --- 【スマホ用】閉じるボタンの配置（画面幅768px以下） --- */
@media (max-width: 768px) {
  .modal-overlay {
    left: 1%;
    width: 98%;
    padding: 50px 16px 16px 16px;   /* スマホはボタン分の上の隙間を広く取る */
  }
  .modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 36px;
    width: 40px;      /* タップエリアの確保 */
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.2); /* ボタンの視認性を上げる背景 */
    border-radius: 50%;
    cursor: pointer;
  }
}
