/* ============================================================================
   AppGetters Lightbox Gallery Styles
   ============================================================================ */

:root {
	--sk-lightbox-primary: #667eea;
	--sk-lightbox-dark: #1a1a1a;
	--sk-lightbox-light: #f9f9f9;
	--sk-lightbox-border: #e0e0e0;
	--sk-lightbox-shadow: rgba(0, 0, 0, 0.2);
	--sk-lightbox-overlay: rgba(0, 0, 0, 0.85);
}

/* ============================================================================
   Gallery Grid Wrapper
   ============================================================================ */

.appgetters-gallery-wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
	margin: 20px 0;
	width: 100%;
}

.appgetters-gallery-wrapper[data-gap="10"] {
	gap: 10px;
}

.appgetters-gallery-wrapper[data-gap="15"] {
	gap: 15px;
}

.appgetters-gallery-wrapper[data-gap="25"] {
	gap: 25px;
}

.appgetters-gallery-wrapper[data-gap="30"] {
	gap: 30px;
}

/* ============================================================================
   Gallery Items
   ============================================================================ */

.appgetters-gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: var(--sk-lightbox-light);
	border: 1px solid var(--sk-lightbox-border);
	transition: all 0.3s ease;
}

.appgetters-gallery-item:hover {
	border-color: var(--sk-lightbox-primary);
	box-shadow: 0 4px 15px var(--sk-lightbox-shadow);
	transform: translateY(-2px);
}

.appgetters-gallery-item a {
	display: block;
	text-decoration: none;
	cursor: pointer;
}

.appgetters-gallery-image {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.appgetters-gallery-item:hover .appgetters-gallery-image {
	transform: scale(1.05);
}

/* ============================================================================
   Lightbox Modal
   ============================================================================ */

.appgetters-lightbox-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: var(--sk-lightbox-overlay);
	animation: fadeIn 0.3s ease;
	overflow: auto;
}

.appgetters-lightbox-modal.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ============================================================================
   Lightbox Content
   ============================================================================ */

.appgetters-lightbox-content {
	position: relative;
	background: white;
	border-radius: 12px;
	max-width: 90vw;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 10px 40px var(--sk-lightbox-shadow);
	animation: slideIn 0.3s ease;
	display: flex;
	flex-direction: column;
}

@keyframes slideIn {
	from {
		transform: scale(0.9);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

.appgetters-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	flex: 1;
}

/* ============================================================================
   Lightbox Caption
   ============================================================================ */

.appgetters-lightbox-caption {
	padding: 15px 20px;
	background: var(--sk-lightbox-light);
	border-top: 1px solid var(--sk-lightbox-border);
	text-align: center;
	font-size: 14px;
	color: var(--sk-lightbox-dark);
	line-height: 1.6;
}

/* ============================================================================
   Lightbox Controls
   ============================================================================ */

.appgetters-lightbox-controls {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	pointer-events: none;
}

.appgetters-lightbox-prev,
.appgetters-lightbox-next {
	pointer-events: auto;
	position: relative;
	z-index: 10;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	color: var(--sk-lightbox-dark);
	transition: all 0.3s ease;
	box-shadow: 0 2px 10px var(--sk-lightbox-shadow);
}

.appgetters-lightbox-prev:hover,
.appgetters-lightbox-next:hover {
	background: var(--sk-lightbox-primary);
	color: white;
	transform: scale(1.1);
}

.appgetters-lightbox-prev::before {
	content: "‹";
	font-size: 32px;
	font-weight: bold;
}

.appgetters-lightbox-next::before {
	content: "›";
	font-size: 32px;
	font-weight: bold;
}

/* ============================================================================
   Lightbox Close Button
   ============================================================================ */

.appgetters-lightbox-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	color: var(--sk-lightbox-dark);
	transition: all 0.3s ease;
	z-index: 15;
	box-shadow: 0 2px 10px var(--sk-lightbox-shadow);
}

.appgetters-lightbox-close:hover {
	background: var(--sk-lightbox-primary);
	color: white;
	transform: rotate(90deg);
}

.appgetters-lightbox-close::before {
	content: "×";
	font-size: 36px;
	font-weight: bold;
	line-height: 1;
}

/* ============================================================================
   Lightbox Counter
   ============================================================================ */

.appgetters-lightbox-counter {
	position: absolute;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 8px 15px;
	border-radius: 20px;
	font-size: 13px;
	z-index: 10;
}

/* ============================================================================
   Responsive Grid
   ============================================================================ */

@media (max-width: 1200px) {
	.appgetters-gallery-wrapper {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}
}

@media (max-width: 768px) {
	.appgetters-gallery-wrapper {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 15px;
	}

	.appgetters-lightbox-prev,
	.appgetters-lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}

	.appgetters-lightbox-prev::before,
	.appgetters-lightbox-next::before {
		font-size: 24px;
	}

	.appgetters-lightbox-close {
		width: 35px;
		height: 35px;
		font-size: 24px;
		top: 10px;
		right: 10px;
	}

	.appgetters-lightbox-close::before {
		font-size: 28px;
	}

	.appgetters-lightbox-content {
		max-width: 95vw;
		max-height: 95vh;
		border-radius: 8px;
	}
}

@media (max-width: 480px) {
	.appgetters-gallery-wrapper {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.appgetters-lightbox-controls {
		padding: 0 10px;
	}

	.appgetters-lightbox-prev,
	.appgetters-lightbox-next {
		width: 35px;
		height: 35px;
		font-size: 16px;
	}

	.appgetters-lightbox-close {
		width: 32px;
		height: 32px;
		font-size: 20px;
	}

	.appgetters-lightbox-caption {
		padding: 12px 15px;
		font-size: 13px;
	}

	.appgetters-lightbox-counter {
		bottom: 10px;
		padding: 6px 12px;
		font-size: 12px;
	}
}
