/* BHM Auctions. Colours come from the Impreza theme's variables where it has them. */

.bhm-auc,
.bhm-auc-list,
.bhm-auc-reg {
	--auc-accent: var(--color-content-primary, #0b5cab);
	--auc-text: var(--color-content-text, #1d2327);
	--auc-faded: var(--color-content-faded, #646970);
	--auc-border: var(--color-content-border, #dcdcde);
	--auc-alt: var(--color-content-bg-alt, #f6f7f7);
	--auc-good: #1e7a3c;
	--auc-good-bg: #e8f5ec;
	--auc-bad: #b32d2e;
	--auc-bad-bg: #fcf0f1;
	color: var(--auc-text);
}

.bhm-auc-crumb { margin: 0 0 1rem; font-size: 0.9rem; color: var(--auc-faded); }
.bhm-auc-crumb a { color: inherit; }

.bhm-auc-grid {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 2rem;
	align-items: start;
}

.bhm-auc-main-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--auc-alt); }
.bhm-auc-main-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100% !important; object-fit: contain; }
.bhm-auc-thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.bhm-auc-thumb {
	padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer;
	width: 72px; height: 72px; overflow: hidden; line-height: 0;
}
.bhm-auc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bhm-auc-thumb.is-on { border-color: var(--auc-accent); }

.bhm-auc-panel {
	border: 1px solid var(--auc-border);
	border-radius: 8px;
	padding: 1.5rem;
	position: sticky;
	top: 1rem;
}
.bhm-auc-lot { margin: 0 0 0.25rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--auc-faded); }
.bhm-auc-title { margin: 0 0 1.25rem; font-size: 1.6rem; line-height: 1.25; }

.bhm-auc-figures { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 1rem; }
.bhm-auc-label { font-size: 0.9rem; color: var(--auc-faded); }
.bhm-auc-price { font-size: 2.4rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bhm-auc-sub { font-size: 0.95rem; color: var(--auc-faded); }

.bhm-auc-clock {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem;
	padding: 0.75rem 1rem; margin-bottom: 1.25rem; border-radius: 6px; background: var(--auc-alt);
}
.bhm-auc-clock-left { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bhm-auc-clock-left.is-urgent { color: var(--auc-bad); }
.bhm-auc-clock-left.is-ended { color: var(--auc-faded); }
.bhm-auc-clock-at { font-size: 0.9rem; color: var(--auc-faded); align-self: center; }

.bhm-auc-box { min-height: 3rem; }
.bhm-auc-box p { margin: 0 0 0.75rem; }
.bhm-auc-inputrow { display: flex; align-items: stretch; gap: 0.5rem; margin: 0.35rem 0; }
.bhm-auc-pound {
	display: flex; align-items: center; padding: 0 0.75rem;
	border: 1px solid var(--auc-border); border-radius: 4px; background: var(--auc-alt); font-weight: 700;
}
.bhm-auc-inputrow input { flex: 1 1 auto; min-width: 0; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.bhm-auc-inputrow .bhm-auc-btn { flex: 0 0 auto; }
.bhm-auc-hint { font-size: 0.9rem; color: var(--auc-faded); }
.bhm-auc-confirm { padding: 1rem; border: 1px solid var(--auc-accent); border-radius: 6px; margin-bottom: 0.75rem; }
.bhm-auc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.bhm-auc-linkbtn { background: none; border: 0; padding: 0; color: var(--auc-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.bhm-auc-cardline { font-size: 0.85rem; }
.bhm-auc-muted { color: var(--auc-faded); }

.bhm-auc-note { padding: 0.75rem 1rem; border-radius: 6px; background: var(--auc-alt); }
.bhm-auc-note-good { background: var(--auc-good-bg); color: var(--auc-good); }
.bhm-auc-note-bad { background: var(--auc-bad-bg); color: var(--auc-bad); }

.bhm-auc-facts { margin: 1.25rem 0 0; padding: 1rem 0 0 1.1rem; border-top: 1px solid var(--auc-border); font-size: 0.9rem; color: var(--auc-faded); }
.bhm-auc-facts li { margin-bottom: 0.35rem; }

.bhm-auc-lower {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 2rem;
	margin-top: 2.5rem;
}
.bhm-auc-lower h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.bhm-auc-how { padding: 1.25rem 1.5rem; border-radius: 8px; background: var(--auc-alt); margin-bottom: 1.5rem; }
.bhm-auc-how ol { margin: 0 0 0.75rem 1.1rem; padding: 0; }
.bhm-auc-how li { margin-bottom: 0.5rem; }
.bhm-auc-history table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.bhm-auc-history th, .bhm-auc-history td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--auc-border); text-align: left; }
.bhm-auc-history tbody { display: table-row-group; }

/* List */
.bhm-auc-list-title { font-size: 1.4rem; margin: 2rem 0 1rem; }
.bhm-auc-list-title:first-child { margin-top: 0; }
.bhm-auc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.bhm-auc-card {
	display: flex; flex-direction: column; color: inherit; text-decoration: none;
	border: 1px solid var(--auc-border); border-radius: 8px; overflow: hidden; background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.bhm-auc-card:hover, .bhm-auc-card:focus-visible { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.bhm-auc-card-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--auc-alt); }
.bhm-auc-card-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100% !important; object-fit: cover; }
.bhm-auc-badge {
	position: absolute; left: 0.6rem; top: 0.6rem; padding: 0.2rem 0.55rem; border-radius: 999px;
	font-size: 0.8rem; font-weight: 600; background: rgba(255, 255, 255, 0.92); color: var(--auc-text);
}
.bhm-auc-card.is-live .bhm-auc-badge { background: var(--auc-bad); color: #fff; }
.bhm-auc-card-body { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem 1rem; }
.bhm-auc-card-lot { font-size: 0.8rem; color: var(--auc-faded); text-transform: uppercase; letter-spacing: 0.04em; }
.bhm-auc-card-title { font-weight: 600; line-height: 1.3; }
.bhm-auc-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.bhm-auc-card-price { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bhm-auc-card-bids, .bhm-auc-card-clock { font-size: 0.9rem; color: var(--auc-faded); }
.bhm-auc-card.is-live .bhm-auc-card-clock { color: var(--auc-text); font-weight: 600; }
.bhm-auc-empty { padding: 1.5rem; border-radius: 8px; background: var(--auc-alt); }
.bhm-auc-list-foot { margin-top: 2rem; font-size: 0.95rem; }

/* Registration */
.bhm-auc-reg { max-width: 720px; }
.bhm-auc-steps { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.bhm-auc-step { border: 1px solid var(--auc-border); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.bhm-auc-step h3 { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.75rem; font-size: 1.15rem; }
.bhm-auc-step-n {
	display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem;
	border-radius: 50%; background: var(--auc-alt); font-size: 0.95rem; font-weight: 700;
}
.bhm-auc-step.is-done .bhm-auc-step-n { background: var(--auc-good-bg); color: var(--auc-good); }
.bhm-auc-step.is-done { background: var(--auc-alt); }
.bhm-auc-form .form-row { margin-bottom: 0.75rem; }
.bhm-auc-form label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.bhm-auc-form input.input-text { width: 100%; max-width: 360px; }
.bhm-auc-check { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.75rem 0 1rem; font-weight: 400 !important; }
.bhm-auc-check input { margin-top: 0.3rem; }
.bhm-auc-terms-short { margin: 0 0 0.75rem 1.1rem; }
.bhm-auc-done { padding: 1.5rem; border-radius: 8px; background: var(--auc-good-bg); }
.bhm-auc-done h2 { margin-top: 0; color: var(--auc-good); }

@media (max-width: 900px) {
	.bhm-auc-grid, .bhm-auc-lower { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.bhm-auc-panel { position: static; padding: 1.25rem; }
	.bhm-auc-price { font-size: 2rem; }
}

@media (max-width: 480px) {
	.bhm-auc-inputrow { flex-wrap: wrap; }
	.bhm-auc-inputrow input { flex-basis: calc(100% - 3.5rem); }
	.bhm-auc-inputrow .bhm-auc-btn { flex: 1 1 100%; }
}

/* Register to bid: Apple Pay / Google Pay / Link */
.bhm-auc-wallet { margin: 4px 0 14px; max-width: 420px; }
.bhm-auc-wallet .bhm-auc-msg { margin-top: 10px; }
.bhm-auc-wallet-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: #6b7479; font-size: 14px; }
.bhm-auc-wallet-or::before, .bhm-auc-wallet-or::after { content: ""; flex: 1; border-top: 1px solid #d9dee1; }

/* The shop's floating cart button sat over the bid box on phones. This file only loads on auction pages. */
#moderncart-floating-cart { display: none !important; }

/* Register to bid, logged out: most bidders are new, so "Register" comes before "Login". */
.bhm-auc-reg #customer_login { display: flex; flex-direction: column-reverse; gap: 1rem; }
