/* Blog filter bar */
#filterbar {
	width: 100%;
	margin: 2rem 0;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	padding: 1.5rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Search Bar */
.search-container {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.search-header h3 {
	margin: 0;
	color: white;
	font-size: 1.2rem;
	font-weight: 600;
}

.search-input-container {
	position: relative;
	width: 100%;
}

#searchInput {
	width: 100%;
	padding: 0.75rem 1rem 0.75rem 2.5rem;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	color: white;
	font-size: 1rem;
	transition: all 0.3s ease;
}

#searchInput:focus {
	outline: none;
	border-color: #f56565;
	background: rgba(0, 0, 0, 0.4);
	box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

#searchInput::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.search-icon {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(255, 255, 255, 0.6);
	pointer-events: none;
}

.clear-search {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 50%;
	transition: all 0.3s ease;
	display: none;
}

.clear-search:hover {
	color: #f56565;
	background: rgba(245, 101, 101, 0.1);
}

.clear-search.visible {
	display: block;
}

.search-stats {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.7);
}

/* Archive */
.archive-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.archive-header h3 {
	margin: 0;
	color: white;
	font-size: 1.2rem;
	font-weight: 600;
}

.toggle-btn {
	padding: 0.5rem 1rem;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: rgba(255, 255, 255, 0.8);
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
}

.toggle-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: white;
}

.archive-list {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.archive-list.expanded {
	max-height: 400px;
	overflow-y: auto;
}

.archive-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 2rem;
	break-inside: avoid;
}

.archive-list li {
	margin: 0.5rem 0;
	break-inside: avoid;
	page-break-inside: avoid;
}

.archive-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 1px solid transparent;
}

.archive-item:hover {
	background: rgba(245, 101, 101, 0.1);
	border-color: rgba(245, 101, 101, 0.3);
}

.archive-item.active {
	background: rgba(245, 101, 101, 0.2);
	border-color: #f56565;
}

.archive-month {
	color: #000000;
	font-weight: 500;
	flex: 1;
}

.archive-count {
	background: rgba(245, 101, 101, 0.8);
	color: white;
	padding: 0.2rem 0.6rem;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 600;
	min-width: 24px;
	text-align: center;
}

/* Filter actions */
.filter-actions {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

#clearFilter, #clearSearch {
	padding: 0.5rem 1.5rem;
	background: #f56565;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.3s ease;
}

#clearFilter:hover, #clearSearch:hover {
	background: #e53e3e;
	transform: translateY(-1px);
}

.filter-status {
	margin: 1rem 0;
	padding: 0.75rem;
	background: rgba(245, 101, 101, 0.1);
	border-left: 3px solid #f56565;
	border-radius: 4px;
	display: none;
}

.filter-status.active {
	display: block;
}

/* Search highlighting */
.search-highlight {
	background: rgba(245, 101, 101, 0.3);
	padding: 0.1rem 0.2rem;
	border-radius: 2px;
	font-weight: 600;
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.25rem;
	margin: 3rem 0;
	flex-wrap: wrap;
}

.pagination button {
	padding: 0.25rem 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(0, 0, 0, 0.2);
	color: rgba(255, 255, 255, 0.9);
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 28px;
	height: 28px;
	font-size: 0.8rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pagination button:hover:not(:disabled) {
	background: rgba(245, 101, 101, 0.2);
	border-color: rgba(245, 101, 101, 0.4);
	transform: translateY(-1px);
}

.pagination button.active {
	background: #f56565;
	border-color: #f56565;
	color: white;
	font-weight: 600;
}

.pagination button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.pagination-info {
	margin: 0 1rem;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.85rem;
}

/* Loading state */
.posts.loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
	.archive-header {
		flex-direction: column;
		gap: 1rem;
		align-items: stretch;
	}

	.search-header {
		flex-direction: column;
		gap: 1rem;
		align-items: stretch;
	}

	.archive-list ul {
		columns: 1;
	}

	.archive-item {
		padding: 0.75rem;
	}

	.filter-actions {
		flex-direction: column;
	}

	.pagination {
		gap: 0.2rem;
	}

	.pagination button {
		padding: 0.2rem 0.4rem;
		font-size: 0.75rem;
		min-width: 24px;
		height: 24px;
	}

	.pagination-info {
		font-size: 0.8rem;
	}
}
