/* Blacklist DB — tokens and the pieces shown across the forum: reason
   badges, topic/profile flag, member notice and the board panel.
   Neutrals follow Zeina (gray / slate); colour is reserved for reasons
   and the red "listed" signal. */

.bldb,
.bldb-flag,
.bldb-notice,
.bldb-widget {
	--bldb-ink: #18181b;
	--bldb-sub: #52525b;
	--bldb-mute: #8b8b94;
	--bldb-card: #fff;
	--bldb-well: #f4f4f5;
	--bldb-line: #e4e4e7;
	--bldb-line-strong: #d4d4d8;
	--bldb-hover: #f4f4f5;
	--bldb-track: #f4f4f5;
	--bldb-raise: #fff;
	--bldb-solid: var(--bldb-ink);
	/* Reason colours (RGB triplets): deep, desaturated tones that read as
	   labels rather than alarms. Dark mode uses the light tints. */
	--bldb-r-scam: 180 35 24;
	--bldb-r-resell: 181 71 8;
	--bldb-r-leak: 2 106 162;
	--bldb-r-spam: 78 91 166;
	--bldb-r-fake: 105 65 198;
	--bldb-r-other: 71 84 103;
	--bldb-on-solid: #fff;
	--bldb-accent: rgba(var(--color-primary, 37, 99, 235), 1);
	--bldb-accent-soft: rgba(var(--color-primary, 37, 99, 235), 0.1);
	--bldb-red: #ef4444;
	--bldb-red-ink: #dc2626;
	--bldb-red-soft: #fef2f2;
	--bldb-danger: #b42318;
	--bldb-danger-hover: #912018;
	--bldb-shadow: 0 1px 2px rgb(24 24 27 / 0.04), 0 8px 24px -14px rgb(24 24 27 / 0.12);
	--bldb-shadow-hover: 0 2px 4px rgb(24 24 27 / 0.05), 0 18px 36px -16px rgb(24 24 27 / 0.2);
	--bldb-r: 16px;
	--bldb-r-sm: 10px;
	--bldb-ease: cubic-bezier(0.23, 1, 0.32, 1);
	--bldb-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html.dark .bldb,
html.dark .bldb-flag,
html.dark .bldb-notice,
html.dark .bldb-widget {
	--bldb-ink: #f1f5f9;
	--bldb-sub: #a1aab8;
	--bldb-mute: #6b7586;
	--bldb-card: #0f172a;
	/* Zeina's dark page is #1b2335 and its cards #0f172a: wells sit below the
	   card, hovers are tinted with the accent so they never read as the page. */
	--bldb-well: #0b1222;
	--bldb-line: #1e293b;
	--bldb-line-strong: #2c3a52;
	--bldb-hover: rgba(var(--color-primary-dark, 96, 165, 250), 0.08);
	--bldb-track: #080e1b;
	--bldb-raise: #1e293b;
	/* Filled buttons take the theme accent in dark mode instead of turning white. */
	--bldb-solid: rgba(var(--color-primary, 37, 99, 235), 1);
	--bldb-r-scam: 253 162 155;
	--bldb-r-resell: 247 178 122;
	--bldb-r-leak: 124 212 253;
	--bldb-r-spam: 179 184 219;
	--bldb-r-fake: 189 180 254;
	--bldb-r-other: 152 162 179;
	--bldb-on-solid: #fff;
	--bldb-accent: rgba(var(--color-primary-dark, var(--color-primary, 96, 165, 250)), 1);
	--bldb-accent-soft: rgba(var(--color-primary-dark, var(--color-primary, 96, 165, 250)), 0.14);
	--bldb-red: #f87171;
	--bldb-red-ink: #fca5a5;
	--bldb-red-soft: rgb(239 68 68 / 0.13);
	--bldb-danger: #c2362b;
	--bldb-danger-hover: #a52b22;
	--bldb-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
	--bldb-shadow-hover: 0 18px 36px -16px rgb(0 0 0 / 0.6);
}

.bldb-i {
	display: inline-block;
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	vertical-align: -0.2em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Reason badges: the first thing read after a name ---------- */

.bldb-reasons { display: inline-flex; flex-wrap: wrap; gap: 0.375rem; }
.bldb-reason {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	height: 1.375rem;
	padding: 0 0.5rem;
	border-radius: 6px;
	background: rgb(var(--c) / 0.07);
	box-shadow: inset 0 0 0 1px rgb(var(--c) / 0.2);
	color: rgb(var(--c));
	font-size: 0.71875rem;
	font-weight: 650;
	line-height: 1;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.bldb-reason::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 2px; background: currentColor; }
.bldb-reason b { font-weight: 700; opacity: 0.65; }
/* Every place a reason is coloured: badges, filter chips, report choices. */
.bldb-reason, .bldb-choice, .bldb-seg a[data-reason] { --c: var(--bldb-r-other); }
.bldb-reason--scam, .bldb-choice--scam, .bldb-seg a[data-reason="scam"] { --c: var(--bldb-r-scam); }
.bldb-reason--resell, .bldb-choice--resell, .bldb-seg a[data-reason="resell"] { --c: var(--bldb-r-resell); }
.bldb-reason--leak, .bldb-choice--leak, .bldb-seg a[data-reason="leak"] { --c: var(--bldb-r-leak); }
.bldb-reason--spam, .bldb-choice--spam, .bldb-seg a[data-reason="spam"] { --c: var(--bldb-r-spam); }
.bldb-reason--fake, .bldb-choice--fake, .bldb-seg a[data-reason="fake"] { --c: var(--bldb-r-fake); }
html.dark .bldb-reason { background: rgb(var(--c) / 0.1); box-shadow: inset 0 0 0 1px rgb(var(--c) / 0.22); }

/* ---------- Flag next to a listed poster / member ---------- */

.bldb-flag {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin-top: 0.375rem;
	height: 1.5rem;
	padding: 0 0.5625rem 0 0.4375rem;
	border-radius: 999px;
	background: var(--bldb-red-soft);
	color: var(--bldb-red-ink);
	font-size: 0.75rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 150ms ease;
}
.bldb-flag .bldb-i { width: 0.875rem; height: 0.875rem; stroke-width: 2.25; }
.bldb-flag:hover { background: rgb(239 68 68 / 0.2); color: var(--bldb-red-ink) !important; text-decoration: none; }

/* ---------- Notice on a listed member's profile ---------- */

.bldb-notice {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1rem;
	padding: 0.875rem 1rem;
	border-radius: var(--bldb-r);
	background: var(--bldb-red-soft);
	color: var(--bldb-ink);
	font-size: 0.875rem;
	line-height: 1.5;
}
.bldb-notice > .bldb-i { width: 2rem; height: 2rem; padding: 0.4375rem; border-radius: 10px; background: var(--bldb-danger); color: #fff; stroke-width: 2.25; }
.bldb-notice strong { color: var(--bldb-red-ink); font-weight: 700; }
.bldb-notice p { margin: 0; color: var(--bldb-sub); }
.bldb-notice a { margin-inline-start: auto; flex: none; padding: 0.4375rem 0.875rem; border-radius: 10px; background: var(--bldb-danger); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }

.bldb-notice a:hover { color: #fff !important; background: var(--bldb-danger-hover); }

/* ---------- Live status dot ---------- */

.bldb-live { position: relative; display: inline-block; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #22c55e; }
.bldb-live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #22c55e; animation: bldb-pulse 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes bldb-pulse {
	0% { opacity: 0.55; transform: scale(1); }
	75%, 100% { opacity: 0; transform: scale(2.75); }
}

/* ---------- Board panel ---------- */

.bldb-widget { display: flex; flex-direction: column; gap: 1rem; margin: 0.5rem 0 1rem; padding: 1.25rem; border: 1px solid var(--bldb-line); border-radius: var(--bldb-r); background: var(--bldb-card); box-shadow: var(--bldb-shadow); color: var(--bldb-ink); font-size: 0.875rem; line-height: 1.4; }
.bldb-widget a, .bldb-widget a:hover { text-decoration: none; }
.bldb-widget-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1rem; }
.bldb-widget-id { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.bldb-widget-mark { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--bldb-danger); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14); }
.bldb-widget-mark .bldb-i { width: 1.25rem; height: 1.25rem; stroke-width: 2.25; }
.bldb-widget-id strong { display: block; color: var(--bldb-ink); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.bldb-widget-id strong + span { display: block; color: var(--bldb-mute); font-size: 0.8125rem; }
.bldb-widget-id:hover strong { color: var(--bldb-ink); }
.bldb-widget-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.bldb-pill { display: inline-flex; align-items: center; gap: 0.4375rem; height: 1.875rem; padding: 0 0.75rem; border-radius: 999px; background: var(--bldb-well); box-shadow: inset 0 0 0 1px var(--bldb-line); color: var(--bldb-sub); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.bldb-pill .bldb-i { width: 0.9375rem; height: 0.9375rem; color: var(--bldb-mute); }
.bldb-widget-body { display: flex; gap: 0.625rem; }
.bldb-widget-form { display: flex; flex: 1; align-items: center; gap: 0.625rem; min-width: 0; height: 3rem; margin: 0; padding: 0 0.3125rem 0 1rem; border: 1px solid var(--bldb-line-strong); border-radius: 12px; background: var(--bldb-card); color: var(--bldb-mute); transition: border-color 150ms ease, box-shadow 150ms ease; }
.bldb-widget-form:hover { border-color: var(--bldb-mute); }
.bldb-widget-form:focus-within { border-color: var(--bldb-accent); box-shadow: 0 0 0 3px var(--bldb-accent-soft); }
.bldb-widget-form > .bldb-i { width: 1.125rem; height: 1.125rem; }
/* The theme rings every focused search input; the field above is the only ring. */
.bldb-widget-form input, .bldb-widget-form input:focus { min-width: 0; flex: 1; height: 100%; padding: 0; border: 0 !important; border-radius: 0; background: transparent; color: var(--bldb-ink); font: inherit; font-size: 0.9375rem; box-shadow: none !important; outline: none !important; -webkit-appearance: none; appearance: none; }
.bldb-widget-form input::placeholder { color: var(--bldb-mute); opacity: 1; }
.bldb-widget-form input::-webkit-search-cancel-button { display: none; }
/* Explicit box model: the theme styles bare buttons (padding, line-height, shadows). */
.bldb-widget .bldb-widget-form button { display: inline-flex; align-items: center; justify-content: center; align-self: center; flex: none; height: 2.25rem; min-width: 0; margin: 0; padding: 0 0.875rem; border: 0; border-radius: 8px; background: var(--bldb-solid); color: var(--bldb-on-solid); font: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap; box-shadow: none; cursor: pointer; transition: transform 120ms var(--bldb-ease), opacity 150ms ease; }
.bldb-widget .bldb-widget-form button:hover { opacity: 0.88; color: var(--bldb-on-solid); }
.bldb-widget-form button:active, .bldb-widget-all:active { transform: scale(0.97); }
.bldb-widget-all { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; flex: none; height: 3rem; padding: 0 1.125rem; border: 1px solid var(--bldb-line-strong); border-radius: 12px; background: var(--bldb-card); color: var(--bldb-ink); font-size: 0.875rem; font-weight: 600; white-space: nowrap; transition: transform 120ms var(--bldb-ease), background-color 150ms ease, border-color 150ms ease; }
.bldb-widget a.bldb-widget-all:hover { border-color: var(--bldb-mute); background: var(--bldb-hover); color: var(--bldb-ink) !important; }
.bldb-widget-all .bldb-i { width: 1rem; height: 1rem; }
.bldb-widget--side { margin: 0; padding: 1rem; }
.bldb-widget--side .bldb-widget-head { flex-direction: column; align-items: flex-start; }
.bldb-widget--side .bldb-widget-body { flex-direction: column; }
.bldb-widget--side .bldb-widget-all { height: 2.5rem; }
/* Narrow sidebars: the search field takes the row, its icon steps aside. */
.bldb-widget--side .bldb-widget-form { padding-left: 0.875rem; }
.bldb-widget--side .bldb-widget-form > .bldb-i { display: none; }
.bldb-widget--side .bldb-widget-form button { padding: 0 0.75rem; }

/* Row inside Zeina's "Information" block */
.bldb-statrow { display: flex; gap: 1rem; }
.bldb-statrow-icon { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; margin-top: 0.125rem; border-radius: 9px; background: #b42318; color: #fff; }
.bldb-statrow-icon .bldb-i { width: 1.125rem; height: 1.125rem; stroke-width: 2.25; }
.bldb-statrow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.bldb-statrow-meta > span { display: inline-flex; align-items: center; gap: 0.4375rem; }

@media (max-width: 640px) {
	.bldb-widget-body { flex-direction: column; }
	.bldb-widget-all { height: 2.75rem; }
	.bldb-notice { flex-wrap: wrap; }
	.bldb-notice a { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.bldb-live::after { animation: none; }
}
