/* ===========================
   ★ ポップアップイメージ
   =========================== */

/* 背景オーバーレイ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.25s ease;
}

/* コンテナ：画像と×ボタンを包む */
.popup-container {
  position: relative;
  display: inline-block;
  line-height: 0;
}

/* 表示画像 */
.popup-container img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s ease;
}

/* ×ボタン */
.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
  padding: 2px 8px 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 2;
}
.popup-close:hover {
  background: rgba(0,0,0,0.85);
}

/* クリックで拡大ポップアップ：下線＋虫眼鏡 */
.popup-link {
  cursor: zoom-in;
  color: inherit !important;
  text-decoration: none !important;
  font-weight: normal;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  display: inline-block;
  margin-left: 0.3em;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.popup-link::after {
  content: " 🔍";
  color: #339e67;
  font-size: 1em;
  vertical-align: middle;
}
.popup-link:hover {
  opacity: 0.8;
  transform: scale(1.03);
}
.popup-link:hover::after {
  filter: brightness(1.25);
}

/* ===========================
   ★ ツールチップ
   =========================== */

.tooltip {
  position: relative;
  cursor: help;
  display: inline-block;
  margin-left: 0.3em; /* ポップアップと統一 */
  border-bottom: 1px solid rgba(0, 0, 0, 0.25); /* 下線統一 */
}

/* 吹き出しのテキスト */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 180px;
  background-color: #339e67;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

/* 吹き出しの矢印 */
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #339e67 transparent transparent transparent;
}

/* ホバー時 */
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ツールチップにも虫眼鏡アイコン */
.tooltip::after {
  content: " 🔍";
  color: #339e67;
  font-size: 1em;
  vertical-align: middle;
}
.tooltip:hover::after {
  filter: brightness(1.25);
}

/* ===========================
   アニメーション
   =========================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* 背景はクリックできる */
.popup-overlay {
  cursor: zoom-out;
}

/* 画像の上では閉じない */
.popup-container {
  cursor: default;
}
