/**
 * Frontend Lightbox Styles for Gallery
 * 
 * @package NextGEN_Artwork_Connector
 * @since 2.0.3
 */

/* Lightbox Overlay */
.nggac-frontend-lightbox-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.9);
	z-index: 999999;
	overflow-y: auto;
	animation: nggacFadeIn 0.3s ease-in-out;
}

.nggac-frontend-lightbox-overlay.active {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Lightbox Container */
.nggac-frontend-lightbox {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	max-width: 1200px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	position: relative;
	animation: nggacSlideUp 0.3s ease-out;
	overflow: hidden;
}

/* Close Button */
.nggac-frontend-lightbox-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nggac-frontend-lightbox-close:hover {
	background: #ffffff;
	transform: rotate(90deg);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nggac-frontend-lightbox-close::before,
.nggac-frontend-lightbox-close::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 2px;
	background: #333;
	top: 50%;
	left: 50%;
}

.nggac-frontend-lightbox-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.nggac-frontend-lightbox-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* Image Section */
.nggac-frontend-lightbox-image {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f9f9f9;
	padding: 40px;
	min-width: 0;
	overflow: hidden;
}

.nggac-frontend-lightbox-image img {
	max-width: 100%;
	max-height: 70vh;
	height: auto;
	width: auto;
	display: block;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	object-fit: contain;
}

/* Sidebar */
.nggac-frontend-lightbox-sidebar {
	width: 400px;
	background: #ffffff;
	padding: 40px 30px;
	overflow-y: auto;
	border-left: 1px solid #e5e5e5;
	display: flex;
	flex-direction: column;
}

.nggac-frontend-lightbox-sidebar h2 {
	margin: 0 0 10px 0;
	font-size: 28px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.nggac-frontend-lightbox-sidebar .artwork-artist {
	font-size: 18px;
	color: #666;
	margin: 0 0 25px 0;
	font-weight: 500;
}

.nggac-frontend-lightbox-sidebar .artwork-description {
	color: #444;
	font-size: 15px;
	line-height: 1.8;
	margin: 0 0 30px 0;
	padding: 20px 0px;
	background: #fFF;
    border:1px solid #e5e5e5
	border-radius: 8px;
	max-height: 300px;
	overflow-y: auto;
}

.nggac-frontend-lightbox-sidebar .artwork-description:empty {
	display: none;
}

/* Artwork Details */
.artwork-details-section {
	padding: 10px 0px;
}

.artwork-details-section h3 {
	margin: 0 0 15px 0;
	font-size: 16px;
	font-weight: 600;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.artwork-detail-item {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid #e5e7eb;
}

.artwork-detail-item:last-child {
	border-bottom: none;
}

.artwork-detail-label {
	font-weight: 600;
	color: #6b7280;
	font-size: 14px;
}

.artwork-detail-value {
	color: #1f2937;
	font-size: 14px;
	text-align: right;
}

/* Artist Link - Hidden */
.artwork-artist {
	display: none;
}

.artwork-artist a.artist-link {
	color: #2ea3f2;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s;
}

.artwork-artist a.artist-link:hover {
	color: #1d7ec2;
	text-decoration: underline;
}

.artwork-artist strong {
	color: #333;
	font-weight: 600;
}

/* Artwork Content Section */
.artwork-description {
	margin-bottom: 20px;
}

.artwork-description h3 {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
}

.artwork-description .artist-says {
	font-size: 16px;
	font-weight: 600;
	color: #555;
	margin-bottom: 12px;
}

.artwork-description .artwork-content-text {
	color: #555;
	line-height: 1.7;
	font-size: 15px;
}

.artwork-description .artwork-content-text p {
	margin-bottom: 12px;
}

/* Links Section (Artist, Artwork links) */
.artwork-details-section {
	margin: 20px 0;
	padding: 0;
}

.artwork-details-section .artwork-link {
	display: block;
	padding: 10px 14px;
	margin: 6px 0;
	background: #ffffff;
	color: #2ea3f2;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 16px;
	transition: all 0.3s;
	border: 1px solid #dbeafe;
}

.artwork-details-section .artwork-link:hover {
	background: #f0f9ff;
	color: #1d7ec2;
	transform: translateX(5px);
}

/* Social Share Section */
.artwork-links-section {
	margin: 20px 0 0 0;
	padding: 15px;
	background: #f9fafb;
	border-radius: 8px;
	border-top: 1px solid #e0e0e0;
}

.artwork-share-section .share-title {
	margin: 0 0 15px 0;
	font-weight: 600;
	color: #333;
	font-size: 16px;
}

.artwork-share-section .share-buttons {
	display: flex;
	gap: 10px;
	align-items: center;
}

.artwork-share-section .share-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-weight: 700;
	font-size: 18px;
	transition: transform 0.2s;
	color: #fff;
}

.artwork-share-section .share-btn:hover {
	transform: scale(1.1);
}

.artwork-share-section .share-facebook {
	background: #1877f2;
}

.artwork-share-section .share-instagram {
	background: transparent;
	width: 40px;
	height: 40px;
}

.artwork-share-section .share-instagram img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.artwork-share-section .share-email {
	background: #666;
}

.artwork-share-section .share-copy {
	background: #0a3ecf;
	border: none;
	cursor: pointer;
}

.artwork-share-section .share-copy:hover {
	background: #7c3aed;
}

/* Back to Gallery Button */
.nggac-back-to-gallery {
	margin-top: auto;
	padding-top: 25px;
}

.nggac-back-to-gallery .button {
	width: 100%;
	padding: 15px 20px;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
	text-align: center;
	display: block;
	text-decoration: none;
}

.nggac-back-to-gallery .button:hover {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Animations */
@keyframes nggacFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes nggacSlideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive Design */
@media screen and (max-width: 992px) {
	.nggac-frontend-lightbox {
		flex-direction: column;
		max-height: 90vh;
	}
	
	.nggac-frontend-lightbox-image {
		padding: 30px 20px 20px 20px;
		min-height: 300px;
	}
	
	.nggac-frontend-lightbox-image img {
		max-height: 50vh;
	}
	
	.nggac-frontend-lightbox-sidebar {
		width: 100%;
		border-left: none;
		border-top: 1px solid #e5e5e5;
		padding: 25px 20px;
		max-height: 50vh;
	}
}

@media screen and (max-width: 768px) {
	.nggac-frontend-lightbox {
		margin: 10px;
		border-radius: 8px;
	}
	
	.nggac-frontend-lightbox-image {
		padding: 40px 15px 15px 15px;
	}
	
	.nggac-frontend-lightbox-sidebar {
		padding: 20px 15px;
	}
	
	.nggac-frontend-lightbox-sidebar h2 {
		font-size: 22px;
	}
	
	.nggac-frontend-lightbox-sidebar .artwork-artist {
		font-size: 16px;
	}
	
	.artwork-details-section,
	.artwork-links-section {
		padding: 15px;
	}
}

@media screen and (max-width: 480px) {
	.nggac-frontend-lightbox-overlay.active {
		padding: 0;
	}
	
	.nggac-frontend-lightbox {
		margin: 0;
		border-radius: 0;
		max-height: 100vh;
	}
	
	.nggac-frontend-lightbox-close {
		top: 10px;
		right: 10px;
		width: 36px;
		height: 36px;
	}
}

/* Custom Scrollbar for Sidebar */
.nggac-frontend-lightbox-sidebar::-webkit-scrollbar {
	width: 8px;
}

.nggac-frontend-lightbox-sidebar::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.nggac-frontend-lightbox-sidebar::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.nggac-frontend-lightbox-sidebar::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Loading State */
.nggac-frontend-lightbox.loading .nggac-frontend-lightbox-image::after {
	content: '';
	position: absolute;
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2563eb;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
