/* B2B Unified Hub — Admin */

.b2buh-wrap .nav-tab-wrapper {
	margin-bottom: 20px;
}

.b2buh-table th {
	width: 220px;
}

.b2buh-help {
	background: #f6f7f7;
	border-left: 4px solid #2271b1;
	padding: 10px 14px;
	margin-top: 8px;
	max-width: 640px;
}

.b2buh-help ol {
	margin: 6px 0 0 18px;
}

.b2buh-help li {
	margin-bottom: 4px;
}

.b2buh-test-result {
	margin-left: 8px;
	font-weight: 600;
}

.b2buh-test-result.is-ok {
	color: #008a20;
}

.b2buh-test-result.is-fail {
	color: #d63638;
}

.b2buh-progress {
	margin-left: 8px;
	font-style: italic;
	color: #646970;
}

.b2buh-progressbar {
	position: relative;
	height: 18px;
	background: #e0e0e0;
	border-radius: 9px;
	max-width: 640px;
	overflow: hidden;
	margin-top: 12px;
}

.b2buh-progressbar-fill {
	height: 100%;
	width: 0;
	background: #2271b1;
	transition: width 0.4s ease;
}

.b2buh-progressbar-label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: #1d2327;
}

/* Compact per-row progress bar */
.b2buh-progressbar--mini {
	height: 8px;
	max-width: 140px;
	margin-top: 6px;
	border-radius: 4px;
}

.b2buh-progressbar--mini .b2buh-progressbar-fill {
	transition: width 0.6s ease;
}

/* Modal (shared admin) */
.b2buh-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.b2buh-modal-inner {
	background: #fff;
	border-radius: 8px;
	padding: 24px;
	width: min(640px, 92vw);
	max-height: 80vh;
	overflow-y: auto;
}

.b2buh-modal-inner pre {
	white-space: pre-wrap;
	background: #f6f7f7;
	padding: 10px;
	border-radius: 4px;
	max-height: 320px;
	overflow-y: auto;
}

.b2buh-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	background: #e0e0e0;
}

.b2buh-status-new {
	background: #cce5ff;
}

.b2buh-status-replied {
	background: #d4edda;
}

.b2buh-status-ai_replied {
	background: #fff3cd;
}

.b2buh-rfq-msg {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 8px 12px;
	margin-bottom: 8px;
}

.b2buh-rfq-msg .meta {
	font-size: 11px;
	color: #646970;
	margin-bottom: 4px;
}

.b2buh-rfq-msg.inbound {
	background: #f0f6fb;
}

.b2buh-rfq-msg.outbound {
	background: #f6f6f6;
}

/* Founder review screen */
.b2buh-review {
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 20px;
	margin-top: 24px;
	background: #fff;
}

.b2buh-note {
	background: #fff8e5;
	border-left: 4px solid #ffb900;
	padding: 8px 12px;
}

.b2buh-review-images {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0;
}

.b2buh-review-img {
	position: relative;
	width: 140px;
	text-align: center;
}

.b2buh-review-img img {
	width: 140px;
	height: 140px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
}

.b2buh-review-img small {
	display: block;
	color: #646970;
	margin-top: 4px;
}

.b2buh-review-img-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	line-height: 1;
	padding: 2px 7px !important;
}

.b2buh-spec-row input {
	margin-right: 6px;
}

.b2buh-review-actions {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

/* Founder image generation */
.b2buh-image-actions .b2buh-gen-image {
	margin-right: 6px;
	margin-bottom: 6px;
}

.b2buh-review-img img {
	cursor: zoom-in;
}

.b2buh-saved {
	color: #008a20;
	font-weight: 600;
}

#b2buh-review-publish:disabled,
#b2buh-review-draft:disabled {
	opacity: .55;
}

/* Image lightbox (enlarge + regenerate) */
.b2buh-progressbar.is-indeterminate .b2buh-progressbar-fill {
	width: 40% !important;
	animation: b2buh-indeterminate 1.4s ease-in-out infinite;
}

@keyframes b2buh-indeterminate {
	0%   { margin-left: 0; }
	50%  { margin-left: 60%; }
	100% { margin-left: 0; }
}

#b2buh-image-progress,
#b2buh-img-modal-progress {
	max-width: 420px;
	margin: 8px 0;
	height: 16px;
	border-radius: 8px;
}

#b2buh-image-progress .b2buh-progressbar-label,
#b2buh-img-modal-progress .b2buh-progressbar-label {
	font-size: 10px;
}

.b2buh-img-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .72);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px;
	box-sizing: border-box;
}

.b2buh-img-modal-inner {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 18px;
	max-width: 920px;
	width: 100%;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.b2buh-img-modal-inner img {
	display: block;
	max-width: 100%;
	max-height: 62vh;
	margin: 0 auto 14px;
	border-radius: 6px;
	background: #f6f7f7;
}

.b2buh-img-modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #1d2327;
}

.b2buh-img-modal-tools select {
	margin-left: 6px;
}

#b2buh-img-modal-status {
	margin-left: 8px;
	color: #646970;
}

/* ---------- Bulk Orders: quote builder (admin) ---------- */
.b2buh-q-results {
	position: absolute;
	z-index: 50;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
	max-height: 220px;
	overflow-y: auto;
	min-width: 280px;
}

.b2buh-q-result {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13px;
}

.b2buh-q-result:hover {
	background: #eff6ff;
}
