/**
 * Plugin Name: PixelcraftDev Elementor Addon
 * Author: Supapong Sakulkoo (K.Auu)
 * Author URI: https://supapongai.com
 * License: Commercial - Proprietary
 * Copyright: (c) 2026 PixelcraftDev. All rights reserved.
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 */
/**
 * Pixelcraft Smart Gallery Styles
 */

.pixelcraft-smart-gallery-wrapper {
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.pixelcraft-smart-gallery-wrapper * {
	box-sizing: inherit;
}

.pixelcraft-gallery-tabs-nav {
	display: flex;
	gap: 15px;
	width: 100%;
	
	/* Horizontal Scroll Logic for Mobile */
	overflow-x: auto;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	padding: 0; /* Default 0 as requested */
	margin: 0;
}

.pixelcraft-gallery-tabs-nav::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.pixelcraft-gallery-tab-btn {
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	flex-shrink: 0;
}

.pixelcraft-gallery-tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.pixelcraft-gallery-tab-image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pixelcraft-gallery-tab-image img {
	height: auto;
	object-fit: contain;
}

/* 1. Underlying Style (Default) */
.pixelcraft-gallery-tabs-underline .pixelcraft-gallery-tabs-nav {
	border-bottom: 1px solid #eaeaea;
	padding-bottom: 10px;
}
.pixelcraft-gallery-tabs-underline .pixelcraft-gallery-tab-btn {
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 5px 0 10px 0;
	margin-bottom: -11px; /* Overlap border */
	color: #777;
}
.pixelcraft-gallery-tabs-underline .pixelcraft-gallery-tab-btn.active {
	border-color: #333;
	color: #333;
}

/* 2. Pill Style */
.pixelcraft-gallery-tabs-pill .pixelcraft-gallery-tab-btn {
	background: #f1f1f1;
	border: none;
	padding: 10px 24px;
	border-radius: 50px;
	color: #666;
}
.pixelcraft-gallery-tabs-pill .pixelcraft-gallery-tab-btn.active {
	background: #333;
	color: #fff;
}

/* 3. Square Style */
.pixelcraft-gallery-tabs-square .pixelcraft-gallery-tab-btn {
	background: #f1f1f1;
	border: none;
	padding: 10px 24px;
	border-radius: 4px;
	color: #666;
}
.pixelcraft-gallery-tabs-square .pixelcraft-gallery-tab-btn.active {
	background: #333;
	color: #fff;
}

/* --- GALLERY CONTENT & GRID --- */
.pixelcraft-gallery-content {
	position: relative;
	width: 100%;
}

.pixelcraft-gallery-tab-content {
	display: none;
	animation: pixelcraftGalleryFadeIn 0.5s ease-in-out;
}

.pixelcraft-gallery-tab-content.active {
	display: block;
}

@keyframes pixelcraftGalleryFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.pixelcraft-gallery-grid {
	display: grid;
	/* Column count is controlled dynamically via Elementor Widget */
	gap: 20px; /* Gap controlled dynamically via Elementor Widget */
	width: 100%;
}

/* --- IMAGE STYLING --- */
.pixelcraft-gallery-item {
	display: block;
	position: relative;
	width: 100%;
	overflow: hidden;
	cursor: pointer;
	border-radius: 6px;
}

.pixelcraft-gallery-item img {
	display: block;
	width: 100%;
	/* Height and object-fit controlled dynamically via Elementor Widget */
	transition: transform 0.5s ease;
}

/* Hover Overlay logic */
.pixelcraft-gallery-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.pixelcraft-gallery-item-overlay i {
	color: #fff;
	font-size: 24px;
	transform: scale(0.5);
	transition: transform 0.3s ease;
}

.pixelcraft-gallery-item:hover .pixelcraft-gallery-item-overlay {
	opacity: 1;
}

.pixelcraft-gallery-item:hover .pixelcraft-gallery-item-overlay i {
	transform: scale(1);
}

.pixelcraft-gallery-item:hover img {
	transform: scale(1.05); /* Slight zoom effect standard for modern galleries */
}

/* --- PAGINATION STYLES --- */
.pixelcraft-gallery-pagination-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.pixelcraft-gallery-pagination-btn,
.pixelcraft-gallery-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	cursor: pointer;
	border: 1px solid #ddd;
	background: #fff;
	color: #333;
	transition: all 0.3s ease;
	line-height: 1;
	min-width: 40px;
	text-decoration: none;
}

.pixelcraft-gallery-pagination-btn.active {
	cursor: default;
}

.pixelcraft-gallery-item.pixelcraft-hidden-item {
	display: none !important;
}

.pixelcraft-gallery-load-more {
	margin: 0 auto;
	gap: 10px; /* Default gap between icon and text */
}

/* Icon specific alignment in button */
.pixelcraft-gallery-load-more i,
.pixelcraft-gallery-load-more svg {
	display: inline-block;
}

