/**
 * Ninja Forms Views Single Entry Popup Styles
 */

/* Popup overlay and container */
.nf-single-entry-popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
}

.nf-single-entry-popup.nf-popup-active {
	display: block;
	opacity: 1;
	visibility: visible;
}

/* Overlay background */
.nf-single-entry-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	cursor: pointer;
}

/* Popup container */
.nf-single-entry-popup-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Close button */
.nf-single-entry-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	background: #f5f5f5;
	border: none;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.nf-single-entry-popup-close:hover {
	background: #e0e0e0;
	color: #333;
}

.nf-single-entry-popup-close:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Content area */
.nf-single-entry-popup-content {
	padding: 30px;
	overflow-y: auto;
	max-height: calc(90vh - 60px);
}

.nf-single-entry-popup-content .nf-view-field-cont {
	border: 1px solid #ccc;
	padding: 10px;
	margin: 10px;
}

/* Loading state */
.nf-single-entry-popup-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
}

.nf-popup-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0073aa;
	border-radius: 50%;
	animation: nf-popup-spin 1s linear infinite;
	margin-bottom: 15px;
}

@keyframes nf-popup-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.nf-single-entry-popup-loading p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

/* Error state */
.nf-single-entry-popup-error {
	padding: 40px 20px;
	text-align: center;
	color: #dc3545;
}

.nf-single-entry-popup-error p {
	margin: 0;
}

/* Body class when popup is open */
body.nf-popup-open {
	overflow: hidden;
}

/* Entry content styles within popup */
.single-entry-popup-content {
	padding: 0;
}

.single-entry-popup-content .nf-view-row {
	margin-bottom: 15px;
}

.single-entry-popup-content .nf-view-field-cont {
	margin-bottom: 15px;
}

.single-entry-popup-content .nf-view-field-label {
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
	font-size: 14px;
}

.single-entry-popup-content .nf-view-field-value {
	color: #555;
	font-size: 14px;
	line-height: 1.5;
}

/* Popup link styling */
.nf-single-entry-popup-link {
	cursor: pointer;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
	.nf-single-entry-popup-container {
		width: 95%;
		max-height: 95vh;
		border-radius: 4px;
	}

	.nf-single-entry-popup-content {
		padding: 20px;
		max-height: calc(95vh - 50px);
	}

	.nf-single-entry-popup-close {
		width: 36px;
		height: 36px;
		font-size: 24px;
		top: 8px;
		right: 8px;
	}
}

@media screen and (max-width: 480px) {
	.nf-single-entry-popup-container {
		width: 100%;
		height: 100%;
		max-height: 100vh;
		border-radius: 0;
		top: 0;
		left: 0;
		transform: none;
	}

	.nf-single-entry-popup-content {
		padding: 15px;
		max-height: calc(100vh - 50px);
	}
}
