/*
 * FlexData Bulk Purchases — frontend styles.
 *
 * Every rule is scoped under .fdbp-scope and every class carries the fdbp-
 * prefix, so nothing here can reach the rest of the site. No element, tag or
 * global selectors are used.
 */

.fdbp-scope {
	--fdbp-bg: #f4f6fb;
	--fdbp-surface: #ffffff;
	--fdbp-surface-2: #f8fafc;
	--fdbp-border: #e4e9f2;
	--fdbp-border-strong: #cbd5e1;
	--fdbp-text: #0f172a;
	--fdbp-muted: #64748b;
	--fdbp-faint: #94a3b8;
	--fdbp-primary: #3b5bff;
	--fdbp-primary-ink: #ffffff;
	--fdbp-ok: #059669;
	--fdbp-ok-bg: #ecfdf5;
	--fdbp-ok-border: #a7f3d0;
	--fdbp-bad: #dc2626;
	--fdbp-bad-bg: #fef2f2;
	--fdbp-bad-border: #fecaca;
	--fdbp-warn: #b45309;
	--fdbp-warn-bg: #fffbeb;
	--fdbp-warn-border: #fde68a;
	--fdbp-radius: 16px;
	--fdbp-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);

	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--fdbp-text);
	-webkit-font-smoothing: antialiased;
	line-height: 1.5;
}

.fdbp-scope *,
.fdbp-scope *::before,
.fdbp-scope *::after {
	box-sizing: border-box;
}

/*
 * The browser hides [hidden] with a UA-level `display: none`, which ANY author
 * `display` rule outranks — so a flex row with the hidden attribute set stays
 * on screen. Restore the guarantee inside our subtree so toggling .hidden in
 * JS always works, whatever display value the element happens to carry.
 */
.fdbp-scope [hidden] {
	display: none !important;
}

/* Dark mode: follows the site toggle (.fdbp-dark, set by bulk.js from the same
   localStorage key the rest of FlexData uses) and the OS preference. */
.fdbp-scope.fdbp-dark {
	--fdbp-bg: #0d1117;
	--fdbp-surface: #161b22;
	--fdbp-surface-2: #1c232c;
	--fdbp-border: rgba(255, 255, 255, .10);
	--fdbp-border-strong: rgba(255, 255, 255, .20);
	--fdbp-text: #e6edf3;
	--fdbp-muted: #9aa7b6;
	--fdbp-faint: #6b7684;
	--fdbp-primary: #4d7fff;
	--fdbp-ok: #34d399;
	--fdbp-ok-bg: rgba(16, 185, 129, .12);
	--fdbp-ok-border: rgba(16, 185, 129, .28);
	--fdbp-bad: #f87171;
	--fdbp-bad-bg: rgba(239, 68, 68, .11);
	--fdbp-bad-border: rgba(239, 68, 68, .26);
	--fdbp-warn: #fbbf24;
	--fdbp-warn-bg: rgba(251, 191, 36, .10);
	--fdbp-warn-border: rgba(251, 191, 36, .26);
	--fdbp-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .45);
}

/* ── Standalone page shell ──────────────────────────────────────────────────
 * Only used when the FlexData Standalone Page Toolkit serves this URL. That
 * document has no theme, so the page paints its own full-bleed background
 * rather than sitting on the browser's default white.
 */

.fdbp-page {
	background: var(--fdbp-bg);
	min-height: 100vh;
	width: 100%;
}

/* The toolkit renders the admin bar, but WordPress only prints its layout
   offset from wp_head() — which a standalone document never fires. Re-create
   that offset here, and ONLY for the standalone layout: on a themed page
   WordPress prints it already and this would double up. Heights match core:
   46px on small screens, 32px from 783px up. */
body.admin-bar .fdbp-page {
	padding-top: 46px;
}

@media screen and (min-width: 783px) {
	body.admin-bar .fdbp-page {
		padding-top: 32px;
	}
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

#fdbp-app {
	max-width: 940px;
	margin: 0 auto;
	padding: 16px 14px 56px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.fdbp-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 4px 2px 0;
}

.fdbp-header__title {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.6px;
	margin: 0 0 2px;
	color: var(--fdbp-text);
	line-height: 1.15;
}

.fdbp-header__subtitle {
	font-size: 14px;
	color: var(--fdbp-muted);
	margin: 0;
}

.fdbp-wallet {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--fdbp-surface);
	border: 1px solid var(--fdbp-border);
	border-radius: 12px;
	padding: 9px 14px;
	box-shadow: var(--fdbp-shadow);
}

