/** ============================================================
    COMPONENT: Modals & Lightbox
    Source: style.css, details.css
    ============================================================ */

/* --- Generic modal overlay --- */
.modal-overlay {
  position: fixed; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.6); display: none;
  justify-content: center; align-items: center; z-index: 9999;
}
.modal-box {
  width: 420px; background: var(--surface-card); border-radius: var(--radius-md);
  padding: 20px; position: relative; max-height: 90vh; overflow-y: auto;
}
.close-btn {
  position: absolute; top: 10px; right: 10px; font-size: 26px;
  cursor: pointer; color: var(--ink-600);
}

/* --- Auth modal --- */
.login-modal-overlay {
  display: none; position: fixed; z-index: 10001; left: 0; top: 0;
  width: 100%; height: 100%; background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); justify-content: center; align-items: center;
}
.login-modal-container {
  position: relative;
  width: 95%;
  max-width: 450px;
  display: block;
}
.close-login-modal {
  position: absolute; right: 10px; top: -1px; color: var(--ink-600); font-size: 30px;
  cursor: pointer; z-index: 10002;
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: hsl(245 60% 12% / 0.88);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 11000;
}
.lightbox-overlay.active { display: flex; }

.lightbox-image-container {
  position: relative;
  width: 90%;
  max-width: 700px;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lightbox-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  pointer-events: auto;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: hsl(263 30% 100% / 0.1);
  color: #fff;
  border: 1px solid hsl(263 30% 100% / 0.3);
  font-size: 24px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 11002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
}
.lightbox-arrow:hover {
  background: hsl(263 30% 100% / 0.2);
  scale: 1.1;
}
.lightbox-arrow.left { left: 10px; }
.lightbox-arrow.right { right: 10px; }

@media (max-width: 768px) {
  .lightbox-arrow.left { left: 10px; }
  .lightbox-arrow.right { right: 10px; }
  .lightbox-image-container { width: 95%; }
}
