/* Overlay popup */
#vap-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0,0,0,0.7);
	z-index: 999999;
	display: none; /* Sử dụng jQuery flex sau khi delay */
	justify-content: center;
	align-items: center;
}

.vap-hidden {
	display: none !important;
}

/* Container chính của popup */
#vap-popup-container {
	position: relative;
	background: #fff;
	max-width: 90%;
	max-height: 90vh;
	border-radius: 8px;
	box-shadow: 0 5px 25px rgba(0,0,0,0.5);
	overflow: auto; /* Hiển thị scrollbar nếu nội dung quá dài */
	animation: vap-pop 0.3s ease-out;
}

/* Ẩn scrollbar cho đẹp nhưng vẫn scroll được */
#vap-popup-container::-webkit-scrollbar {
    width: 6px;
}
#vap-popup-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Hình ảnh trong popup */
#vap-popup-container img {
	display: block;
	max-width: 100%;
	max-height: 90vh;
	height: auto;
	border-radius: 8px;
	object-fit: contain;
}

/* Bao bọc văn bản */
.vap-text-wrap {
	padding: 30px;
	min-width: 300px;
}

/* Nút tắt X */
#vap-close-btn {
	position: absolute;
	top: -15px;
	right: -15px;
	width: 30px;
	height: 30px;
	background: #fff;
	color: #333;
	border: 2px solid #ccc;
	border-radius: 50%;
	text-align: center;
	line-height: 26px;
	font-size: 20px;
	font-weight: bold;
	cursor: pointer;
	z-index: 10;
	transition: 0.2s;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#vap-close-btn:hover {
	background: #f00;
	color: #fff;
	border-color: #f00;
}

/* Animation mượt mà */
@keyframes vap-pop {
	0% {
		transform: scale(0.8);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

/* Tương thích màn hình di động (Responsive) */
@media screen and (max-width: 768px) {
	#vap-popup-container {
		width: 90%;
		max-height: 80vh;
	}
	#vap-popup-container img {
		max-height: 80vh;
	}
	#vap-close-btn {
		top: 5px;
		right: 5px;
		width: 25px;
		height: 25px;
		line-height: 21px;
		font-size: 16px;
	}
	.vap-text-wrap {
		padding: 20px;
		min-width: unset;
	}
}