.fdbp-wallet__label {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .8px;
	text-transform: uppercase;
	color: var(--fdbp-faint);
}

.fdbp-wallet__value {
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -.3px;
	font-variant-numeric: tabular-nums;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.fdbp-card {
	background: var(--fdbp-surface);
	border: 1px solid var(--fdbp-border);
	border-radius: var(--fdbp-radius);
	padding: 16px;
	box-shadow: var(--fdbp-shadow);
}

.fdbp-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.fdbp-card__title {
	font-size: 15px;
	font-weight: 800;
	margin: 0;
	letter-spacing: -.2px;
}

.fdbp-step {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--fdbp-primary);
	color: var(--fdbp-primary-ink);
	font-size: 11px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* ── Network picker ─────────────────────────────────────────────────────── */

.fdbp-networks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.fdbp-network {
	--fdbp-net: var(--fdbp-primary);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 13px 14px;
	border: 1.5px solid var(--fdbp-border);
	border-radius: 13px;
	background: var(--fdbp-surface-2);
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	transition: border-color .16s, background .16s, transform .12s;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	min-height: 68px;
}

.fdbp-network:hover:not(:disabled) {
	border-color: var(--fdbp-border-strong);
}

.fdbp-network:active:not(:disabled) {
	transform: scale(.985);
}

.fdbp-network:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--fdbp-primary) 40%, transparent);
	outline-offset: 2px;
}

.fdbp-network[aria-checked="true"] {
	border-color: var(--fdbp-net);
	background: color-mix(in srgb, var(--fdbp-net) 10%, var(--fdbp-surface));
	box-shadow: inset 0 0 0 1px var(--fdbp-net);
}

.fdbp-network:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.fdbp-network__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--fdbp-net);
	margin-bottom: 4px;
}

.fdbp-network__name {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: -.2px;
	color: var(--fdbp-text);
}

.fdbp-network__meta {
	font-size: 11px;
	font-weight: 600;
	color: var(--fdbp-faint);
}


/* ── Input ──────────────────────────────────────────────────────────────── */

.fdbp-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--fdbp-muted);
	margin-bottom: 7px;
}

.fdbp-textarea {
	width: 100%;
	min-height: 190px;
	padding: 13px 14px;
	border: 1.5px solid var(--fdbp-border);
	border-radius: 12px;
	background: var(--fdbp-surface-2);
	color: var(--fdbp-text);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 15px;
	line-height: 1.75;
	resize: vertical;
	transition: border-color .16s, box-shadow .16s;
}

.fdbp-textarea:focus {
	outline: none;
	border-color: var(--fdbp-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fdbp-primary) 16%, transparent);
}

.fdbp-textarea::placeholder {
	color: var(--fdbp-faint);
}

.fdbp-help {
	font-size: 11.5px;
	color: var(--fdbp-faint);
	margin: 7px 0 0;
	line-height: 1.6;
}

.fdbp-help code {
	background: var(--fdbp-surface-2);
	border: 1px solid var(--fdbp-border);
	border-radius: 5px;
	padding: 1px 5px;
	font-size: 11px;
	color: var(--fdbp-muted);
}

.fdbp-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.fdbp-file {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.fdbp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 15px;
	border-radius: 10px;
	border: 1.5px solid transparent;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .16s, background .16s, border-color .16s, transform .12s;
	-webkit-tap-highlight-color: transparent;
	text-decoration: none;
	line-height: 1.2;
}

.fdbp-btn:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--fdbp-primary) 40%, transparent);
	outline-offset: 2px;
}

.fdbp-btn:active:not(:disabled) {
	transform: scale(.98);
}

.fdbp-btn--primary {
	background: var(--fdbp-primary);
	color: var(--fdbp-primary-ink);
}

.fdbp-btn--primary:hover:not(:disabled) {
	filter: brightness(1.08);
}

.fdbp-btn--primary:disabled {
	background: var(--fdbp-border-strong);
	color: var(--fdbp-surface);
	cursor: not-allowed;
	opacity: .8;
}

.fdbp-btn--ghost {
	background: var(--fdbp-surface-2);
	border-color: var(--fdbp-border);
	color: var(--fdbp-muted);
}

.fdbp-btn--ghost:hover:not(:disabled) {
	border-color: var(--fdbp-border-strong);
	color: var(--fdbp-text);
}

.fdbp-btn--danger {
	color: var(--fdbp-bad);
}

.fdbp-btn--block {
	width: 100%;
	padding: 15px;
	font-size: 15.5px;
	font-weight: 800;
	margin-top: 14px;
}

