/*
 * Our Collection - Athlone Castle
 * Loaded only on /our-collection/ pages and Coeli object pages (body.ac-collection).
 * Colours and type come from the Our Exhibitions page. See docs/design-tokens.md.
 *
 * Note: the site has a global rule "p { font: 20px/28px bembo !important }".
 * Any paragraph that needs a different size or style here must use !important too.
 *
 * Sections:
 *   1. Tokens
 *   2. Collection page: search box
 *   3. Collection page: result count, sort controls
 *   4. Collection page: filters
 *   5. Collection page: object cards
 *   6. Object page
 *   7. Landing page: "Search the collection" row
 *   8. Tablet and mobile
 *   9. Advanced search (search page)
 */

/* 1. Tokens ------------------------------------------------------------- */

body.ac-collection {
	--ac-burgundy: #b31b34;
	--ac-gold: #c5ab6b;
	--ac-text: #322420;
	--ac-grey: #f4f4f4;
	--ac-line: #ddd6c8;
	--ac-white: #ffffff;

	/* The plugin's own accent colour is light blue. Use the site burgundy instead. */
	--corporative-color: var(--ac-burgundy);
}

/* 2. Search box --------------------------------------------------------- */

.ac-collection .coeli-search-keyword,
.ac-collection .coeli-list-results {
	position: static;
}

.ac-collection .coeli-search-keyword {
	display: block;
	margin: 0 0 25px;
}

.ac-collection .coeli-search-keyword .coeli-search-form {
	display: flex;
	justify-content: center;
	max-width: 640px;
	margin: 0 auto;
	border-radius: 0;
}

.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-input {
	flex: 1 1 auto;
	float: none;
	width: auto;
	height: 46px;
	padding: 8px 14px;
	border: 1px solid var(--ac-line);
	border-right: 0;
	border-radius: 0;
	background: var(--ac-white);
	color: var(--ac-text);
	font-family: inherit;
	font-size: 18px;
}

.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-input::placeholder {
	color: #8a7f78;
}

.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-button {
	flex: 0 0 auto;
	width: auto;
	height: 46px;
	margin: 0;
	padding: 0 25px;
	border: 0;
	border-radius: 0;
	background: var(--ac-gold);
	background-image: none;
	color: var(--ac-white);
	font-family: Poppins, sans-serif;
	font-size: 16px;
	line-height: 46px;
	text-indent: 0;
	text-transform: uppercase;
	overflow: visible;
	cursor: pointer;
}

.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-button:hover,
.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-button:focus {
	background-color: var(--ac-burgundy);
}

/* 3. Result count and sort controls ------------------------------------- */

/* The result count sits above the sort row. Keep a little space between them.
   The plugin pins this row to the top of the screen while scrolling, on a layer above the
   site header, so the count and the search chips showed over the menu. Let it scroll away. */
.ac-collection .coeli-list-results > header {
	position: static;
	z-index: auto;
	margin-bottom: 12px;
}

.ac-collection .coeli-list-results header .coeli-num-items {
	height: auto;
	margin: 0;
}

.ac-collection .coeli-list-results header .coeli-num-items p {
	font-size: 18px !important;
	text-align: right;
	color: var(--ac-text);
}

.ac-collection .coeli-list-results header .coeli-num-items p span {
	color: var(--ac-burgundy);
}

/* Active search terms and filters ("Silver x", "Trophy x") beside the result count.
   The plugin shows them as white underlined text on light blue, which is hard to read. */
.ac-collection .coeli-list-results > header {
	align-items: center;
	gap: 8px 15px;
}

.ac-collection .coeli-list-results .coeli-selected-facets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
}

.ac-collection .coeli-list-results .coeli-selected-facets a {
	margin: 0;
	padding: 6px 12px;
	border-radius: 0;
	background: var(--ac-burgundy);
	color: var(--ac-white) !important;
	font-family: Poppins, sans-serif;
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
}

.ac-collection .coeli-list-results .coeli-selected-facets a:hover,
.ac-collection .coeli-list-results .coeli-selected-facets a:focus {
	background: #8f1529;
}

/* The same filter, marked as selected inside the Filters list. */
.ac-collection .coeli-list-results ul.facets li.coeli-selected-facet a {
	border-radius: 0;
	text-decoration: none;
}

/* The sort row and the Filters heading share one height, so their underlines line up
   and the first filter starts level with the first row of cards. */
