/* Exhibit RSGDX — custom-modal.css — v1
   Generic reusable modal/lightbox. Currently used for image enlargement
   (see custom-modal.js) but the overlay/close mechanism is intentionally
   generic so future popups can reuse it rather than each building their
   own from scratch. */

#exhibitrsgdx-modal {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: var(--exhibitrsgdx-space-5);
}

#exhibitrsgdx-modal.is-open {
	display: flex;
}

#exhibitrsgdx-modal .exhibitrsgdx-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.85);
}

#exhibitrsgdx-modal .exhibitrsgdx-modal__content {
	position: relative;
	z-index: 1;
	max-width: 90vw;
	max-height: 90vh;
}

#exhibitrsgdx-modal .exhibitrsgdx-modal__content img {
	display: block;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

#exhibitrsgdx-modal .exhibitrsgdx-modal__close {
	position: absolute;
	top: -18px;
	right: -18px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--exhibitrsgdx-color-primary);
	color: #fff;
	border: none;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}

#exhibitrsgdx-modal .exhibitrsgdx-modal__close:hover {
	background: var(--exhibitrsgdx-color-primary-hover);
}

@media (max-width: 500px) {
#exhibitrsgdx-modal .exhibitrsgdx-modal__close {
		top: -14px;
		right: 0;
		width: 30px;
		height: 30px;
		font-size: 13px;
	}
}