/* ── Notices ────────────────────────────────────────────────────────────── */

.fdbp-notice,
.fdbp-alert {
	margin-top: 12px;
	padding: 11px 13px;
	border-radius: 11px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.55;
	border: 1px solid var(--fdbp-border);
	background: var(--fdbp-surface-2);
	color: var(--fdbp-muted);
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.fdbp-notice--ok {
	background: var(--fdbp-ok-bg);
	border-color: var(--fdbp-ok-border);
	color: var(--fdbp-ok);
}

.fdbp-notice--warn,
.fdbp-alert--warn {
	background: var(--fdbp-warn-bg);
	border-color: var(--fdbp-warn-border);
	color: var(--fdbp-warn);
}

.fdbp-notice--bad,
.fdbp-alert--danger {
	background: var(--fdbp-bad-bg);
	border-color: var(--fdbp-bad-border);
	color: var(--fdbp-bad);
}

/* ── Filters ────────────────────────────────────────────────────────────── */

.fdbp-filters {
	display: flex;
	gap: 6px;
	margin-left: auto;
	flex-wrap: wrap;
}

.fdbp-chip {
	border: 1.5px solid var(--fdbp-border);
	background: var(--fdbp-surface-2);
	color: var(--fdbp-muted);
	border-radius: 100px;
	padding: 5px 11px;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .16s, color .16s;
	-webkit-tap-highlight-color: transparent;
}

.fdbp-chip.is-active {
	border-color: var(--fdbp-primary);
	color: var(--fdbp-primary);
}

.fdbp-chip:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--fdbp-primary) 40%, transparent);
	outline-offset: 2px;
}

/* ── Review rows (cards, not a table — they must work at 360px) ─────────── */

/*
 * NO max-height and NO overflow here, deliberately.
 *
 * A nested scroll container over these cards is what made the page feel frozen
 * on Android: a touch that starts on the list is captured by the inner
 * scroller, and once it has hit its own top or bottom the gesture is spent —
 * the page behind never moves. The list simply grows and the page scrolls as
 * one surface, which is also what a phone user expects. Long lists are handled
 * by capping how many rows are rendered, not by trapping the scroll.
 */
.fdbp-rows {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fdbp-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--fdbp-border);
	border-left-width: 4px;
	border-radius: 11px;
	background: var(--fdbp-surface-2);
	list-style: none;
}

.fdbp-row--valid {
	border-left-color: var(--fdbp-ok);
}

.fdbp-row--invalid {
	border-left-color: var(--fdbp-bad);
}

.fdbp-row--duplicate {
	border-left-color: var(--fdbp-warn);
}

.fdbp-row__icon {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

.fdbp-row--valid .fdbp-row__icon {
	background: var(--fdbp-ok-bg);
	color: var(--fdbp-ok);
}

.fdbp-row--invalid .fdbp-row__icon {
	background: var(--fdbp-bad-bg);
	color: var(--fdbp-bad);
}

.fdbp-row--duplicate .fdbp-row__icon {
	background: var(--fdbp-warn-bg);
	color: var(--fdbp-warn);
}

.fdbp-row__main {
	flex: 1;
	min-width: 0;
}

/* The number is the thing being scanned, so it leads. */
.fdbp-row__phone {
	display: block;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .3px;
	font-variant-numeric: tabular-nums;
	color: var(--fdbp-text);
	line-height: 1.25;
}

.fdbp-row__meta {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--fdbp-muted);
	margin-top: 1px;
}

.fdbp-row--valid .fdbp-row__meta {
	color: var(--fdbp-ok);
}

.fdbp-row__dot {
	opacity: .5;
	margin: 0 2px;
}

/* Failure reason gets its own line so a long message never squeezes
   the number, and it is never the colour alone doing the talking. */
.fdbp-row__reason {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.4;
	margin-top: 2px;
	color: var(--fdbp-bad);
}

.fdbp-row--duplicate .fdbp-row__reason {
	color: var(--fdbp-warn);
}

.fdbp-row__price {
	font-size: 14px;
	font-weight: 800;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	margin-top: 1px;
}

.fdbp-row__remove {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	border: 1px solid var(--fdbp-border);
	background: var(--fdbp-surface);
	color: var(--fdbp-faint);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	transition: color .16s, border-color .16s;
	-webkit-tap-highlight-color: transparent;
}

.fdbp-row__remove:hover {
	color: var(--fdbp-bad);
	border-color: var(--fdbp-bad-border);
}

