/* =============================================================
   modal.css — Twin Oaks Imaginations
   Lightbox modal for gallery images and videos.
   Note: #myImg rules removed -- hover/cursor now handled
   by .media-container rules in gallery.css
   ============================================================= */

/* ---- Backdrop ---- */

.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.92);
}

/* ---- Media wrapper ---- */

#modal-media-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 80px;
}

/* ---- Image and video inside modal ---- */

.modal-content {
	display: block;
	margin: auto;
	max-width: 90vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

/* Video needs explicit dimensions or it collapses */
video.modal-content {
	width: 90vw;
	max-width: 900px;
	max-height: 80vh;
}

/* ---- Zoom in animation ---- */

.modal-content {
	animation: modalZoom 0.25s ease;
}

@keyframes modalZoom {
	from {
		transform: scale(0.85);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* ---- Caption ---- */

#caption {
	display: block;
	margin: 12px auto 0;
	width: 90%;
	max-width: 700px;
	text-align: center;
	color: #ccc;
	font-size: 0.9rem;
	font-style: italic;
	padding-bottom: 20px;
	min-height: 40px;
}

/* ---- Close button ---- */

.close {
	position: absolute;
	top: 16px;
	right: 28px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	line-height: 1;
	cursor: pointer;
	transition: color 200ms ease;
	text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
	user-select: none;
}

.close:hover,
.close:focus {
	color: #ffd700;
}

/* ---- Mobile ---- */

@media only screen and (max-width: 700px) {
	.modal-content {
		max-width: 100vw;
		border-radius: 0;
	}

	video.modal-content {
		width: 100vw;
	}

	#modal-media-wrap {
		padding-top: 60px;
	}
}
