/* Waterfall Grid Frontend Styles */

.waterfall-grid-container {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	overflow: hidden;
	/* Prevent horizontal scroll/gray areas */
}

.waterfall-grid-container * {
	box-sizing: border-box;
}

/* Controls */
.waterfall-controls {
	margin-bottom: 30px;
	background: #f9f9f9;
	padding: 20px;
	border-radius: 5px;
}

.waterfall-search {
	margin-bottom: 20px;
}

.waterfall-search-input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	box-sizing: border-box;
}

.waterfall-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
	margin-bottom: 15px;
}

.waterfall-filter-group {
	flex: 1;
	min-width: 200px;
}

.waterfall-filter-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	font-size: 14px;
}

.waterfall-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.waterfall-filter-chip {
	background: white;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.waterfall-filter-chip:hover {
	border-color: #0073aa;
	color: #0073aa;
}

.waterfall-filter-chip.active {
	background: #0073aa;
	border-color: #0073aa;
	color: white;
}

.waterfall-clear-filters {
	background: #f5f5f5;
	border: 1px solid #ddd;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.3s ease;
}

.waterfall-clear-filters:hover {
	background: #e5e5e5;
}

.waterfall-results-count {
	font-size: 13px;
	color: #666;
	margin-top: 10px;
}

/* Grid Layout - Handled by tile-styles.css now */
/* .waterfall-grid styles removed to avoid conflict */

/* Item Styles - Handled by tile-styles.css now */
/* .waterfall-item styles removed to avoid conflict */

/* Loading State */
.waterfall-item.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Skeleton Loading Placeholders */
.skeleton-item {
	pointer-events: none;
}

.skeleton-tile {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.skeleton-image {
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 */
	background: #e9ecef;
	position: relative;
	overflow: hidden;
}

.skeleton-content {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.skeleton-badge {
	width: 70px;
	height: 20px;
	border-radius: 3px;
}

.skeleton-line {
	height: 14px;
	border-radius: 4px;
}

.skeleton-line-title {
	width: 80%;
	height: 18px;
}

.skeleton-line-text {
	width: 100%;
}

.skeleton-line-text.short {
	width: 60%;
}

/* Shimmer animation for all skeleton elements */
.skeleton-image,
.skeleton-badge,
.skeleton-line {
	background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
	background-size: 200% 100%;
	animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Empty State */
.waterfall-empty-state {
	text-align: center;
	padding: 60px 20px;
	color: #999;
}

.waterfall-empty-icon {
	margin-bottom: 16px;
}

.waterfall-empty-icon svg {
	opacity: 0.5;
}

.waterfall-empty-message {
	font-size: 18px;
	font-weight: 500;
	color: #666;
	margin: 0 0 8px;
}

.waterfall-empty-suggestion {
	font-size: 14px;
	color: #999;
	margin: 0;
}