.ac-collection .coeli-control-results {
	box-sizing: border-box;
	height: 56px;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 15px;
	padding: 0 0 10px;
	margin: 0 0 20px;
	border-bottom: 1px solid var(--ac-line);
}

.ac-collection .coeli-control-results label {
	font-family: Poppins, sans-serif;
	font-size: 14px;
	letter-spacing: 0;
	color: var(--ac-text);
}

/* The theme removes the built-in arrow from every dropdown, so draw one (gold, like the filter arrows). */
.ac-collection .coeli-control-results select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: auto;
	height: 36px;
	padding: 4px 34px 4px 10px;
	border: 1px solid var(--ac-line);
	border-radius: 0;
	background-color: var(--ac-white);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%23c5ab6b'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 11px 7px;
	color: var(--ac-text);
	font-family: Poppins, sans-serif;
	font-size: 14px;
	cursor: pointer;
}

/* Ascending / Descending only does something once a sort field is chosen (Title, Accession
   number, Production date). With "Relevance" it changes nothing. The plugin hides it in that
   case, but only after it has been used once, so it seemed to vanish after choosing a direction.
   Hide it from the start whenever Relevance is selected, and show it for the other choices. */
.ac-collection .coeli-control-results #sort-result:has(option[value=""]:checked) + select {
	display: none;
}

/* 4. Filters ------------------------------------------------------------- */

.ac-collection .coeli-list-results .coeli-result-list-container {
	gap: 50px;
	align-items: flex-start;
}

.ac-collection .coeli-list-results .coeli-sidebar-facets {
	flex: 0 0 240px;
}

.ac-collection .coeli-list-col {
	flex: 1 1 0;
	min-width: 0;
}

.ac-collection .coeli-list-results .coeli-sidebar-facets h2 {
	box-sizing: border-box;
	display: flex;
	align-items: flex-end;
	height: 56px;
	margin: 0 0 20px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--ac-line);
	color: var(--ac-burgundy);
	font-family: inherit;
	font-size: 20px;
	font-weight: 400;
	line-height: 30px;
	text-transform: uppercase;
}

.ac-collection .coeli-list-results .coeli-sidebar-facets ul.facets {
	color: var(--ac-text);
	font-family: inherit;
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 0;
}

.ac-collection .coeli-list-results .coeli-sidebar-facets ul.facets li a {
	color: var(--ac-text);
}

.ac-collection .coeli-list-results .coeli-sidebar-facets ul.facets li a:hover {
	color: var(--ac-burgundy);
}

.ac-collection .coeli-list-results .coeli-sidebar-facets > ul.facets > li::after {
	color: var(--ac-gold);
}

.ac-collection .coeli-list-results .coeli-sidebar-facets ul.facets li .items-facet li {
	font-size: 16px;
}

/* 5. Object cards -------------------------------------------------------- */

.ac-collection .coeli-list-results .coeli-result-list-container ul.coeli-result-list {
	gap: 30px;
	row-gap: 30px;
}

.ac-collection .coeli-list-results ul.coeli-result-list.grid .grid-item {
	width: calc((100% - 60px) / 3);
	margin: 0;
	padding: 0 0 20px;
	border: 0;
	background: var(--ac-white);
}

.ac-collection .coeli-list-results ul.coeli-result-list li a {
	display: block;
	color: var(--ac-text);
	text-decoration: none;
}

.ac-collection .coeli-list-results ul.coeli-result-list li a:hover {
	text-decoration: none;
}

.ac-collection .coeli-list-results ul.coeli-result-list li figure {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 2;
	margin: 0 0 10px;
	background: var(--ac-white);
	overflow: hidden;
}

.ac-collection .coeli-list-results ul.coeli-result-list li figure img {
	width: 100%;
	height: 100%;
	max-height: none;
	margin: 0;
	object-fit: contain;
}

.ac-collection .coeli-list-results ul.coeli-result-list li p,
.ac-collection .coeli-list-results ul.coeli-result-list li h3 {
	margin: 0;
	padding: 0 15px;
}

/* Title: same look as the tile titles on Our Exhibitions. */
.ac-collection .coeli-list-results ul.coeli-result-list li .coeli-label {
	margin-bottom: 6px;
	color: var(--ac-burgundy);
	font-size: 20px;
	font-weight: 400;
	line-height: 30px;
	text-transform: uppercase;
}

.ac-collection .coeli-list-results ul.coeli-result-list li a:hover .coeli-label {
	text-decoration: underline;
}

