article {
	text-align: center;
}

/*#SearchResultsColumn, #SearchColumn {
	display: inline-block;
	vertical-align: top;
	text-align: left;
	flex-grow: 1;
	width: 300px;
}*/

#SearchColumn label {
	display: block;
	text-align: left;
}

.objectLinkDiv {
	color: var(--primary);
}

.objectLinkDiv a {
	text-decoration: inherit;
	color: inherit !important;
}

.objectLinkDiv a:visited {
	color: inherit !important;
}

.childCategory {
    margin-left: 25px !important;
    font-size: 0.9em;
    color: #666; /* Subtle color for children */
}

/* Ensure labels don't collapse */
/*#SearchColumn label {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}*/

.metadataGroup:not(:has(> *)) + hr {
    display: none;
}


/* NEW BIT */

#SearchListContainer {
    display: flex;
    align-items: flex-start;
	justify-content: center;
    gap: 20px;
}

#SearchResultsColumn {
    flex: 0 1 auto;
    min-width: 0; /* prevents flex blowout on long text */
    text-align: left;
	order: 1;
}

#SearchColumn {
    flex: 0 0 300px;
    text-align: left;
	order: 2;
}

#SearchColumn label {
    display: block;
    text-align: left;
}

@media (max-width: 600px) {
    #SearchListContainer {
        flex-direction: column;
    }

    #SearchColumn {
        flex: 0 0 auto;
        width: 100%;
        order: 1;
    }

    #SearchResultsColumn {
        width: 100%;
        order: 2;
    }
}




.objectHoverCard {
	position: fixed;
	z-index: 2000;
	max-width: min(260px, calc(100vw - 32px));
	background: #fff;
	border: 1px solid var(--gray);
	border-radius: var(--rounded);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	padding: 10px;
	text-align: left;
	pointer-events: none;
	font-size: 0.85em;
}

.objectHoverCard.hidden {
	display: none;
}

.objectHoverCard img {
	max-width: 100%;
	max-height: 140px;
	display: block;
	margin-bottom: 6px;
	border-radius: var(--rounded);
}

.objectHoverCardTitle {
	font-weight: bold;
	margin-bottom: 2px;
}

.objectHoverCard ul {
	margin: 0;
	padding-left: 18px;
}

html[data-bs-theme=dark] .objectHoverCard {
	background: var(--darkBg);
	border-color: var(--darkBorder);
	color: var(--lightText);
}

.objectHoverCardName {
	font-weight: bold;
	font-size: 1.1em;
	margin-bottom: 6px;
	text-align: center;
}

/* The top line above the results: "Sort By" and "Then By". Each is a label and a drop-down with its Reverse checkbox
   underneath the drop-down. (Clear All Filters is in the right-hand column, under the search bar.) */
#SearchTopBar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 8px 24px;
	margin: 0 0 16px;
}

#SortOptions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 8px 24px;
}

#SortOptions .sortControl {
	display: inline-grid;
	grid-template-columns: auto auto;
	align-items: center;
	justify-items: start;
	gap: 4px 6px;
}

#SortOptions .sortReverse {
	grid-column: 2;
}

#SortOptions label {
	margin: 0;
	white-space: nowrap;
}

#SortOptions select {
	max-width: 100%;
}

#ClearAllFiltersRow {
	margin: 8px 0 12px;
	text-align: left;
}

/* Filter sections in the right-hand column: each starts closed, any number can be open. A dot beside the heading says a
   closed section is filtering (see _updateFilterMarks). */
.filterSection {
	border-bottom: 1px solid var(--gray);
}

.filterSection > summary {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	cursor: pointer;
	list-style: none;
	text-align: left;
}

.filterSection > summary::-webkit-details-marker {
	display: none;
}

.filterSection > summary::before {
	content: '\25B8';
	display: inline-block;
	width: 1em;
	text-align: center;
	transition: transform 0.15s;
}

.filterSection[open] > summary::before {
	transform: rotate(90deg);
}

.filterSection > summary h3 {
	margin: 0;
	font-size: 1.25em;
}

.filterChanged > summary h3 {
	font-weight: bold;
}

.filterActiveMark {
	color: var(--primary);
	font-size: 1.4em;
	line-height: 1;
}

.filterBody {
	padding: 0 0 10px 1em;
}

/* A heading above each group when the list is sorted by something other than name */
.sortHeader {
	font-weight: bold;
	margin: 14px 0 4px;
	padding-bottom: 2px;
	border-bottom: 1px solid var(--gray);
	text-align: left;
}

.sortHeader:first-child {
	margin-top: 0;
}
