/* TradeBase Part Finder. Override --tbpf-accent in your theme to re-colour. */
.tbpf {
	--tbpf-accent: #1d5fa8;
	--tbpf-accent-ink: #fff;
	--tbpf-ink: #1b1f24;
	--tbpf-muted: #5b6573;
	--tbpf-line: #dfe3e8;
	--tbpf-soft: #f5f7fa;
	--tbpf-high: #1f7a3f;
	--tbpf-mid: #9a6a00;
	--tbpf-low: #8a8f98;
	--tbpf-warn-bg: #fff7e6;
	--tbpf-warn-line: #f0c36d;
	--tbpf-radius: 12px;
	max-width: 760px;
	margin: 0 auto;
	color: var(--tbpf-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.tbpf *, .tbpf *::before, .tbpf *::after { box-sizing: border-box; }
.tbpf [hidden] { display: none !important; }

.tbpf-title { margin: 0 0 .25em; font-size: 1.6em; line-height: 1.2; }
.tbpf-intro { margin: 0 0 1.25em; color: var(--tbpf-muted); }

.tbpf-drop {
	border: 2px dashed var(--tbpf-line);
	border-radius: var(--tbpf-radius);
	background: var(--tbpf-soft);
	padding: 28px 16px;
	text-align: center;
	transition: border-color .15s, background .15s;
}
.tbpf-drop.is-over { border-color: var(--tbpf-accent); background: #eef4fb; }
.tbpf-drop-empty svg { color: var(--tbpf-accent); margin-bottom: 8px; }
.tbpf-drop-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tbpf-hint { margin: 10px 0 0; font-size: .875em; color: var(--tbpf-muted); }
.tbpf-preview img { max-width: 100%; max-height: 340px; border-radius: 8px; display: block; margin: 0 auto 10px; }

.tbpf-tips { margin: 14px 0 18px; padding: 0 0 0 1.2em; color: var(--tbpf-muted); font-size: .9em; }
.tbpf-tips li { margin: 2px 0; }

.tbpf-label { display: block; font-weight: 600; margin-bottom: 6px; }
.tbpf-label span, .tbpf-enquiry label span { font-weight: 400; color: var(--tbpf-muted); }
.tbpf textarea, .tbpf input[type="text"], .tbpf input[type="email"], .tbpf input[type="tel"] {
	width: 100%;
	border: 1px solid var(--tbpf-line);
	border-radius: 8px;
	padding: 10px 12px;
	font: inherit;
	color: inherit;
	background: #fff;
}
.tbpf textarea:focus, .tbpf input:focus { outline: 2px solid var(--tbpf-accent); outline-offset: 1px; border-color: transparent; }
.tbpf-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.tbpf-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 0 20px;
	border-radius: 999px; border: 2px solid var(--tbpf-accent);
	font: inherit; font-weight: 600; line-height: 1; text-decoration: none !important;
	cursor: pointer; transition: opacity .15s, background .15s;
}
.tbpf-btn-primary { background: var(--tbpf-accent); color: var(--tbpf-accent-ink) !important; }
.tbpf-btn-ghost { background: #fff; color: var(--tbpf-accent) !important; }
.tbpf-btn:hover { opacity: .9; }
.tbpf-btn:disabled { opacity: .45; cursor: not-allowed; }
.tbpf-btn-sm { min-height: 38px; padding: 0 16px; font-size: .9em; }
.tbpf-submit { width: 100%; margin-top: 16px; }
.tbpf-link { background: none; border: 0; padding: 0; color: var(--tbpf-accent); font: inherit; text-decoration: underline; cursor: pointer; }

.tbpf-error { margin: 10px 0 0; color: #b42318; font-size: .925em; }

.tbpf-loading { text-align: center; padding: 48px 16px; color: var(--tbpf-muted); }
.tbpf-spinner {
	width: 40px; height: 40px; margin: 0 auto 14px;
	border: 4px solid var(--tbpf-line); border-top-color: var(--tbpf-accent);
	border-radius: 50%; animation: tbpf-spin .9s linear infinite;
}
@keyframes tbpf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tbpf-spinner { animation-duration: 3s; } }

.tbpf-summary { margin: 4px 0 16px; }
.tbpf-summary-kicker { margin: 0; font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--tbpf-muted); }
.tbpf-summary-lead { margin: 2px 0 0; font-size: 1.1em; font-weight: 600; }

.tbpf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tbpf-card {
	display: grid; grid-template-columns: 120px 1fr; gap: 14px;
	border: 1px solid var(--tbpf-line); border-radius: var(--tbpf-radius);
	padding: 12px; background: #fff; margin: 0;
}
.tbpf-card-img { position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--tbpf-soft); aspect-ratio: 1 / 1; }
.tbpf-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tbpf-rank {
	position: absolute; top: 6px; left: 6px;
	width: 24px; height: 24px; border-radius: 50%;
	background: var(--tbpf-ink); color: #fff; font-size: .75em; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.tbpf-card-body { min-width: 0; }
.tbpf-pill { display: inline-block; font-size: .75em; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; }
.tbpf-pill-high { background: var(--tbpf-high); }
.tbpf-pill-mid { background: var(--tbpf-mid); }
.tbpf-pill-low { background: var(--tbpf-low); }
.tbpf-card-name { display: block; margin: 6px 0 2px; font-weight: 600; color: var(--tbpf-ink) !important; text-decoration: none; line-height: 1.3; }
.tbpf-card-name:hover { text-decoration: underline; }
.tbpf-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .875em; color: var(--tbpf-muted); }
.tbpf-price { color: var(--tbpf-ink); font-weight: 700; }
.tbpf-oos { color: #b42318; }
.tbpf-reason { margin: 6px 0 8px; font-size: .9em; color: var(--tbpf-muted); }
.tbpf-bar { height: 4px; background: var(--tbpf-soft); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.tbpf-bar span { display: block; height: 100%; background: var(--tbpf-accent); }

.tbpf-tip { margin: 14px 0 0; padding: 10px 12px; background: var(--tbpf-soft); border-radius: 8px; font-size: .925em; }

.tbpf-help { margin-top: 18px; padding: 16px; border: 1px solid var(--tbpf-line); border-radius: var(--tbpf-radius); background: #fff; }
.tbpf-help.is-warn { background: var(--tbpf-warn-bg); border-color: var(--tbpf-warn-line); }
.tbpf-help-head p { margin: 2px 0 12px; color: var(--tbpf-muted); font-size: .925em; }
.tbpf-enquiry { display: grid; gap: 10px; }
.tbpf-enquiry label { display: grid; gap: 4px; font-weight: 600; font-size: .925em; }
.tbpf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tbpf-sent { margin: 0; font-weight: 600; color: var(--tbpf-high); }

.tbpf-again { display: block; margin: 18px auto 0; }
.tbpf-disclaimer { margin: 18px 0 0; text-align: center; font-size: .8em; color: var(--tbpf-muted); }

@media (max-width: 520px) {
	.tbpf-card { grid-template-columns: 88px 1fr; gap: 10px; padding: 10px; }
	.tbpf-row { grid-template-columns: 1fr; }
	.tbpf-drop-actions .tbpf-btn { flex: 1 1 100%; }
}