/* The plugin writes this class as coeli-objectNames (capital N). Both spellings are covered. */
.ac-collection .coeli-list-results ul.coeli-result-list li .coeli-objectNames,
.ac-collection .coeli-list-results ul.coeli-result-list li .coeli-objectnames {
	margin-bottom: 6px;
	font-size: 18px !important;
	font-style: italic !important;
	line-height: 26px !important;
}

/* Description: three lines, then cut off. */
.ac-collection .coeli-list-results ul.coeli-result-list li .coeli-content-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	font-size: 18px !important;
	line-height: 26px !important;
}

/* Space between the last row of cards and whatever follows (the "Back to Our Collection" link). */
.ac-collection .ac-collection-list .coeli-list-results,
.ac-collection .ac-collection-list .coeli-list-group {
	margin-bottom: 45px;
}

/* "Show more" link under the cards on the search page. */
.ac-collection .colei-list-results-footer {
	margin-top: 30px;
	padding: 0;
	text-align: center;
}

/* The plugin draws a round icon above the link. Use a plain button instead. */
.ac-collection .colei-list-results-footer a.coeli-more-results::before {
	display: none;
}

.ac-collection .colei-list-results-footer a.coeli-more-results {
	display: inline-block;
	padding: 12px 25px 11px;
	border-radius: 0;
	background: var(--ac-gold);
	color: var(--ac-white);
	font-family: Poppins, sans-serif;
	font-size: 16px;
	line-height: 16px;
	text-decoration: none;
	text-transform: uppercase;
}

.ac-collection .colei-list-results-footer a.coeli-more-results:hover,
.ac-collection .colei-list-results-footer a.coeli-more-results:focus {
	background: var(--ac-burgundy);
	color: var(--ac-white);
}

/* 6. Object page --------------------------------------------------------- */

/* The7 lays the page out as content plus a sidebar column. Object pages have no sidebar, so use the full width. */
.ac-collection-object .wf-container-main > #content.coeli-fitxa {
	grid-column: 1 / -1;
	width: 100%;
}

/* The theme's title band prints an empty heading on object pages. The real title is printed below it. */
.ac-collection-object .page-title .page-title-head {
	display: none;
}

.ac-collection-object .coeli-fitxa {
	max-width: 1300px;
	margin: 0 auto;
	padding: 40px 20px 60px;
	color: var(--ac-text);
}

.ac-collection-object .coeli-nav-fitxes {
	padding: 0 0 15px;
}

.ac-collection-object .ac-object-heading {
	margin: 0 0 25px;
	padding: 0 0 15px;
	border-bottom: 1px solid var(--ac-line);
}

.ac-collection-object .ac-object-back {
	margin: 0 0 6px;
	font-family: Poppins, sans-serif !important;
	font-size: 14px !important;
	line-height: 22px !important;
	text-transform: uppercase;
}

.ac-collection-object .ac-object-back a {
	color: var(--ac-gold);
	text-decoration: none;
}

.ac-collection-object .ac-object-back a:hover {
	color: var(--ac-burgundy);
}

.ac-collection-object .ac-object-title {
	margin: 0;
	color: var(--ac-burgundy);
	font-size: 36px;
	font-weight: 400;
	line-height: 46px;
	text-transform: none;
}

/* Image on the left, labelled fields on the right. */
.ac-collection-object .coeli-fitxa-container {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 40px;
	margin: 0;
	padding: 0;
}

.ac-collection-object .coeli-fitxa-sidebar {
	flex: 0 0 55%;
	max-width: 55%;
}

.ac-collection-object .coeli-fitxa-contents {
	flex: 1 1 0;
	min-width: 0;
}

.ac-collection-object .coeli-fitxa-sidebar img {
	max-width: 100%;
	height: auto;
}

/* Main image. The plugin fixes the image area at 300px high, which is small for the main picture. */
.ac-collection-object .coeli-gallery-main {
	height: 520px;
}

/* No image. Objects without a public image still get an empty image area from the plugin.
   Hide it, and let the fields sit under the title at a comfortable reading width.
   When the image is made public in Coeli, the image area comes back by itself. */
.ac-collection-object .coeli-fitxa-sidebar .coeli-gallery-wrapper:not(:has(.swiper-slide)) {
	display: none;
}

