/**
 * YouTube Gallery Frontend Styles
 */

.viajeporai-yt-gallery-wrapper {
	width: 100%;
	margin: 20px 0;
}

/* Search Bar */
.viajeporai-yt-gallery-search {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.viajeporai-yt-gallery-search-input {
	flex: 1;
	min-width: 200px;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

.viajeporai-yt-gallery-search-input:focus {
	outline: none;
	border-color: #FF0000;
	box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.viajeporai-yt-gallery-search-btn {
	padding: 10px 20px;
	background-color: #FF0000;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.3s ease;
}

.viajeporai-yt-gallery-search-btn:hover {
	background-color: #cc0000;
}

/* Gallery Grid */
.viajeporai-yt-gallery-grid {
	display: grid;
	gap: 20px;
	margin-bottom: 30px;
	grid-template-columns: repeat(3, 1fr);
}

.viajeporai-yt-gallery-col-1 {
	grid-template-columns: 1fr;
}

.viajeporai-yt-gallery-col-2 {
	grid-template-columns: repeat(2, 1fr);
}

.viajeporai-yt-gallery-col-3 {
	grid-template-columns: repeat(3, 1fr);
}

.viajeporai-yt-gallery-col-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Responsive Grid */
@media (max-width: 1024px) {
	.viajeporai-yt-gallery-col-4 {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.viajeporai-yt-gallery-col-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.viajeporai-yt-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
	
	.viajeporai-yt-gallery-col-1,
	.viajeporai-yt-gallery-col-2,
	.viajeporai-yt-gallery-col-3,
	.viajeporai-yt-gallery-col-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.viajeporai-yt-gallery-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.viajeporai-yt-gallery-col-1,
	.viajeporai-yt-gallery-col-2,
	.viajeporai-yt-gallery-col-3,
	.viajeporai-yt-gallery-col-4 {
		grid-template-columns: 1fr;
	}
	
	.viajeporai-yt-gallery-search {
		flex-direction: column;
	}
	
	.viajeporai-yt-gallery-search-input {
		min-width: 100%;
	}
}

/* Gallery Item */
.viajeporai-yt-gallery-item {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

.viajeporai-yt-gallery-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Thumbnail */
.viajeporai-yt-gallery-item-thumbnail {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	overflow: hidden;
	background: #000;
}

.viajeporai-yt-gallery-item-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.viajeporai-yt-gallery-item:hover .viajeporai-yt-gallery-item-thumbnail img {
	transform: scale(1.05);
}

/* Overlay */
.viajeporai-yt-gallery-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

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

/* Play Button */
.viajeporai-yt-gallery-item-play {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.viajeporai-yt-gallery-item-play:hover {
	transform: scale(1.1);
}

/* Duration Badge */
.viajeporai-yt-gallery-item-duration {
	position: absolute;
	bottom: 10px;
	right: 10px;
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

/* Content */
.viajeporai-yt-gallery-item-content {
	padding: 15px;
}

.viajeporai-yt-gallery-item-title {
	margin: 0 0 8px 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.viajeporai-yt-gallery-item-meta {
	margin: 0 0 8px 0;
	font-size: 12px;
	color: #666;
}

.viajeporai-yt-gallery-item-description {
	margin: 0;
	font-size: 12px;
	color: #999;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Load More Button */
.viajeporai-yt-gallery-load-more {
	text-align: center;
	margin: 30px 0;
}

.viajeporai-yt-gallery-load-more-btn {
	padding: 12px 30px;
	background-color: #FF0000;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	transition: background-color 0.3s ease;
}

.viajeporai-yt-gallery-load-more-btn:hover {
	background-color: #cc0000;
}

.viajeporai-yt-gallery-load-more-btn:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

/* Modal */
.viajeporai-yt-gallery-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	animation: fadeIn 0.3s ease;
}

.viajeporai-yt-gallery-modal.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.viajeporai-yt-gallery-modal-content {
	position: relative;
	background-color: #000;
	width: 90%;
	max-width: 900px;
	border-radius: 8px;
	overflow: hidden;
}

.viajeporai-yt-gallery-modal-close {
	position: absolute;
	right: 20px;
	top: 20px;
	font-size: 32px;
	font-weight: bold;
	color: white;
	cursor: pointer;
	z-index: 10000;
	transition: color 0.3s ease;
}

.viajeporai-yt-gallery-modal-close:hover {
	color: #FF0000;
}

.viajeporai-yt-gallery-modal-iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Empty State */
.viajeporai-yt-gallery-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-size: 16px;
}

/* Error State */
.viajeporai-yt-gallery-error {
	background-color: #fee;
	border: 1px solid #fcc;
	color: #c33;
	padding: 15px;
	border-radius: 4px;
	margin-bottom: 20px;
}

/* Loading State */
.viajeporai-yt-gallery-loading {
	opacity: 0.6;
	pointer-events: none;
}

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

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

.viajeporai-yt-gallery-item {
	animation: slideIn 0.3s ease;
}
