/* =========================
   modals.css
   /views/articles/_article_modals.php
   - only modal_image
   - normal + dark-mode + responsive
   ========================= */

#modal_image {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.22s ease;
}

#modal_image_content {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  padding: 18px;
  background: transparent;
}

#modal_image_content img {
  max-width: 100%;
  max-height: 82vh;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

#modal_image_close {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 22px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

#modal_image_close:hover {
  transform: scale(1.08);
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* dark mode (modal_image) */
body.dark-mode #modal_image {
  background: rgba(0, 0, 0, 0.90);
}

/* responsive (modal_image) */
@media (max-width: 800px) {
  #modal_image_content {
    padding: 12px;
    max-width: 96vw;
    max-height: 96vh;
  }

  #modal_image_content img {
    max-height: 86vh;
    border-radius: 10px;
  }

  #modal_image_close {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
