/**
 * Public styles for GBH Photo Gallery
 *
 * @package    GBH_Photo_Gallery
 * @subpackage GBH_Photo_Gallery/public/css
 */

/* ===========================
	FIXES
	========================== */

.flickr_gallery-template-default #elementor-lightbox-slideshow-single-img {
	display: none !important;
}

.pswp__button {
	border: 0 !important;
	min-width:50px;
}

.pswp__button:hover {
	background:transparent;
}


/* ===========================
   Gallery Overview
   =========================== */


.gbh-gallery-item-date svg, 
.gbh-gallery-item-count svg, 
.gbh-gallery-single-date svg, 
.gbh-gallery-single-count svg {
	width: 18px;
}

.gbh-gallery-thumbnail {
	color: black;
}

.gbh-gallery-overview {
	max-width: 1140px;
	margin: 0 auto;
}

.gbh-gallery-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 30px;
	margin-bottom: 40px;
}

.gbh-gallery-item {
	position: relative;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

.gbh-gallery-item-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.gbh-gallery-item-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #f5f5f5;
}

.gbh-gallery-item-image img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

.gbh-gallery-item-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
}

.gbh-gallery-item-placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

.gbh-gallery-item-title {
	margin: 7px 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	color: #333;
}

.gbh-gallery-item-date,
.gbh-gallery-item-count {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: #666;
	margin-bottom: 6px;
}

.gbh-gallery-item-date .dashicons,
.gbh-gallery-item-count .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Pagination */
.gbh-gallery-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 40px;
}

.gbh-gallery-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	text-decoration: none;
	transition: all 0.2s ease;
}

.gbh-gallery-pagination .page-numbers:hover {
	background: #f5f5f5;
	border-color: #999;
}

.gbh-gallery-pagination .page-numbers.current {
	background: #667eea;
	border-color: #667eea;
	color: #fff;
	font-weight: 600;
}

.gbh-gallery-pagination .page-numbers .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ===========================
   Single Album
   =========================== */

.gbh-gallery-single {
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px 10px;
}

.gbh-gallery-single-header {
	margin-bottom: 20px;
}

.gbh-gallery-single-title {
	margin-bottom: 10px !important;
}

.gbh-gallery-single-meta {
	display: flex;
	gap: 30px;
	margin-bottom: 10px;
}

.gbh-gallery-single-date,
.gbh-gallery-single-count {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	color: #666;
}

.gbh-gallery-single-date .dashicons,
.gbh-gallery-single-count .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.gbh-gallery-single-description {
	max-width: 800px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.6;
	color: #555;
}

/* Slider */
.gbh-gallery-slider {
	position: relative;
	margin-bottom: 30px;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.gbh-gallery-slider-container {
	position: relative;
	width: 100%;
	aspect-ratio: 3/2;
	overflow: hidden;
}

.gbh-gallery-slider-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.gbh-gallery-slider-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transform: translateX(100%);
	transition: opacity 0.5s ease, transform 0.5s ease;
	pointer-events: none;
	visibility: hidden;
}

.gbh-gallery-slider-item.active {
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
	visibility: visible;
	z-index: 1;
}

.gbh-gallery-slider-item a {
	display: block;
	width: 100%;
	height: 100%;
}

.gbh-gallery-slider-item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* Slider Navigation Buttons */
.gbh-gallery-slider-prev,
.gbh-gallery-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: #fff;
	opacity:0.7;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: opacity 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gbh-gallery-slider-prev {
	left: 20px;
}

.gbh-gallery-slider-next {
	right: 20px;
}

.gbh-gallery-slider-prev:hover,
.gbh-gallery-slider-next:hover {
	background: #fff;
	opacity:1;
	transition: opacity 0.3s ease;
}

.gbh-gallery-slider-prev:hover svg,
.gbh-gallery-slider-next:hover svg {
	fill: #c36;
}

.gbh-gallery-slider-prev .dashicons,
.gbh-gallery-slider-next .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #333;
}

/* Slider Counter */
.gbh-gallery-slider-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	z-index: 10;
}