.ac-collection-object .coeli-fitxa-sidebar:not(:has(.swiper-slide)):not(:has(> :not(.coeli-gallery-wrapper))) {
	display: none;
}

.ac-collection-object .coeli-fitxa-container:not(:has(.swiper-slide)) .coeli-fitxa-contents {
	max-width: 820px;
}

/* Zoom icon. Clicking the image already opens it larger (the plugin's lightbox);
   this adds a magnifier in the corner so visitors can tell. Only shown when there is an image. */
.ac-collection-object .coeli-gallery-main .inner-slide a[data-featherlight] {
	display: block;
	position: relative;
	height: 100%;
	cursor: zoom-in;
}

.ac-collection-object .coeli-gallery-main .inner-slide a[data-featherlight]::after {
	content: "";
	position: absolute;
	top: 12px;
	right: 12px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.92);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b31b34' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 22px 22px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	pointer-events: none;
	transition: background-color 0.2s;
}

.ac-collection-object .coeli-gallery-main .inner-slide a[data-featherlight]:hover::after,
.ac-collection-object .coeli-gallery-main .inner-slide a[data-featherlight]:focus::after {
	background-color: var(--ac-gold);
}

/* The "Record details" heading is not needed above the fields. */
.ac-collection-object .coeli-object-data > h3 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.ac-collection-object .coeli-object-data ul li {
	margin: 0 0 16px;
}

/* Label above its value, as on the reference site. */
.ac-collection-object .coeli-object-data dl {
	display: block;
	margin: 0;
}

