/* 画像ポップアップオーバーレイ */
.image-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.image-popup-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 画像コンテナ */
.image-popup-container {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: popupZoom 0.4s ease;
}

/* ポップアップ画像 */
#popupImage {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 閉じるボタン */
.image-popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10001;
}

.image-popup-close:hover {
  background: #f44336;
  color: #fff;
  transform: rotate(90deg);
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* スマホ対応 */
@media (max-width: 768px) {
  .image-popup-container {
    max-width: 95%;
  }

  #popupImage {
    border-radius: 4px;
  }

  .image-popup-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
    top: -10px;
    right: -10px;
  }
}
