/**
 * Realisations Filter Styles
 *
 * @package Studio K7
 * @since 1.0.0
 */

/* Filters Wrapper */
.filters-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

/* Filter Buttons */
.filter-button {
	position: relative;
    padding: 5px 10px;
    font-weight: 500;
    border: 1px solid #797979;
	color: #797979;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: 10px;
	background: transparent;
	font-family: "Raleway", sans-serif;
	font-size: 17px;
}

.filter-button:hover {
	background-color: #797979;
	color: #fff;
}

.filter-button.active {
	color: #fff;
	background-color: #797979;
}

/* Visual feedback for cumulative filtering */
.filter-button.active::before {
	content: '✓ ';
	font-weight: bold;
}

/* Filter Count Badge */
.filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	line-height: 1;
	box-shadow: 0px 0px 0px 1px inset #797979;
}

.filter-button.active .filter-count {
	background-color: rgb(217 217 217);
	color: #000;
}

/* Loading Indicator */
.filter-loading {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background-color: #f9f9f9;
	border-radius: 8px;
	font-size: 0.95rem;
	color: #666;
}

.filter-loading .spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top-color: #000;
	border-radius: 50%;
	animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Filter Messages */
.filter-message {
	padding: 1rem 1.5rem;
	border-radius: 8px;
	font-size: 0.95rem;
	margin-top: 1rem;
}

.filter-message.success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.filter-message.error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.filter-message.info {
	background-color: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* Posts List Transition */
.wp-block-post-template {
	transition: opacity 0.2s ease;
}

.wp-block-post-template.is-filtering {
	opacity: 0.5;
}

/* Hide filtered posts */
.wp-block-post-template .filter-hidden {
	display: none !important;
}

/* No Results Message */
.wp-block-post-template .no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem 1rem;
	font-size: 1.1rem;
	color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
	.filters-wrapper {
		gap: 0.5rem;
	}

	.filter-button {
		padding: 0.6rem 1.2rem;
		font-size: 0.9rem;
	}

	.filter-count {
		min-width: 1.3rem;
		height: 1.3rem;
		font-size: 0.7rem;
	}
}

@media (max-width: 480px) {
	.filter-button {
		padding: 0.5rem 1rem;
		font-size: 0.85rem;
	}
}