/* Thumbnails */
.gbh-gallery-thumbnails {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 15px;
	margin-top: 30px;
}

.gbh-gallery-thumbnail {
	position: relative;
	aspect-ratio: 1;
	border: 3px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: #f5f5f5;
	padding: 0;
	transition: all 0.3s ease;
}

.gbh-gallery-thumbnail:hover {
	border-color: #999;
	transform: scale(1.05);
}

.gbh-gallery-thumbnail.active {
	border-color: #667eea;
	box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.gbh-gallery-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Footer */
.gbh-gallery-single-footer {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #ddd;
	text-align: center;
}

.pswp__button:hover {
	background: transparent !important;
}

.gbh-gallery-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	color: #000;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
	border: 1px solid black;
	font-family: "Inter Tight", Sans-serif;
	font-size: 16px;
	font-weight: 500;
}


.gbh-gallery-back-link:hover {
	background: #000;
	color:#fff;
}

.gbh-gallery-back-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Empty State */
.gbh-gallery-single-empty {
	text-align: center;
	padding: 60px 20px;
	color: #999;
	font-size: 18px;
}

/* Archive Header */
.gbh-gallery-archive-wrapper {
	max-width: 1140px;
	margin: 0 auto;
}

.gbh-gallery-archive-header {
	text-align: center;
	margin-bottom: 40px;
}

.gbh-gallery-archive-title {
	font-size: 42px;
	font-weight: 700;
	margin: 0 0 15px 0;
	color: #333;
}

.gbh-gallery-archive-description {
	font-size: 18px;
	color: #666;
	max-width: 800px;
	margin: 0 auto;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 992px) {
	.gbh-gallery-grid {
		grid-template-columns: 1fr 1fr 1fr;
		gap: 20px;
	}

	
	.gbh-gallery-thumbnails {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 12px;
	}
}

@media (max-width: 768px) {
	.gbh-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
	
	
	.gbh-gallery-item-title {
		font-size: 16px;
	}
	
	.gbh-gallery-single-meta {
		flex-direction: column;
		gap: 10px;
	}
	
	.gbh-gallery-slider-prev,
	.gbh-gallery-slider-next {
		width: 40px;
		height: 40px;
	}
	
	.gbh-gallery-slider-prev {
		left: 10px;
	}
	
	.gbh-gallery-slider-next {
		right: 10px;
	}
	
	.gbh-gallery-thumbnails {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
		gap: 10px;
	}
}

@media (max-width: 480px) {
	.gbh-gallery-grid {
		grid-template-columns: 1fr;
	}
	
	.gbh-gallery-overview,
	.gbh-gallery-single {
		padding: 20px 15px;
	}
	
	.gbh-gallery-archive-title {
		font-size: 32px;
	}

}

/* ===========================
   PhotoSwipe Conflict Prevention
   =========================== */

/* Prevent other lightboxes from triggering on our images */
.gbh-gallery-lightbox-trigger {
	pointer-events: auto !important;
}

/* Ensure our lightbox has priority */
.gbh-gallery-slider-item a[data-pswp-src] {
	cursor: zoom-in;
}

/* ===========================
   PhotoSwipe Thumbnail Strip
   =========================== */

.pswp__thumbnails {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 100px;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 10px;
	gap: 10px;
	z-index: 1050;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.pswp__thumbnails::-webkit-scrollbar {
	height: 6px;
}

.pswp__thumbnails::-webkit-scrollbar-track {
	background: transparent;
}

.pswp__thumbnails::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
}

.pswp__thumbnails::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.5);
}

.pswp__thumbnail {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	cursor: pointer;
	border: 3px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	transition: all 0.3s ease;
	background: #000;
}

.pswp__thumbnail:hover {
	border-color: rgba(255, 255, 255, 0.5);
	transform: scale(1.05);
}

.pswp__thumbnail--active {
	border-color: #667eea;
	box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.5);
}

.pswp__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Hide thumbnails on small screens */
@media (max-height: 500px) {
	.pswp__thumbnails {
		display: none;
	}
}