.fdbp-row__remove:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--fdbp-primary) 40%, transparent);
	outline-offset: 1px;
}

.fdbp-rows__more {
	font-size: 11.5px;
	color: var(--fdbp-faint);
	text-align: center;
	margin: 9px 0 0;
}

.fdbp-rows__empty {
	text-align: center;
	padding: 26px 12px;
	color: var(--fdbp-faint);
	font-size: 13px;
}

/* ── Summary ────────────────────────────────────────────────────────────── */

.fdbp-summary {
	margin-top: 14px;
	border: 1px solid var(--fdbp-border);
	border-radius: 13px;
	overflow: hidden;
	background: var(--fdbp-surface-2);
}

/* A plain label/value ledger reads faster than a grid of tiles, and stays
   the same shape on a 360px phone as on a desktop. */
.fdbp-summary__list {
	margin: 0;
	padding: 4px 0;
}

.fdbp-sumrow {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 14px;
}

.fdbp-sumrow dt {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--fdbp-muted);
	margin: 0;
}

.fdbp-sumrow dd {
	font-size: 14px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	margin: 0;
	color: var(--fdbp-text);
}

.fdbp-sumrow--ok dd { color: var(--fdbp-ok); }
.fdbp-sumrow--bad dd { color: var(--fdbp-bad); }
.fdbp-sumrow--warn dd { color: var(--fdbp-warn); }

.fdbp-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px;
	border-top: 1px solid var(--fdbp-border);
	background: var(--fdbp-surface);
}

.fdbp-total__label {
	font-size: 12px;
	font-weight: 700;
	color: var(--fdbp-muted);
}

.fdbp-total__value {
	font-size: 21px;
	font-weight: 900;
	letter-spacing: -.6px;
	font-variant-numeric: tabular-nums;
}

.fdbp-purchase-note {
	font-size: 11.5px;
	color: var(--fdbp-faint);
	text-align: center;
	margin: 8px 0 0;
}

/* ── Modals ─────────────────────────────────────────────────────────────── */

.fdbp-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
}

.fdbp-modal[hidden] {
	display: none;
}

.fdbp-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 15, 30, .68);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.fdbp-modal__panel {
	position: relative;
	width: 100%;
	max-width: 430px;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	background: var(--fdbp-surface);
	border-radius: 18px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, .38);
	overflow: hidden;
	animation: fdbpPop .22s cubic-bezier(.22, .68, 0, 1.15);
}

.fdbp-modal__panel--tall {
	max-width: 520px;
}

@keyframes fdbpPop {
	from { transform: scale(.95) translateY(10px); opacity: 0; }
	to   { transform: scale(1) translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.fdbp-modal__panel { animation: none; }
	.fdbp-btn, .fdbp-network { transition: none; }
}

.fdbp-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 15px 16px;
	border-bottom: 1px solid var(--fdbp-border);
}

.fdbp-modal__title {
	font-size: 16px;
	font-weight: 800;
	margin: 0;
	letter-spacing: -.3px;
}

.fdbp-modal__close {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid var(--fdbp-border);
	background: var(--fdbp-surface-2);
	color: var(--fdbp-muted);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.fdbp-modal__body {
	padding: 15px 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	flex: 1;
}

.fdbp-modal__foot {
	display: flex;
	gap: 9px;
	padding: 13px 16px;
	border-top: 1px solid var(--fdbp-border);
	background: var(--fdbp-surface-2);
}

.fdbp-modal__foot .fdbp-btn {
	flex: 1;
	padding: 13px;
	font-size: 14px;
}

/* Confirmation detail list */

.fdbp-detail {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--fdbp-border);
	font-size: 13.5px;
}

.fdbp-detail:last-of-type {
	border-bottom: none;
}

.fdbp-detail__label {
	color: var(--fdbp-muted);
	font-weight: 600;
}

.fdbp-detail__value {
	font-weight: 800;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.fdbp-detail--total .fdbp-detail__value {
	font-size: 17px;
}

.fdbp-detail--negative .fdbp-detail__value {
	color: var(--fdbp-bad);
}

/* ── Progress ───────────────────────────────────────────────────────────── */

.fdbp-progress__ref {
	font-size: 11px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--fdbp-faint);
	margin: 0 0 10px;
	word-break: break-all;
}

.fdbp-progress__bar {
	height: 8px;
	border-radius: 100px;
	background: var(--fdbp-border);
	overflow: hidden;
}

.fdbp-progress__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 100px;
	background: var(--fdbp-primary);
	transition: width .25s ease;
}