.ac-collection-object .coeli-object-data li > dl > dt {
	min-width: 0;
	max-width: none;
	margin: 0 0 2px;
	color: var(--ac-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 28px;
}

.ac-collection-object .coeli-object-data dd {
	margin: 0;
	font-size: 18px;
	line-height: 26px;
}

/* Grouped fields. Coeli nests Material and Technique inside a "Materials and techniques"
   group and indents them. Show them as ordinary fields: no group heading, no indent. */
.ac-collection-object .coeli-object-data .coeli-embedded .coeli-embedded-title {
	display: none;
}

.ac-collection-object .coeli-object-data .coeli-embedded .coeli-embedded-item {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.ac-collection-object .coeli-object-data .coeli-embedded .coeli-embedded-item:last-child {
	margin-bottom: 0;
}

.ac-collection-object .coeli-object-data .coeli-embedded-item dt {
	min-width: 0;
	max-width: none;
	margin: 0 0 2px;
	color: var(--ac-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 28px;
}

.ac-collection-object .coeli-object-data dd a {
	color: var(--ac-burgundy);
	text-decoration: none;
}

.ac-collection-object .coeli-object-data dd a:hover {
	text-decoration: underline;
}

/* 7. Landing page: "Search the collection" row ---------------------------- */

/* The row's own spacing (set in WPBakery) left too much room above the sentence.
   These bring it to about 75px above the sentence and 28px between sentence and button. */
body.ac-collection .ac-collection-search-link {
	padding-top: 0 !important;
}

body.ac-collection .ac-collection-search-link > .wpb_column > .vc_column-inner {
	padding-top: 0 !important;
}

body.ac-collection .ac-collection-search-link .wpb_text_column {
	margin-bottom: 18px !important;
}

/* Burgundy button, so it stands apart from the gold "Find out more" buttons on the tiles. */
body.ac-collection .ac-collection-search-link a.dt-btn {
	background: var(--ac-burgundy) !important;
	border-color: var(--ac-burgundy) !important;
	color: var(--ac-white) !important;
}

body.ac-collection .ac-collection-search-link a.dt-btn:hover,
body.ac-collection .ac-collection-search-link a.dt-btn:focus {
	background: #8f1529 !important;
	border-color: #8f1529 !important;
}

/* 8. Tablet and mobile --------------------------------------------------- */

@media (max-width: 1024px) {
	.ac-collection .coeli-list-results ul.coeli-result-list.grid .grid-item {
		width: calc((100% - 30px) / 2);
	}

	.ac-collection-object .coeli-fitxa-container {
		gap: 30px;
	}

	.ac-collection-object .coeli-fitxa-sidebar {
		flex-basis: 50%;
		max-width: 50%;
	}

	.ac-collection-object .coeli-gallery-main {
		height: 420px;
	}
}

/* Below 1024px the plugin stacks the page: filters first, then the sort row, then the cards.
   The sort row no longer sits beside the Filters heading, so it does not need the fixed
   height that lines the two up on desktop. Left fixed, the dropdowns spill over the first card. */
@media (max-width: 1023px) {
	.ac-collection .coeli-list-results .coeli-sidebar-facets {
		margin-bottom: 25px;
	}

	.ac-collection .coeli-control-results {
		height: auto;
		align-items: center;
		justify-content: flex-start;
	}

	/* The plugin's grid/list switch. The cards are designed as a grid only. */
	.ac-collection .coeli-control-results .coeli-result-change-display {
		display: none;
	}
}

@media (max-width: 767px) {
	.ac-collection .coeli-list-results ul.coeli-result-list.grid .grid-item {
		width: 100%;
	}

	/* Phone: "Sort by:" on its own line, the two dropdowns side by side below it. */
	.ac-collection .coeli-control-results form {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px 10px;
		width: 100%;
	}

	.ac-collection .coeli-control-results form label {
		flex: 0 0 100%;
		margin: 0;
	}

	.ac-collection .coeli-control-results form select {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
	}

	.ac-collection-object .coeli-fitxa {
		padding: 25px 15px 40px;
	}

	.ac-collection-object .ac-object-title {
		font-size: 28px;
		line-height: 36px;
	}

	.ac-collection-object .coeli-fitxa-container {
		flex-direction: column;
	}

	.ac-collection-object .coeli-fitxa-sidebar {
		flex-basis: auto;
		max-width: 100%;
		width: 100%;
	}

	.ac-collection-object .coeli-gallery-main {
		height: 340px;
	}
}

/* Memories of Athlone banner (page 9759, since 19 November 2026; it was on Hero Objects, 9753,
   before). The photo is 4:3: a bell on the left, an open copybook in the middle. On tall,
   narrow screens the banner crops to the middle and shows only the book, so shift the crop
   left to bring the bell and slate into view.
   If this page ever gets a different banner photo, remove this rule. */
@media (max-width: 1023px) {
	.page-id-9759 .mpc-row > .mpc-overlay--first {
		background-position: 22% 50% !important;
	}
}

/* 9. Advanced search (search page) ------------------------------------------ */

/* The link that opens the form. The plugin prints an empty button with a small icon;
   give it words, and a plus / minus sign. */
.ac-collection .coeli-search-keyword {
	text-align: center;
}

.ac-collection .coeli-toggle-advanced-search {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	height: auto;
	margin: 14px 0 0;
	padding: 4px 2px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--ac-burgundy);
	font-family: Poppins, sans-serif;
	font-size: 14px;
	line-height: 20px;
	text-transform: uppercase;
	cursor: pointer;
}

.ac-collection .coeli-toggle-advanced-search::before {
	content: "Advanced search";
}

.ac-collection .coeli-toggle-advanced-search::after {
	content: "+";
	display: inline;
	width: auto;
	height: auto;
	background: none;
	font-size: 18px;
	line-height: 20px;
}

.ac-collection .coeli-toggle-advanced-search.show-advanced::after {
	content: "\2212";
	background: none;
}

.ac-collection .coeli-toggle-advanced-search:hover,
.ac-collection .coeli-toggle-advanced-search:focus {
	color: var(--ac-text);
	text-decoration: underline;
}

/* When the form opens, the plugin slides the main Search button away and back, which flickers
   and makes the search box jump. Keep the button exactly as it is at all times: these lines
   outrank the sizes the plugin writes onto the button while it animates. The child theme
   makes the button run the advanced search while the form is open (see inc/our-collection.php). */
.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-button {
	display: block !important;
	width: auto !important;
	height: 46px !important;
	margin: 0 !important;
	padding: 0 25px !important;
	opacity: 1 !important;
	overflow: visible !important;
}

/* The form itself: a white panel with three fields per row. */
.ac-collection .coeli-advanced-wrapper-toggle {
	margin: 0;
}

.ac-collection .coeli-advanced-wrapper-toggle.show-advanced {
	max-width: 900px;
	margin: 18px auto 35px;
	padding: 25px 25px 20px;
	border: 1px solid var(--ac-line);
	background: var(--ac-white);
}

.ac-collection .coeli-search-advanced form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px 20px;
	align-items: end;
}

.ac-collection .coeli-search-advanced form > div {
	grid-column: auto;
	min-width: 0;
}

.ac-collection .coeli-search-advanced .coeli-camp-cerca label,
.ac-collection .coeli-search-advanced .coeli-search-field-production-date > div::before {
	display: block;
	margin: 0 0 5px;
	color: var(--ac-text);
	font-family: Poppins, sans-serif;
	font-size: 13px;
	line-height: 18px;
	text-align: left;
	text-transform: uppercase;
}

.ac-collection .coeli-search-advanced form input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--ac-line);
	border-radius: 0;
	background: var(--ac-white);
	color: var(--ac-text);
	font-family: inherit;
	font-size: 17px;
}

