/*
 * AuctionForge skin — sale lists: Upcoming Auctions and Past Auctions.
 *
 * auctionforge/main/auction_list.php re-dresses both pages in the original markup — the photo
 * band (.top-gallery-container.shobrook-af-band), the grid band (.container.wrapper.shobrook-af-list)
 * and, on Past Auctions, the original "Previous Auctions" table — which default.css styles.
 * This file covers only what AuctionForge's own markup needs inside .shobrook-af-list: its
 * wrappers are neutralised, and its sale cards (.bp-lot_auction, kept so its JS still writes the
 * local date into them) take the original look: the .bordered box, Baskerville navy headings,
 * Arial copy and the slate .button.secondary with its eye icon.
 *
 * Everything is scoped to the wrappers the template adds, so it never reaches the catalogue,
 * lot or account pages, and does nothing if the template could not re-dress a page.
 * AuctionForge's inline "bidspirit-custom-styles" block sets colours with !important, hence the
 * html body prefix and the few !important below.
 *
 * Breakpoints are the original's: small <= 50rem, medium >= 50.0625rem, large >= 73.75rem.
 */

/* ---- Photo band ------------------------------------------------------------------------- */

/* The caption is the page's h1 (AuctionForge's title was one); without h1's top margin it sits
   exactly where the original's h2.title does. */
.shobrook-af-band .gallery-type-rotating .rotatingContainer .slide .caption h1.title {
	margin-top: 0;
}

/* ---- AuctionForge's wrappers become plain blocks on the original grid ------------------- */

html body .shobrook-af-list .bp-container {
	max-width: none;
	margin: 0;
	padding: 0;
	font-family: inherit !important;
	color: inherit !important;
}

.shobrook-af-list .bp-container .bp-row {
	margin-left: 0;
	margin-right: 0;
}

.shobrook-af-list #auction-list-section {
	display: block;
}

/* Filled by AuctionForge's JS for bidders who still have a step to complete. */
.shobrook-af-list #bp-notice-block {
	margin: 0 0 1.25rem;
}

.shobrook-af-list #bp-notice-block:empty {
	margin: 0;
}

/* The page's own content, if an editor adds some: the original's copy. */
.shobrook-af-list .bp-content.bp-content_archive {
	display: block;
	margin: 0;
}

.shobrook-af-list .bp-content.bp-content_archive .bp-content__text {
	max-width: none;
	width: auto;
	margin: 0;
	text-align: inherit;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal;
	font-weight: inherit;
	color: inherit;
}

.shobrook-af-list .bp-content.bp-content_archive .bp-content__text p {
	margin: 0 0 1.25rem;
}

/* the_posts_pagination() never has anything to print on a page. */
.shobrook-af-list ~ .wrp-navigation:not(:has(*)) {
	display: none;
}

/* ---- The sale list: one bordered box per sale, as many as there are ------------------- */

/* Plain block flow: as a flex column, Chrome sizes a box holding the original's floated
   columns as if its text wrapped, leaving a gap under it. */
html body .shobrook-af-list #auction-list-section > .bp-lots {
	display: block;
	width: auto;
	margin: 0;
	padding: 0;
}

/* The original .bordered box. */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction,
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction:hover {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 1.25rem;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0 0 1.25rem;
	padding: 0.625rem;
	background: #fff;
	border: 2px solid #fff;
	border-radius: 0.125rem;
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.65);
	transition: none;
}

html body .shobrook-af-list .bp-lots > :last-child,
html body .shobrook-af-list .bp-lots > .bp-lot.bp-lot_auction:last-child {
	margin-bottom: 0;
}

