/**
 * Auction panel.
 *
 * Deliberately self-contained: these rules do not assume the Buy R Shit theme,
 * so the plugin still looks like an auction (not like a blog) if the theme is
 * switched. Colours come from CSS custom properties with fallbacks.
 */

.brs-badge {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: .35em .7em;
	border-radius: 999px;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	line-height: 1;
	backdrop-filter: blur(6px);
}

.brs-badge--live {
	background: rgba(0, 230, 160, .14);
	color: #00e6a0;
	border: 1px solid rgba(0, 230, 160, .45);
}

.brs-badge--ended {
	background: rgba(160, 170, 190, .12);
	color: #97a3b8;
	border: 1px solid rgba(160, 170, 190, .28);
}

.brs-badge__dot {
	width: .45em;
	height: .45em;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 0 currentColor;
	animation: brs-pulse 2s infinite;
}

@keyframes brs-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(0, 230, 160, .6); }
	70%  { box-shadow: 0 0 0 .5em rgba(0, 230, 160, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 230, 160, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.brs-badge__dot { animation: none; }
}

/* ------------------------------------------------------------------ panel */
.brs-auction {
	margin: 1.5rem 0;
	padding: 1.25rem;
	border-radius: 18px;
	border: 1px solid var(--brs-border, rgba(255, 255, 255, .1));
	background:
		radial-gradient(120% 100% at 0% 0%, rgba(0, 180, 255, .1), transparent 60%),
		var(--brs-panel, rgba(18, 22, 30, .72));
	box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
	backdrop-filter: blur(18px) saturate(140%);
}

.brs-auction__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: 1rem;
}

.brs-auction__extended {
	font-size: .6875rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #ffce54;
}

.brs-auction__figures {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: .75rem;
}

.brs-auction__label {
	display: block;
	font-size: .6875rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--brs-muted, #97a3b8);
	margin-bottom: .3rem;
}

.brs-auction__price strong,
.brs-auction__clock strong {
	display: block;
	font-size: 1.75rem;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	color: var(--brs-text, #eef3fb);
}

.brs-auction__clock strong { color: #4fd1ff; }
.brs-auction.is-ending .brs-auction__clock strong { color: #ff7a7a; }

.brs-auction__sub {
	display: block;
	margin-top: .25rem;
	font-size: .75rem;
	color: var(--brs-muted, #97a3b8);
}

.brs-auction__reserve {
	margin: .5rem 0 .9rem;
	font-size: .8125rem;
	padding: .4rem .7rem;
	border-radius: 10px;
	display: inline-block;
}

.brs-auction__reserve.is-met {
	background: rgba(0, 230, 160, .1);
	color: #00e6a0;
}

.brs-auction__reserve.is-unmet {
	background: rgba(255, 206, 84, .1);
	color: #ffce54;
}

/* ------------------------------------------------------------------- form */
.brs-bidform {
	margin: 1rem 0;
}

.brs-bidform__label {
	display: block;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .04em;
	margin-bottom: .4rem;
	color: var(--brs-text, #eef3fb);
}

.brs-bidform__row {
	display: flex;
	align-items: stretch;
	gap: .5rem;
}

.brs-bidform__currency {
	display: flex;
	align-items: center;
	padding: 0 .7rem;
	border-radius: 12px 0 0 12px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--brs-border, rgba(255, 255, 255, .12));
	border-right: 0;
	color: var(--brs-muted, #97a3b8);
	font-weight: 600;
}

.brs-bidform__row input[type="number"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: .75rem .8rem;
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
	color: var(--brs-text, #eef3fb);
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--brs-border, rgba(255, 255, 255, .12));
	border-radius: 0;
	appearance: textfield;
}

.brs-bidform__row input[type="number"]:focus {
	outline: 2px solid #4fd1ff;
	outline-offset: 1px;
}

.brs-bidform__hint,
.brs-bidform__note {
	margin: .5rem 0 0;
	font-size: .75rem;
	color: var(--brs-muted, #97a3b8);
}

.brs-bidform__error {
	margin: .5rem 0 0;
	padding: .5rem .7rem;
	border-radius: 10px;
	font-size: .8125rem;
	color: #ff9b9b;
	background: rgba(255, 90, 90, .12);
	border: 1px solid rgba(255, 90, 90, .3);
}

/* ---------------------------------------------------------------- buttons */
.brs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: .8rem 1.15rem;
	border: 0;
	border-radius: 12px;
	font-size: .875rem;
	font-weight: 650;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
	white-space: nowrap;
}

.brs-btn:active { transform: translateY(1px); }

.brs-btn--primary {
	background: linear-gradient(135deg, #2f8bff, #00d4ff);
	color: #041018;
	box-shadow: 0 10px 26px -12px rgba(47, 139, 255, .9);
}

.brs-btn--primary.is-busy { opacity: .6; cursor: progress; }

.brs-btn--buy {
	flex: 1 1 auto;
	background: linear-gradient(135deg, #ffd76e, #f0a500);
	color: #241800;
	box-shadow: 0 10px 26px -14px rgba(240, 165, 0, .9);
}

.brs-btn--ghost {
	background: rgba(255, 255, 255, .06);
	color: var(--brs-text, #eef3fb);
	border: 1px solid var(--brs-border, rgba(255, 255, 255, .14));
}

.brs-btn--ghost[data-watching="1"] {
	color: #ffce54;
	border-color: rgba(255, 206, 84, .5);
}

.brs-auction__actions {
	display: flex;
	gap: .6rem;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.brs-auction__watchers {
	margin: .75rem 0 0;
	font-size: .75rem;
	color: var(--brs-muted, #97a3b8);
}

.brs-auction__closed {
	margin: 1rem 0;
	font-size: .9375rem;
	color: var(--brs-muted, #97a3b8);
}

/* ---------------------------------------------------------------- history */
.brs-auction__history {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--brs-border, rgba(255, 255, 255, .1));
}

.brs-auction__history h3 {
	margin: 0 0 .6rem;
	font-size: .8125rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--brs-muted, #97a3b8);
}

.brs-auction__history table {
	width: 100%;
	border-collapse: collapse;
	font-size: .8125rem;
}

.brs-auction__history th,
.brs-auction__history td {
	text-align: left;
	padding: .45rem .3rem;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.brs-auction__history th {
	color: var(--brs-muted, #97a3b8);
	font-weight: 600;
}

.brs-auction__history td {
	font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- price text */
.brs-price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .4rem;
	font-weight: 700;
}

.brs-price__label {
	font-size: .6875rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--brs-muted, #97a3b8);
	font-weight: 600;
}

.brs-price__meta {
	font-size: .75rem;
	font-weight: 500;
	color: var(--brs-muted, #97a3b8);
}

.brs-price--sold { color: #00e6a0; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 520px) {
	.brs-auction__figures {
		grid-template-columns: 1fr;
		gap: .75rem;
	}
	.brs-bidform__row { flex-wrap: wrap; }
	.brs-bidform__row input[type="number"] { border-radius: 10px; }
	.brs-bidform__currency { display: none; }
	.brs-bidform__row .brs-btn { width: 100%; }
}