.fdbp-progress__count {
	font-size: 13px;
	font-weight: 700;
	margin: 9px 0 12px;
	color: var(--fdbp-muted);
	font-variant-numeric: tabular-nums;
}

/* The modal body is the scroller. A nested one here would trap the same
   touch gesture the review list used to. */
.fdbp-queue {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.fdbp-qrow {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 10px;
	border-radius: 9px;
	background: var(--fdbp-surface-2);
	border: 1px solid var(--fdbp-border);
	font-size: 12.5px;
}

.fdbp-qrow__mark {
	width: 17px;
	text-align: center;
	flex-shrink: 0;
	font-weight: 800;
}

.fdbp-qrow--accepted .fdbp-qrow__mark { color: var(--fdbp-ok); }
.fdbp-qrow--failed .fdbp-qrow__mark { color: var(--fdbp-bad); }
.fdbp-qrow--skipped .fdbp-qrow__mark,
.fdbp-qrow--unresolved .fdbp-qrow__mark { color: var(--fdbp-warn); }
.fdbp-qrow--pending .fdbp-qrow__mark { color: var(--fdbp-faint); }
.fdbp-qrow--processing .fdbp-qrow__mark { color: var(--fdbp-primary); }

.fdbp-qrow--accepted { border-color: var(--fdbp-ok-border); }
.fdbp-qrow--failed { border-color: var(--fdbp-bad-border); }
.fdbp-qrow--processing {
	border-color: var(--fdbp-primary);
	background: color-mix(in srgb, var(--fdbp-primary) 7%, var(--fdbp-surface-2));
}

.fdbp-qrow__body {
	flex: 1;
	min-width: 0;
}

.fdbp-qrow__line {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.fdbp-qrow__note {
	font-size: 11px;
	color: var(--fdbp-faint);
	display: block;
	margin-top: 1px;
}

.fdbp-qrow--failed .fdbp-qrow__note { color: var(--fdbp-bad); }

.fdbp-spinner {
	display: inline-block;
	width: 13px;
	height: 13px;
	border: 2px solid var(--fdbp-border-strong);
	border-top-color: var(--fdbp-primary);
	border-radius: 50%;
	animation: fdbpSpin .7s linear infinite;
	vertical-align: -2px;
}

@keyframes fdbpSpin {
	to { transform: rotate(360deg); }
}

.fdbp-loading {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--fdbp-muted);
	font-size: 13px;
	padding: 14px 0;
}

.fdbp-results {
	margin-top: 14px;
	border-top: 1px solid var(--fdbp-border);
	padding-top: 12px;
}

.fdbp-results__title {
	font-size: 13px;
	font-weight: 800;
	margin: 0 0 8px;
}

/* ── Login gate ─────────────────────────────────────────────────────────── */

.fdbp-gate {
	max-width: 430px;
	margin: 34px auto;
	text-align: center;
	background: var(--fdbp-surface);
	border: 1px solid var(--fdbp-border);
	border-radius: var(--fdbp-radius);
	padding: 34px 24px;
	box-shadow: var(--fdbp-shadow);
}

.fdbp-gate__icon {
	width: 46px;
	height: 46px;
	margin: 0 auto 14px;
	color: var(--fdbp-primary);
}

.fdbp-gate__icon svg {
	width: 100%;
	height: 100%;
}

.fdbp-gate__title {
	font-size: 19px;
	font-weight: 800;
	margin: 0 0 7px;
}

.fdbp-gate__text {
	font-size: 13.5px;
	color: var(--fdbp-muted);
	margin: 0 0 18px;
	line-height: 1.6;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
	.fdbp-networks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	#fdbp-app { padding: 24px 20px 64px; gap: 16px; }
	.fdbp-card { padding: 20px; }
	.fdbp-header__title { font-size: 30px; }
}

@media (max-width: 420px) {
	.fdbp-header__title { font-size: 23px; }
	.fdbp-wallet { width: 100%; justify-content: space-between; }
	.fdbp-filters { width: 100%; margin-left: 0; }
	.fdbp-row { flex-wrap: wrap; }
	.fdbp-row__price { margin-left: auto; }
	.fdbp-btn { flex: 1 1 auto; }
}

/* "You can close this page" reassurance under the progress bar. */
.fdbp-progress__safe {
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--fdbp-muted);
	background: var(--fdbp-surface-2);
	border: 1px solid var(--fdbp-border);
	border-radius: 9px;
	padding: 8px 11px;
	margin: 0 0 12px;
}
