/* =========================================================================
   Taxonomy Archive — Shared styles (header, search, toggle, grid, pagination)
   ========================================================================= */

/* --- Header ------------------------------------------------------------ */
.astro-tax-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

.astro-tax-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.astro-tax-header__title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--astro-txt-1, #1a1a1a);
	margin: 0;
	line-height: 1.3;
}

.astro-tax-header__count {
	font-size: 0.875rem;
	color: var(--astro-txt-2, #64748b);
	margin-left: 8px;
}

/* --- Search bar -------------------------------------------------------- */
.astro-tax-search {
	display: flex;
	gap: 8px;
	margin: 0;
}

.astro-tax-search__box {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--astro-bg-1, #fff);
	border: 1px solid var(--astro-border-1, #e2e8f0);
	border-radius: 10px;
	padding: 0 12px;
	transition: border-color 0.2s var(--astro-ease, ease);
}

.astro-tax-search__box:focus-within {
	border-color: var(--astro-primary, #0C447C);
}

.astro-tax-search__icon {
	flex-shrink: 0;
	color: var(--astro-txt-2, #64748b);
}

.astro-tax-search__input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-size: 0.9rem;
	padding: 10px 0;
	color: var(--astro-txt-1, #1a1a1a);
}

.astro-tax-search__input::placeholder {
	color: var(--astro-txt-2, #94a3b8);
}

.astro-tax-search__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	color: var(--astro-txt-2, #64748b);
	transition: background 0.15s, color 0.15s;
	text-decoration: none;
}

.astro-tax-search__clear:hover {
	background: var(--astro-bg-2, #f1f5f9);
	color: var(--astro-txt-1, #1a1a1a);
}

.astro-tax-search__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 18px;
	border: none;
	border-radius: 10px;
	background: var(--astro-primary, #0C447C);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s var(--astro-ease, ease);
}

.astro-tax-search__btn:hover {
	background: color-mix(in srgb, var(--astro-primary, #0C447C) 85%, #000);
}

/* --- View toggle ------------------------------------------------------- */
.astro-tax-view-toggle {
	display: flex;
	gap: 4px;
	background: var(--astro-bg-2, #f1f5f9);
	border-radius: 8px;
	padding: 3px;
}

.astro-tax-view-toggle__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: none;
	background: transparent;
	border-radius: 6px;
	color: var(--astro-txt-2, #64748b);
	cursor: pointer;
	transition: background 0.2s var(--astro-ease, ease),
	            color 0.2s var(--astro-ease, ease);
}

.astro-tax-view-toggle__btn:hover {
	color: var(--astro-txt-1, #1a1a1a);
	background: var(--astro-bg-1, #fff);
}

.astro-tax-view-toggle__btn.is-active {
	background: var(--astro-bg-1, #fff);
	color: var(--astro-primary, #0C447C);
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* --- Jobs grid / list -------------------------------------------------- */
.astro-tax-jobs {
	display: grid;
	gap: 16px;
}

.astro-tax-jobs--grid {
	grid-template-columns: repeat(2, 1fr);
}

.astro-tax-jobs--list {
	grid-template-columns: 1fr;
}

@media (max-width: 767px) {
	.astro-tax-jobs--grid {
		grid-template-columns: 1fr;
	}

	.astro-tax-search__btn span {
		display: none;
	}
}

/* --- Pagination -------------------------------------------------------- */
.astro-tax-pagination {
	margin-top: 32px;
	display: flex;
	justify-content: center;
}

.astro-tax-pagination .page-numbers {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.astro-tax-pagination .page-numbers li {
	display: inline-flex;
}

.astro-tax-pagination .page-numbers a,
.astro-tax-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--astro-txt-2, #64748b);
	text-decoration: none;
	transition: background 0.2s var(--astro-ease, ease),
	            color 0.2s var(--astro-ease, ease);
}

.astro-tax-pagination .page-numbers a:hover {
	background: var(--astro-bg-2, #f1f5f9);
	color: var(--astro-txt-1, #1a1a1a);
}

.astro-tax-pagination .page-numbers .current {
	background: var(--astro-primary, #0C447C);
	color: #fff;
}

.astro-tax-pagination .page-numbers .prev,
.astro-tax-pagination .page-numbers .next {
	color: var(--astro-txt-2, #64748b);
}

.astro-tax-pagination .page-numbers .prev:hover,
.astro-tax-pagination .page-numbers .next:hover {
	background: var(--astro-bg-2, #f1f5f9);
	color: var(--astro-txt-1, #1a1a1a);
}

/* --- Empty state ------------------------------------------------------- */
.astro-tax-empty {
	text-align: center;
	padding: 48px 16px;
	color: var(--astro-txt-2, #64748b);
}

.astro-tax-empty svg {
	margin-bottom: 12px;
	opacity: .5;
}

.astro-tax-empty p {
	font-size: 0.95rem;
	margin: 0;
}

/* --- Favorites actions ------------------------------------------------- */
.astro-fav-actions {
	text-align: center;
	margin-top: 24px;
}

.astro-fav-actions__clear {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border: 1px solid #fca5a5;
	border-radius: 8px;
	background: #fff;
	color: #dc2626;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.astro-fav-actions__clear:hover {
	background: #fef2f2;
}
