/**
 * MP Popup - Stylesheet
 * Muncul dengan fade + scale halus (bukan efek kasar/menyentak),
 * responsif untuk semua perangkat.
 *
 * Oleh: Dhani - SMK Negeri 3 Pamekasan
 */

.mp-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease;
}

.mp-popup-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.mp-popup-box {
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 820px;
	width: 94%;
	max-height: 92vh;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	transform: scale(0.96);
	transition: transform 0.35s ease;
}

.mp-popup-overlay.is-visible .mp-popup-box {
	transform: scale(1);
}

.mp-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.06);
	color: #333;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mp-popup-close:hover {
	background: rgba(0, 0, 0, 0.12);
}

.mp-popup-media {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px 12px 0 0;
}

.mp-popup-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mp-popup-content {
	padding: 28px 32px 32px;
	text-align: center;
}

.mp-popup-title {
	margin: 0 0 12px;
	font-size: clamp(20px, 4.5vw, 28px);
	font-weight: 700;
}

.mp-popup-desc {
	margin: 0 0 22px;
	font-size: 16px;
	color: #555;
	line-height: 1.6;
}

.mp-popup-cta {
	display: inline-block;
	padding: 12px 30px;
	background: #111;
	color: #fff;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
}

/* ==========================================================
   MOBILE: tampil sebagai bottom-sheet supaya lebih nyaman
   digenggam satu tangan, tetap tanpa efek kasar
   ========================================================== */
@media (max-width: 600px) {
	.mp-popup-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.mp-popup-box {
		max-width: 100%;
		border-radius: 16px 16px 0 0;
		max-height: 85vh;
		transform: translateY(12px);
	}

	.mp-popup-overlay.is-visible .mp-popup-box {
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mp-popup-overlay,
	.mp-popup-box {
		transition: none;
	}
}