.ac-collection .coeli-search-advanced form input[type="text"]:focus {
	border-color: var(--ac-gold);
	outline: 0;
}

/* The label already names the field, so the repeated placeholder is hidden. */
.ac-collection .coeli-search-advanced form input[type="text"]::placeholder {
	color: transparent;
}

/* Fields that offer a list of values as you type: a small arrow inside the box. */
.ac-collection .coeli-search-advanced .coeli-input-reference::after {
	top: auto;
	right: 12px;
	bottom: 13px;
	color: var(--ac-gold);
	font-size: 11px;
	line-height: 18px;
	pointer-events: none;
}

.ac-collection .coeli-search-advanced .coeli-input-reference input[type="text"] {
	padding-right: 32px;
}

.ac-collection .coeli-autocomplete-results {
	padding: 4px 0 !important;
	border: 1px solid var(--ac-line);
	color: var(--ac-text);
	font-size: 16px;
	line-height: 22px;
	text-align: left;
}

.ac-collection .coeli-autocomplete-results li {
	margin: 0;
	padding: 6px 12px;
}

.ac-collection .coeli-autocomplete-results li.autocomplete-result:hover {
	background: var(--ac-grey);
	color: var(--ac-burgundy);
}

/* Production date: one heading, then "from" and "to" side by side. */
.ac-collection .coeli-search-advanced .coeli-search-field-production-date {
	grid-column: span 2;
}

.ac-collection .coeli-search-advanced .coeli-search-field-production-date > div::before {
	content: "Production date";
}

.ac-collection .coeli-search-advanced .coeli-search-field-production-date label {
	display: none;
}

.ac-collection .coeli-search-advanced .coeli-search-field-production-date input[type="text"]::placeholder {
	color: #8a7f78;
	font-size: 15px;
}

.ac-collection .coeli-search-advanced .coeli-search-field-production-date > div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}

.ac-collection .coeli-search-advanced .coeli-search-field-production-date > div::before {
	flex: 0 0 100%;
}

.ac-collection .coeli-search-advanced form div .coeli-cerca-dataini,
.ac-collection .coeli-search-advanced form div .coeli-cerca-datafi {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	margin-left: 0;
}

/* The form's own Search button, centred under the fields. */
.ac-collection .coeli-search-advanced form button {
	grid-column: 1 / -1;
	justify-self: center;
	display: inline-block;
	width: auto;
	height: auto;
	margin: 4px 0 0;
	padding: 13px 34px 12px;
	border: 0;
	border-radius: 0;
	background: var(--ac-gold);
	color: var(--ac-white);
	font-family: Poppins, sans-serif;
	font-size: 16px;
	line-height: 16px;
	text-transform: uppercase;
	cursor: pointer;
}

.ac-collection .coeli-search-advanced form button:hover,
.ac-collection .coeli-search-advanced form button:focus {
	background: var(--ac-burgundy);
}

/* "Clean search" stays hidden, as the plugin has it. */
.ac-collection .coeli-search-advanced form button:last-child {
	display: none;
}