/* Sale picture, framed as the original frames media inside a box (.venue-container .map-container). */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__wrp-image {
	display: block;
	position: relative;
	flex: 0 0 15rem;
	box-sizing: border-box;
	width: 15rem;
	height: auto;
	aspect-ratio: 4 / 3;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid #d0d9e0;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__image {
	position: absolute;
	top: 0.3125rem;
	right: 0.3125rem;
	bottom: 0.3125rem;
	left: 0.3125rem;
	width: auto;
	height: auto;
	max-height: none;
	padding: 0;
	transform: none;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

/* Title, date and text on the left, the call to action on the right (the 2017 "next auction" box). */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	grid-template-areas: "title tool" "text tool";
	column-gap: 1.25rem;
	align-items: center;
	align-content: center;
	flex: 1 1 auto;
	min-width: 0;
	height: auto;
	margin: 0;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title {
	grid-area: title;
	display: block;
	width: auto;
	min-height: 0;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: visible;
	text-align: left;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title .bp-title {
	display: block;
	margin: 0;
	padding: 0;
	font-family: var(--sb-font-heading) !important;
	font-size: 1.5625rem;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(8, 37, 62, 0.9) !important;
	text-transform: capitalize;
	text-decoration: none;
	white-space: normal;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title a.bp-title:hover,
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title a.bp-title:focus {
	color: var(--sb-teal) !important;
	text-decoration: none;
}

/* The sale date: AuctionForge's JS writes it, in the visitor's time zone, into
   p.bp-auction-start-date (the browser lifts that p out of p.bp-lot__date, which keeps the
   text of shop and manual cards). Set like the date under the original catalogue title. */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title .bp-lot__date,
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title .bp-auction-start-date {
	margin: 0;
	padding: 0;
	font-family: var(--sb-font-heading);
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(8, 37, 62, 0.8) !important;
}

/* Holds the line until the script has filled it in. */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title .bp-auction-start-date {
	min-height: 1.4em;
}

/* The empty <p> the browser makes of the closing tag that had no paragraph left to close. */
.shobrook-af-list .bp-lot_auction .bp-lot__title > p:not([class]) {
	display: none;
}

/* The wrapper of text and buttons steps aside so its children sit in the grid above. */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool {
	display: contents;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__text {
	grid-area: text;
	display: block;
	width: auto;
	margin: 0.625rem 0 0;
	font-family: var(--sb-font-body);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	color: var(--sb-text);
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__text:empty {
	margin: 0;
}

/* Calls to action and status notes, in the right-hand column (a lone one spans both rows). */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__tool__item {
	grid-column: 2;
	justify-self: end;
	align-self: center;
	flex: none;
	width: auto;
	max-width: none;
	max-height: none;
	margin: 0;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__text + .bp-lot__tool__item:last-child {
	grid-area: tool;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__tool__item + .bp-lot__tool__item {
	margin-top: 0.625rem;
}

/* "Catalogue will be available soon", "The auction has ended"... */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__tool__item.bp-text-red {
	display: block;
	max-width: 15rem;
	font-family: var(--sb-font-nav);
	font-size: 0.875rem;
	line-height: 1.4;
	text-align: right;
	text-transform: uppercase;
	color: #b20000;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__tool__pair {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.625rem;
}

/* The original .button.secondary, with the eye icon of its "View Auction" buttons. */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	max-width: none;
	min-height: 0;
	max-height: none;
	margin: 0;
	padding: 0.9375rem 1.875rem;
	font-family: var(--sb-font-ui);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: #fff !important;
	background: var(--sb-slate) !important;
	border: 0 !important;
	border-radius: 0.3125rem;
	opacity: 1;
	/* The original's 200ms fade, kept off the focus outline. */
	transition: background-color 200ms linear 0ms, color 200ms linear 0ms;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default:hover,
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default:focus {
	color: #fff !important;
	background: var(--sb-navy-dark) !important;
}

/* Keyboard focus (the original's "a { outline: none }" leaves links without any). */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction a:focus-visible,
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default:focus-visible,
html body .shobrook-af-list .shobrook-af-empty a:focus-visible,
html body .shobrook-af-list .auctions.index a:focus-visible {
	outline: 2px solid var(--sb-teal);
	outline-offset: 2px;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default::before {
	content: "\f06e";
	display: inline-block;
	min-height: 0;
	height: auto;
	margin-right: 0.625rem;
	font: normal normal normal 14px/1 FontAwesome;
	font-size: inherit;
	line-height: inherit;
	vertical-align: middle;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* A past sale's catalogue PDF (AuctionForge's "View PDF" setting) is the default teal .button. */
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default.bp-lot__pdf-btn {
	background: var(--sb-teal) !important;
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default.bp-lot__pdf-btn::before {
	content: "\f1c1";
}

html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default.bp-lot__pdf-btn:hover,
html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default.bp-lot__pdf-btn:focus {
	background: var(--sb-navy-dark) !important;
}

/* ---- Upcoming Auctions without a sale: the original's bordered "next auction" box ---------- */

html body .shobrook-af-list .bordered.shobrook-af-empty {
	margin: 0;
	background: #fff;
}

/* AuctionForge's "Next auctions coming soon!", set as the box's heading. */
html body .shobrook-af-list .shobrook-af-empty .bp-padding-text {
	display: block;
	margin: 0 !important;
	padding: 0;
}

html body .shobrook-af-list .shobrook-af-empty .bp-padding-text p {
	margin: 0;
	font-family: var(--sb-font-heading);
	font-size: 1.5625rem;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(8, 37, 62, 0.9);
}

html body .shobrook-af-list .shobrook-af-empty p.shobrook-af-empty__note {
	margin: 0.3125rem 0 0;
}

/* ---- Past Auctions: the original "Previous Auctions" section, nested in the grid band ---- */

/* The section brings its own .container (#paginationContainer: overflow hidden, for the old
   AJAX loader); the band around it already pads, and its boxes need room for their shadow. */
#content-wrapper .shobrook-af-list .auctions.index > .container {
	padding: 0;
	overflow: visible;
}

/* AuctionForge zeroes paragraph margins inside .bp-container; the original's are back here. */
html body .shobrook-af-list .auctions.index p.shobrook-af-empty__note {
	margin-bottom: 1.25rem;
}

/* ---- Medium: a smaller picture --------------------------------------------------------- */

@media only screen and (min-width: 50.0625rem) and (max-width: 73.6875rem) {
	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__wrp-image {
		flex-basis: 12.5rem;
		width: 12.5rem;
	}
}

/* ---- Small: the box stacks, and the button turns into the original's full-width one ---- */

@media only screen and (max-width: 50rem) {
	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction,
	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction:hover {
		flex-direction: column;
		align-items: stretch;
		gap: 0.9375rem;
	}

	/* Full width, but no taller than a phone-width frame: at 600-800px a 4:3 frame ran to 550px
	   and pushed the sale's title and button off the screen. */
	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__wrp-image {
		flex: none;
		width: 100%;
		max-height: 18.75rem;
	}

	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__content {
		display: block;
	}

	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title .bp-lot__date,
	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__title .bp-auction-start-date {
		font-size: 1.125rem;
	}

	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__tool__item {
		margin-top: 0.625rem;
	}

	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool .bp-lot__tool__item.bp-text-red {
		max-width: none;
		text-align: left;
	}

	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-btn.bp-btn-default {
		display: flex;
		width: 100%;
		padding: 1.25rem 1.875rem;
		font-size: 1.40625rem;
		white-space: normal;
	}

	html body .shobrook-af-list .bp-lots .bp-lot.bp-lot_auction .bp-lot__tool__pair .bp-btn.bp-btn-default {
		flex: 1 1 100%;
	}
}
