/**
 * Floor Plan Popup/Lightbox Styles
 *
 * @package CJDNG
 * @since 1.0.0
 */

/* Button Styles */
.cjdng-floor-plan-download {
	margin: 1.5rem 0;
}

.cjdng-floor-plan-button {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 2rem;
	background-color: var(--e-global-color-primary, #DD183B);
	color: #ffffff;
	text-decoration: none;
	border: none;
	border-radius: 4px;
	transition: background-color 0.3s ease;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}

.cjdng-floor-plan-button:hover,
.cjdng-floor-plan-button:focus {
	background-color: color-mix(in srgb, var(--e-global-color-primary, #DD183B) 80%, black);
	color: #ffffff;
	text-decoration: none;
	outline: none;
}

.cjdng-floor-plan-button .button-text {
	font-size: 1rem;
}

.cjdng-floor-plan-button .file-info {
	font-size: 0.85rem;
	opacity: 0.9;
	font-weight: normal;
}

/* Icon before button text */
.cjdng-floor-plan-button .button-text::before {
	content: "📄 ";
	margin-right: 0.5rem;
}

/* Modal/Popup Styles */
.cjdng-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
}

.cjdng-modal.active {
	display: block;
}

.cjdng-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(4px);
}

.cjdng-modal-content {
	position: relative;
	width: 90%;
	max-width: 1200px;
	height: 90vh;
	margin: 5vh auto;
	background-color: #ffffff;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cjdng-modal-close {
	position: absolute;
	top: -15px;
	right: -15px;
	width: 40px;
	height: 40px;
	background-color: #ffffff;
	color: #333;
	border: none;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	z-index: 10;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cjdng-modal-close:hover {
	background-color: #e74c3c;
	color: #ffffff;
	transform: rotate(90deg);
}

.cjdng-modal-body {
	flex: 1;
	overflow: auto;
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cjdng-modal-footer {
	padding: 15px 20px;
	border-top: 1px solid #e0e0e0;
	text-align: center;
	background-color: #f8f9fa;
	border-radius: 0 0 8px 8px;
}

/* PDF Viewer */
.cjdng-pdf-viewer {
	width: 100%;
	height: 100%;
	min-height: 600px;
}

/* Image Viewer */
.cjdng-image-viewer {
	max-width: 100%;
	max-height: 100%;
	height: auto;
	width: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

/* Download Link in Modal */
.cjdng-download-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	background-color: var(--e-global-color-primary, #DD183B);
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	transition: background-color 0.3s ease;
}

.cjdng-download-link:hover {
	background-color: color-mix(in srgb, var(--e-global-color-primary, #DD183B) 80%, black);
	color: #ffffff;
	text-decoration: none;
}

.cjdng-download-link .download-icon {
	font-size: 1.2rem;
}

/* Prevent body scroll when modal is open */
body.cjdng-modal-open {
	overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.cjdng-modal-content {
		width: 95%;
		height: 95vh;
		margin: 2.5vh auto;
	}

	.cjdng-modal-close {
		top: 10px;
		right: 10px;
	}

	.cjdng-modal-body {
		padding: 10px;
	}

	.cjdng-pdf-viewer {
		min-height: 400px;
	}
}