@media (max-width: 767px) {
	.ac-collection .coeli-advanced-wrapper-toggle.show-advanced {
		padding: 18px 15px 15px;
	}

	.ac-collection .coeli-search-advanced form {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.ac-collection .coeli-search-advanced .coeli-search-field-production-date {
		grid-column: auto;
	}

	/* Phone: "from" above "to", so the hints are not cut off. */
	.ac-collection .coeli-search-advanced .coeli-search-field-production-date > div {
		gap: 10px 0;
	}

	.ac-collection .coeli-search-advanced form div .coeli-cerca-dataini,
	.ac-collection .coeli-search-advanced form div .coeli-cerca-datafi {
		flex: 0 0 100%;
	}
}

/* 10. Object page: Back / Previous / Next ---------------------------------- */

/* The plugin leaves these as the browser's default blue underlined links.
   Style them like the rest of the collection: burgundy Poppins capitals, gold on hover.
   Burgundy rather than gold for the resting colour so the text stays readable on white. */
.ac-collection-object .coeli-nav-fitxes {
	align-items: center;
}

.ac-collection-object .coeli-nav-fitxes a.coeli-torna-cerca,
.ac-collection-object .coeli-nav-fitxes a.coeli-prev-fitxa,
.ac-collection-object .coeli-nav-fitxes a.coeli-next-fitxa {
	color: var(--ac-burgundy);
	font-family: Poppins, sans-serif;
	font-size: 14px;
	line-height: 22px;
	letter-spacing: 0.5px;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s;
}

.ac-collection-object .coeli-nav-fitxes a.coeli-torna-cerca:hover,
.ac-collection-object .coeli-nav-fitxes a.coeli-torna-cerca:focus,
.ac-collection-object .coeli-nav-fitxes a.coeli-prev-fitxa:hover,
.ac-collection-object .coeli-nav-fitxes a.coeli-prev-fitxa:focus,
.ac-collection-object .coeli-nav-fitxes a.coeli-next-fitxa:hover,
.ac-collection-object .coeli-nav-fitxes a.coeli-next-fitxa:focus {
	color: var(--ac-gold);
	text-decoration: none;
}

/* Back: the plugin draws a black arrow. Swap it for a burgundy one (gold on hover). */
.ac-collection-object .coeli-nav-fitxes a.coeli-torna-cerca {
	padding: 0 20px 0 26px;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b31b34' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E");
	background-position: left center;
	background-size: 18px 18px;
	background-repeat: no-repeat;
}

.ac-collection-object .coeli-nav-fitxes a.coeli-torna-cerca:hover,
.ac-collection-object .coeli-nav-fitxes a.coeli-torna-cerca:focus {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5ab6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E");
}

.ac-collection-object .coeli-nav-fitxes span a.coeli-next-fitxa {
	margin-right: 0;
}

/* 11. Object page: image lightbox ---------------------------------------- */

/* Clicking the main image opens it in the plugin's lightbox (Featherlight). Its dark backdrop
   is set with ".featherlight:last-of-type", which never matches here because other elements
   follow it on the page, so the page showed through behind the picture. Darken it directly. */
body.ac-collection .featherlight {
	background: rgba(0, 0, 0, 0.75);
}

/* 12. Object page: "Back to Our Collection" link above the title ---------- */

/* inc/our-collection.php prints this link as "Our Collection". The words "Back to" and the
   arrow are added here, so the link reads "Back to Our Collection" (screen readers include it).
   If the PHP is ever changed to print "Back to Our Collection" itself, remove the content line. */
.ac-collection-object .ac-object-back a {
	display: inline-block;
	padding-left: 24px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5ab6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E");
	background-position: left center;
	background-size: 16px 16px;
	background-repeat: no-repeat;
	transition: color 0.2s;
}

.ac-collection-object .ac-object-back a::before {
	content: "Back to ";
}

.ac-collection-object .ac-object-back a:hover,
.ac-collection-object .ac-object-back a:focus {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b31b34' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E");
}

/* 13. Fixes from the full test of the new pages (12 November 2026) ------- */

/* Search page on small laptops and landscape tablets (1025px to 1199px). With the Filters column
   beside them, three cards across left each card only about 200px wide. Two across there. */
@media (min-width: 1025px) and (max-width: 1199px) {
	.ac-collection .coeli-list-results .coeli-list-col ul.coeli-result-list.grid .grid-item {
		width: calc((100% - 30px) / 2);
	}
}

/* A search that finds nothing showed "0 results", an empty Filters heading and the sort
   dropdowns, with no explanation. Say so, and hide the controls that have nothing to act on. */
.ac-collection .coeli-result-list-container:not(:has(li.grid-item)) .coeli-sidebar-facets,
.ac-collection .coeli-result-list-container:not(:has(li.grid-item)) .coeli-control-results {
	display: none;
}

.ac-collection .coeli-result-list-container:not(:has(li.grid-item)) .coeli-list-col::before {
	content: "No objects match your search. Try a different word, or remove a filter.";
	display: block;
	padding: 25px 0 5px;
	color: var(--ac-text);
	font-size: 20px;
	line-height: 28px;
	text-align: center;
}

/* Object page: an object with two materials (or two techniques) printed the label twice,
   "Material / Metal" then "Material / Silver". Show the label once, values listed under it. */
.ac-collection-object .coeli-embedded-item:has(> dl > dt.dt-materialstechs-mediums) + .coeli-embedded-item:has(> dl > dt.dt-materialstechs-mediums),
.ac-collection-object .coeli-embedded-item:has(> dl > dt.dt-materialstechs-techniques) + .coeli-embedded-item:has(> dl > dt.dt-materialstechs-techniques) {
	margin-top: -12px;
}

.ac-collection-object .coeli-embedded-item:has(> dl > dt.dt-materialstechs-mediums) + .coeli-embedded-item > dl > dt.dt-materialstechs-mediums,
.ac-collection-object .coeli-embedded-item:has(> dl > dt.dt-materialstechs-techniques) + .coeli-embedded-item > dl > dt.dt-materialstechs-techniques {
	display: none;
}

/* ==========================================================================
   13. Search placeholders: darker grey, readable on the search page
       (main keyword box + every text field in the advanced search form)
   ========================================================================== */
.ac-collection .coeli-search-keyword .coeli-search-form .coeli-search-input::placeholder,
.ac-collection .coeli-search-advanced form input[type="text"]::placeholder,
.ac-collection .coeli-search-advanced .coeli-search-field-production-date input[type="text"]::placeholder {
	color: #666666;
	opacity: 1;
}
/* Keep the plugin behaviour of clearing the hint while the keyword box is active */
.ac-collection .coeli-search-keyword .coeli-search-form.active .coeli-search-input::placeholder {
	color: transparent;
}

/* 14. Client feedback, 16 November 2026 ------------------------------------ */

/* Landing page: a search box in place of the "Search the collection" button.
   It uses the same look as the box on the search page (section 2) and sends the
   visitor to the search page with their word filled in. */
body.ac-collection .ac-collection-search-link .wpb_raw_html {
	margin-bottom: 0;
}

body.ac-collection .ac-landing-search {
	margin: 0;
}

/* On a phone, let the box shrink so the box and button stay inside the row. */
.ac-collection .ac-landing-search .coeli-search-form .coeli-search-input {
	min-width: 0;
}

/* "Advanced search" under the box: a link to the search page, which opens the
   advanced form on arrival (see inc/our-collection.php). Styled like the button
   that opens the form on the search page (section 9). */
.ac-collection .ac-landing-advanced {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
	padding: 4px 2px;
	color: var(--ac-burgundy);
	font-family: Poppins, sans-serif;
	font-size: 14px;
	line-height: 20px;
	text-transform: uppercase;
	text-decoration: none;
}

.ac-collection .ac-landing-advanced::after {
	content: "+";
	font-size: 18px;
	line-height: 20px;
}

.ac-collection .ac-landing-advanced:hover,
.ac-collection .ac-landing-advanced:focus {
	color: var(--ac-text);
	text-decoration: underline;
}

/* Collection pages: the introduction between the banner and the objects. */
body.ac-collection .ac-collection-intro {
	max-width: 860px;
	margin: 0 auto 45px !important;
	text-align: center;
}

/* 15. Client feedback, 18 November 2026 ------------------------------------ */

/* Less space between "Advanced search" and the "Sort by" row (was about 86px, now about 40px).
   The space came from the search box's bottom margin (25px), the plugin's padding above the
   result count (19px) and the margin under it (12px). */
.ac-collection .coeli-search-keyword {
	margin-bottom: 10px;
}

.ac-collection .coeli-list-results > header {
	padding-top: 0;
	margin-bottom: 0;
}

/* 16. Client feedback, 19 November 2026 ------------------------------------ */

/* Search page: "Back to <collection>" above the search box, shown when the search started on a
   collection page (inc/our-collection.php, section 12). Same look as the object page's
   "Back to Our Collection" link (sections 6 and 12). */
.ac-collection .ac-search-back {
	margin: 0 0 25px;
	font-family: Poppins, sans-serif !important;
	font-size: 14px !important;
	line-height: 22px !important;
	text-transform: uppercase;
}

.ac-collection .ac-search-back a {
	display: inline-block;
	padding-left: 24px;
	color: var(--ac-gold);
	text-decoration: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5ab6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E");
	background-position: left center;
	background-size: 16px 16px;
	background-repeat: no-repeat;
	transition: color 0.2s;
}

.ac-collection .ac-search-back a:hover,
.ac-collection .ac-search-back a:focus {
	color: var(--ac-burgundy);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b31b34' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E");
}
