/**
 * Faceted search / discover — AISG brand (navy #0B1F3A / red #E8352A).
 * Layout follows the reference: left facet rail + right results grid.
 */
.oe-search {
	--oe-navy: #0b1f3a;
	--oe-red: #e8352a;
	--oe-border: #e3e8ef;
	--oe-muted: #5a6a82;
	--oe-bg-soft: #f7f9fc;
	color: var(--oe-navy);
}
.oe-search__form {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 1.75rem;
	align-items: start;
}

/* Facets */
.oe-search__facets {
	background: #fff;
	border: 1px solid var(--oe-border);
	border-radius: 14px;
	padding: 1.25rem;
	position: sticky;
	top: 1rem;
}
.oe-search__facets-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.oe-search__facets-head strong { font-size: 1.05rem; }
.oe-search__clear { color: var(--oe-red); font-size: 0.85rem; text-decoration: none; }
.oe-search__clear:hover { text-decoration: underline; }
.oe-search__facet { border-top: 1px solid var(--oe-border); padding-top: 0.9rem; margin-top: 0.9rem; }
.oe-search__facet:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.oe-search__facet-title {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--oe-muted);
	margin: 0 0 0.6rem;
}
.oe-search__facet-list { list-style: none; margin: 0; padding: 0; }
.oe-search__opt {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.28rem 0;
	cursor: pointer;
	font-size: 0.92rem;
}
.oe-search__opt-name { flex: 1 1 auto; }
.oe-search__opt-count { color: var(--oe-muted); font-size: 0.8rem; }

/* Main */
.oe-search__bar { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.oe-search__input {
	flex: 1 1 auto;
	padding: 0.7rem 1rem;
	border: 1px solid var(--oe-border);
	border-radius: 10px;
	font-size: 0.95rem;
}
.oe-search__input:focus { outline: none; border-color: var(--oe-navy); box-shadow: 0 0 0 3px rgba(11,31,58,0.12); }
.oe-search__submit {
	background: var(--oe-red);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 0 1.4rem;
	font-weight: 700;
	cursor: pointer;
}
.oe-search__submit:hover { background: #c92a20; }
.oe-search__count { color: var(--oe-muted); font-weight: 600; margin: 0 0 1rem; }

.oe-search__results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}
.oe-search__card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--oe-border);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: box-shadow 0.15s, transform 0.15s;
}
.oe-search__card:hover { box-shadow: 0 8px 24px rgba(11,31,58,0.10); transform: translateY(-2px); }
.oe-search__card-media img { display: block; width: 100%; height: 150px; object-fit: cover; }
.oe-search__card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.oe-search__card-when { color: var(--oe-red); font-size: 0.8rem; font-weight: 700; }
.oe-search__card-title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.oe-search__card-loc { color: var(--oe-muted); font-size: 0.85rem; }
.oe-search__empty { color: var(--oe-muted); padding: 2rem 0; }

@media (max-width: 780px) {
	.oe-search__form { grid-template-columns: 1fr; }
	.oe-search__facets { position: static; }
}

/* When (date/time range) filter */
.oe-search__facet--when { margin-bottom: 1rem; }
.oe-search__daterow { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.55rem; }
.oe-search__datelabel { font-size: 0.8rem; font-weight: 600; color: var(--oe-muted); }
.oe-search__facet--when input[type="date"],
.oe-search__facet--when input[type="time"] {
	width: 100%; box-sizing: border-box; padding: 0.45rem 0.5rem;
	border: 1px solid var(--oe-border); border-radius: 8px; font: inherit; background: #fff; color: var(--oe-navy);
}
.oe-search__sublabel { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--oe-muted); margin: 0 0 0.4rem; }
.oe-search__sublabel--time { margin-top: 0.75rem; }
.oe-search__datehint { font-size: 0.75rem; color: var(--oe-muted); margin: 0.2rem 0 0; }

/* Pagination (shared markup produced by paginate_links) */
.oe-pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin: 1.75rem 0 0.5rem; }
.oe-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.4rem; height: 2.4rem; padding: 0 0.7rem;
	border: 1px solid var(--oe-border); border-radius: 8px;
	color: var(--oe-navy); background: #fff; text-decoration: none; font-weight: 700; font-size: 0.9rem; line-height: 1;
}
.oe-pagination .page-numbers:hover { background: var(--oe-bg-soft); }
.oe-pagination .page-numbers.current { background: var(--oe-navy); color: #fff; border-color: var(--oe-navy); }
.oe-pagination .page-numbers.dots { border: 0; background: transparent; }

/* Upcoming / Past / All segmented toggle */
.oe-search__seg { display: flex; width: 100%; border: 1px solid var(--oe-border); border-radius: 999px; overflow: hidden; background: #fff; }
.oe-search__seg-opt { flex: 1 1 0; min-width: 0; position: relative; }
.oe-search__seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.oe-search__seg-opt span {
	display: block; text-align: center; padding: 0.45rem 0.25rem; font-size: 0.78rem; font-weight: 700;
	color: var(--oe-muted); cursor: pointer; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oe-search__seg-opt.is-active span { background: var(--oe-navy); color: #fff; }
.oe-search__seg-opt input:focus-visible + span { outline: 2px solid var(--oe-navy); outline-offset: -2px; }
.oe-search__facet--whentoggle { margin-bottom: 1rem; }
