/**
 * WooCommerce B2B Customer Portal - frontend styles.
 *
 * Every rule is scoped under .wcb2bcp-portal so no theme or WooCommerce
 * styling is affected. Loaded only on portal pages.
 */

.wcb2bcp-portal {
	--wcb2bcp-primary: #ff5a1f;
	--wcb2bcp-primary-dark: #e64a12;
	--wcb2bcp-accent: #0f766e;
	--wcb2bcp-sidebar-bg: #003f2f;
	--wcb2bcp-sidebar-text: #cfe0d9;
	--wcb2bcp-bg: #f7f8f6;
	--wcb2bcp-card-bg: #fff;
	--wcb2bcp-text: #111827;
	--wcb2bcp-muted: #6b7280;
	--wcb2bcp-border: #e5e7eb;
	--wcb2bcp-radius: 14px;
	--wcb2bcp-button-radius: 10px;
	--wcb2bcp-shadow: 0 8px 24px rgba(15, 23, 42, .08);
	--wcb2bcp-gap: 20px;
	--wcb2bcp-pad: 22px;
	--wcb2bcp-sidebar-w: 232px;

	box-sizing: border-box;
	width: 100%;
	margin: 0;
	background: var(--wcb2bcp-bg);
	color: var(--wcb2bcp-text);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.wcb2bcp-portal *,
.wcb2bcp-portal *::before,
.wcb2bcp-portal *::after {
	box-sizing: border-box;
}

.wcb2bcp-portal img {
	max-width: 100%;
	height: auto;
}

.wcb2bcp-portal-shell {
	display: grid;
	grid-template-columns: var(--wcb2bcp-sidebar-w) minmax(0, 1fr);
	align-items: stretch;
	min-height: 640px;
}

.wcb2bcp-portal.wcb2bcp-no-shell .wcb2bcp-portal-shell {
	grid-template-columns: minmax(0, 1fr);
}

/* ------------------------------------------------------------------ *
 * Sidebar
 * ------------------------------------------------------------------ */

.wcb2bcp-sidebar {
	display: flex;
	flex-direction: column;
	background: var(--wcb2bcp-sidebar-bg);
	color: var(--wcb2bcp-sidebar-text);
}

.wcb2bcp-sidebar-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 108px;
	padding: 22px 18px;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.wcb2bcp-sidebar-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 56px;
	margin: 0 auto;
	object-fit: contain;
}

.wcb2bcp-sidebar-logo-text {
	display: -webkit-box;
	overflow: hidden;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.3;
	text-align: center;
	/* Site titles are often a long SEO phrase; keep the header from
	   swallowing the first menu items. */
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.wcb2bcp-sidebar-menu {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	padding: 14px 10px;
}

.wcb2bcp-portal .wcb2bcp-sidebar-link {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 11px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	box-shadow: none;
	color: var(--wcb2bcp-sidebar-text);
	font-size: 14.5px;
	font-weight: 500;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.wcb2bcp-portal .wcb2bcp-sidebar-link:hover,
.wcb2bcp-portal .wcb2bcp-sidebar-link:focus {
	background: var(--wcb2bcp-menu-hover-bg, rgba(255, 255, 255, .09));
	color: var(--wcb2bcp-menu-hover-text, #fff);
	text-decoration: none;
}

.wcb2bcp-portal .wcb2bcp-sidebar-link-active,
.wcb2bcp-portal .wcb2bcp-sidebar-link-active:hover,
.wcb2bcp-portal .wcb2bcp-sidebar-link-active:focus {
	position: relative;
	background: var(--wcb2bcp-menu-active-bg, rgba(255, 255, 255, .1));
	color: var(--wcb2bcp-menu-active-text, var(--wcb2bcp-primary));
	font-weight: 650;
}

.wcb2bcp-portal .wcb2bcp-sidebar-link-active::before {
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: -10px;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--wcb2bcp-menu-active-text, var(--wcb2bcp-primary));
	content: "";
}

.wcb2bcp-icon {
	flex: 0 0 18px;
}

.wcb2bcp-sidebar-footer {
	padding: 14px;
}

.wcb2bcp-sidebar-help-card {
	padding: 16px;
	border-radius: 12px;
	margin-bottom: 14px;
	background: rgba(255, 255, 255, .07);
}

.wcb2bcp-sidebar-help-card strong {
	display: block;
	margin-bottom: 4px;
	color: #fff;
	font-size: 14.5px;
}

.wcb2bcp-sidebar-help-card p {
	margin: 0 0 12px;
	color: var(--wcb2bcp-sidebar-text);
	font-size: 12.5px;
	line-height: 1.5;
}

.wcb2bcp-sidebar-copy {
	margin: 0;
	color: rgba(255, 255, 255, .5);
	font-size: 11.5px;
	line-height: 1.5;
}

/* ------------------------------------------------------------------ *
 * Main column and topbar
 * ------------------------------------------------------------------ */

.wcb2bcp-main {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.wcb2bcp-topbar {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 12px 24px;
	border-bottom: 1px solid var(--wcb2bcp-border);
	background: #fff;
}

.wcb2bcp-search {
	position: relative;
	display: flex;
	max-width: 640px;
	flex: 1 1 auto;
	align-items: center;
	padding: 4px 6px 4px 14px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 999px;
	background: #fff;
}

.wcb2bcp-search-placeholder {
	border-color: transparent;
}

.wcb2bcp-search-icon {
	display: flex;
	flex: 0 0 auto;
	color: var(--wcb2bcp-muted);
}

.wcb2bcp-portal .wcb2bcp-search-input {
	width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	padding: 8px 10px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	font-size: 14.5px;
	outline: none;
}

.wcb2bcp-portal .wcb2bcp-search-category {
	max-width: 170px;
	flex: 0 0 auto;
	padding: 7px 10px;
	border: 0;
	border-left: 1px solid var(--wcb2bcp-border);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	font-size: 13.5px;
	outline: none;
}

.wcb2bcp-search-results {
	position: absolute;
	z-index: 40;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	overflow: hidden;
	padding: 6px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--wcb2bcp-shadow);
}

.wcb2bcp-portal .wcb2bcp-search-results a {
	display: flex;
	gap: 10px;
	align-items: baseline;
	justify-content: space-between;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--wcb2bcp-text);
	font-size: 14px;
	text-decoration: none;
}

.wcb2bcp-portal .wcb2bcp-search-results a:hover {
	background: var(--wcb2bcp-bg);
}

.wcb2bcp-search-results .wcb2bcp-suggest-sku {
	color: var(--wcb2bcp-muted);
	font-size: 12.5px;
}

.wcb2bcp-search-results .wcb2bcp-suggest-empty {
	padding: 12px;
	color: var(--wcb2bcp-muted);
	font-size: 14px;
}

.wcb2bcp-topbar-actions {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-left: auto;
}

.wcb2bcp-notification-wrap {
	position: relative;
}

.wcb2bcp-portal .wcb2bcp-notification-button,
.wcb2bcp-portal .wcb2bcp-help-button {
	display: flex;
	gap: 7px;
	align-items: center;
	padding: 8px 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}

.wcb2bcp-portal .wcb2bcp-notification-button:hover,
.wcb2bcp-portal .wcb2bcp-help-button:hover {
	background: var(--wcb2bcp-bg);
	color: var(--wcb2bcp-text);
}

.wcb2bcp-notification-button {
	position: relative;
}

.wcb2bcp-notification-count {
	position: absolute;
	top: 2px;
	left: 20px;
	min-width: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--wcb2bcp-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.wcb2bcp-notification-panel {
	position: absolute;
	z-index: 45;
	top: calc(100% + 10px);
	right: 0;
	width: 300px;
	padding: 8px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--wcb2bcp-shadow);
}

.wcb2bcp-notification-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wcb2bcp-portal .wcb2bcp-notification-list a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--wcb2bcp-text);
	text-decoration: none;
}

.wcb2bcp-portal .wcb2bcp-notification-list a:hover {
	background: var(--wcb2bcp-bg);
}

.wcb2bcp-notification-list strong {
	display: block;
	font-size: 14px;
}

.wcb2bcp-notification-list span {
	color: var(--wcb2bcp-muted);
	font-size: 12.5px;
}

.wcb2bcp-notification-empty {
	padding: 12px;
}

.wcb2bcp-user-menu {
	display: flex;
	gap: 10px;
	align-items: center;
	padding-left: 14px;
	border-left: 1px solid var(--wcb2bcp-border);
}

.wcb2bcp-user-meta {
	display: flex;
	flex-direction: column;
	text-align: right;
}

.wcb2bcp-user-meta strong {
	font-size: 14px;
	line-height: 1.3;
}

.wcb2bcp-user-meta small {
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

.wcb2bcp-avatar {
	display: flex;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--wcb2bcp-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .02em;
}

/* ------------------------------------------------------------------ *
 * Content and cards
 * ------------------------------------------------------------------ */

.wcb2bcp-content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--wcb2bcp-gap);
	padding: 26px 24px 32px;
}

.wcb2bcp-header {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
}

.wcb2bcp-portal .wcb2bcp-header-title {
	margin: 0 0 4px;
	color: var(--wcb2bcp-text);
	font-size: 27px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.25;
}

.wcb2bcp-header-sub {
	margin: 0;
	color: var(--wcb2bcp-muted);
	font-size: 14.5px;
}

.wcb2bcp-header-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.wcb2bcp-card {
	padding: var(--wcb2bcp-pad);
	border: 1px solid var(--wcb2bcp-border);
	border-radius: var(--wcb2bcp-radius);
	background: var(--wcb2bcp-card-bg);
	box-shadow: var(--wcb2bcp-shadow);
}

.wcb2bcp-portal .wcb2bcp-card-title {
	margin: 0;
	color: var(--wcb2bcp-text);
	font-size: 16px;
	font-weight: 700;
}

.wcb2bcp-card-sub {
	display: block;
	margin-top: 2px;
	color: var(--wcb2bcp-muted);
	font-size: 13px;
}

.wcb2bcp-card-head {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.wcb2bcp-card-foot {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	padding-top: 12px;
	border-top: 1px solid var(--wcb2bcp-border);
	margin-top: 4px;
}

.wcb2bcp-portal .wcb2bcp-card-link {
	color: var(--wcb2bcp-primary);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-card-link:hover {
	text-decoration: underline;
}

.wcb2bcp-inline-note {
	border-left: 3px solid var(--wcb2bcp-primary);
	color: var(--wcb2bcp-muted);
	font-size: 14px;
}

/* ------------------------------------------------------------------ *
 * Dashboard grid
 * ------------------------------------------------------------------ */

.wcb2bcp-dashboard {
	display: flex;
	flex-direction: column;
	gap: var(--wcb2bcp-gap);
	min-width: 0;
}

/* Two-column band: wide blocks on the left, narrow cards on the right.
   Either column collapses to full width when it has nothing in it, so a
   disabled module can never leave an empty column behind. */
.wcb2bcp-dashboard-main {
	display: grid;
	align-items: start;
	gap: var(--wcb2bcp-gap);
	grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr);
}

.wcb2bcp-dashboard-main.wcb2bcp-no-side,
.wcb2bcp-dashboard-main.wcb2bcp-no-main {
	grid-template-columns: minmax(0, 1fr);
}

.wcb2bcp-dashboard-col {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: var(--wcb2bcp-gap);
}

/* Lower band: whatever is enabled shares the row evenly, and a lone card
   stretches rather than sitting in a half-empty row. */
.wcb2bcp-dashboard-lower {
	display: grid;
	align-items: start;
	gap: var(--wcb2bcp-gap);
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Summary cards flow: the row adapts to however many cards have data. */
.wcb2bcp-stat-grid {
	display: grid;
	gap: var(--wcb2bcp-gap);
	grid-template-columns: repeat(auto-fit, minmax(216px, 1fr));
}

.wcb2bcp-stat-card {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.wcb2bcp-stat-icon {
	display: flex;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.wcb2bcp-tint-orange { background: #fff1e8; color: #c2410c; }
.wcb2bcp-tint-red    { background: #fee2e2; color: #b91c1c; }
.wcb2bcp-tint-amber  { background: #fef3c7; color: #b45309; }
.wcb2bcp-tint-green  { background: #dcfce7; color: #15803d; }

.wcb2bcp-stat-body {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.wcb2bcp-stat-label {
	color: var(--wcb2bcp-muted);
	font-size: 13px;
	font-weight: 500;
}

.wcb2bcp-stat-value {
	color: var(--wcb2bcp-text);
	font-size: 25px;
	font-weight: 700;
	line-height: 1.2;
	word-break: break-word;
}

.wcb2bcp-stat-value-muted {
	color: var(--wcb2bcp-muted);
	font-size: 18px;
	font-weight: 600;
}

.wcb2bcp-stat-help {
	color: var(--wcb2bcp-muted);
	font-size: 12.5px;
}

.wcb2bcp-text-danger { color: #b91c1c; }

/* Right rail cards */

.wcb2bcp-rail-card h4 {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 0 0 6px;
	font-size: 14.5px;
	font-weight: 700;
}

.wcb2bcp-rail-card p {
	margin: 0 0 10px;
	color: var(--wcb2bcp-muted);
	font-size: 13px;
	line-height: 1.5;
}

.wcb2bcp-portal .wcb2bcp-rail-link {
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.wcb2bcp-rail-warning { border-color: #fed7aa; background: #fff8f3; }
.wcb2bcp-rail-warning h4 { color: #c2410c; }
.wcb2bcp-portal .wcb2bcp-rail-warning .wcb2bcp-rail-link { color: #c2410c; }

.wcb2bcp-rail-danger { border-color: #fecaca; background: #fff5f5; }
.wcb2bcp-rail-danger h4 { color: #b91c1c; }
.wcb2bcp-portal .wcb2bcp-rail-danger .wcb2bcp-rail-link { color: #b91c1c; }

.wcb2bcp-rail-success { border-color: #bbf7d0; background: #f5fdf8; }
.wcb2bcp-rail-success h4 { color: #15803d; }
.wcb2bcp-portal .wcb2bcp-rail-success .wcb2bcp-rail-link { color: #15803d; }

.wcb2bcp-rail-info { border-color: #bfdbfe; background: #f5f9ff; }
.wcb2bcp-rail-info h4 { color: #1d4ed8; }
.wcb2bcp-portal .wcb2bcp-rail-info .wcb2bcp-rail-link { color: #1d4ed8; }

/* Delivery timeline */

.wcb2bcp-timeline {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.wcb2bcp-timeline-step {
	position: relative;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	text-align: center;
}

.wcb2bcp-timeline-step::before {
	position: absolute;
	top: 7px;
	right: 50%;
	left: -50%;
	height: 2px;
	background: var(--wcb2bcp-border);
	content: "";
}

.wcb2bcp-timeline-step:first-child::before { display: none; }

.wcb2bcp-timeline-step.is-done::before { background: #15803d; }

.wcb2bcp-timeline-dot {
	position: relative;
	z-index: 1;
	width: 16px;
	height: 16px;
	border: 2px solid var(--wcb2bcp-border);
	border-radius: 50%;
	background: #fff;
}

.wcb2bcp-timeline-step.is-done .wcb2bcp-timeline-dot {
	border-color: #15803d;
	background: #15803d;
}

.wcb2bcp-timeline-step.is-current .wcb2bcp-timeline-dot {
	border-color: #15803d;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(21, 128, 61, .18);
}

.wcb2bcp-timeline-label {
	color: var(--wcb2bcp-muted);
	font-size: 10.5px;
	line-height: 1.3;
}

.wcb2bcp-timeline-wide .wcb2bcp-timeline-label { font-size: 12px; }

/* Order summary */

.wcb2bcp-summary-lines {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.wcb2bcp-summary-lines li {
	display: flex;
	gap: 8px;
	align-items: baseline;
	justify-content: space-between;
	padding: 7px 0;
	border-bottom: 1px solid var(--wcb2bcp-border);
	font-size: 13.5px;
}

.wcb2bcp-summary-name { flex: 1 1 auto; min-width: 0; }
.wcb2bcp-summary-qty  { color: var(--wcb2bcp-muted); font-size: 12.5px; }

.wcb2bcp-summary-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14px;
}

.wcb2bcp-summary-note {
	margin: 8px 0 14px;
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

/* Spend chart: plain CSS bars, no chart library is loaded. */

.wcb2bcp-spend-head {
	display: flex;
	gap: 10px;
	align-items: baseline;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.wcb2bcp-spend-value { font-size: 25px; font-weight: 700; }

.wcb2bcp-spend-change { font-size: 13px; font-weight: 600; }
.wcb2bcp-spend-change.is-up   { color: #15803d; }
.wcb2bcp-spend-change.is-down { color: #b91c1c; }

.wcb2bcp-chart {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	height: 168px;
	padding-top: 8px;
	border-bottom: 1px solid var(--wcb2bcp-border);
}

.wcb2bcp-chart-col {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
	gap: 6px;
}

.wcb2bcp-chart-bar {
	width: 100%;
	max-width: 46px;
	border-radius: 6px 6px 0 0;
	background: var(--wcb2bcp-sidebar-bg);
}

.wcb2bcp-chart-bar.is-current { background: var(--wcb2bcp-primary); }

.wcb2bcp-chart-label {
	color: var(--wcb2bcp-muted);
	font-size: 11px;
	white-space: nowrap;
}

/* Account manager */

.wcb2bcp-manager {
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 14px 0;
}

.wcb2bcp-manager-avatar {
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
	border-radius: 50%;
	object-fit: cover;
}

.wcb2bcp-manager-id { display: flex; flex-direction: column; min-width: 0; }
.wcb2bcp-manager-id strong { font-size: 15px; }
.wcb2bcp-manager-id span { color: var(--wcb2bcp-muted); font-size: 12.5px; }

.wcb2bcp-manager-contact {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.wcb2bcp-manager-contact li {
	display: flex;
	gap: 9px;
	align-items: center;
	padding: 5px 0;
	font-size: 13.5px;
}

.wcb2bcp-portal .wcb2bcp-manager-contact a {
	color: var(--wcb2bcp-text);
	text-decoration: none;
	word-break: break-all;
}

.wcb2bcp-manager-availability {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 14px;
}

.wcb2bcp-manager-status {
	display: flex;
	gap: 7px;
	align-items: center;
	color: #15803d;
	font-size: 13px;
	font-weight: 600;
}

.wcb2bcp-manager-status::before {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #15803d;
	content: "";
}

.wcb2bcp-manager-availability small {
	color: var(--wcb2bcp-muted);
	font-size: 12.5px;
}

/* Value strip */

.wcb2bcp-value-strip {
	display: grid;
	gap: var(--wcb2bcp-gap);
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wcb2bcp-value-item {
	display: flex;
	gap: 12px;
	align-items: center;
}

.wcb2bcp-value-icon {
	display: flex;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--wcb2bcp-bg);
	color: var(--wcb2bcp-sidebar-bg);
}

.wcb2bcp-value-item strong { display: block; font-size: 14px; }
.wcb2bcp-value-item span { color: var(--wcb2bcp-muted); font-size: 12.5px; }

/* ------------------------------------------------------------------ *
 * Buttons and badges
 * ------------------------------------------------------------------ */

.wcb2bcp-portal .wcb2bcp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: var(--wcb2bcp-button-radius);
	background: var(--wcb2bcp-primary);
	box-shadow: none;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.wcb2bcp-portal .wcb2bcp-button-primary,
.wcb2bcp-portal .wcb2bcp-button-primary:visited {
	border-color: var(--wcb2bcp-primary);
	background: var(--wcb2bcp-primary);
	color: #fff;
}

.wcb2bcp-portal .wcb2bcp-button-primary:hover,
.wcb2bcp-portal .wcb2bcp-button-primary:focus {
	border-color: var(--wcb2bcp-primary-dark);
	background: var(--wcb2bcp-primary-dark);
	color: #fff;
}

.wcb2bcp-portal .wcb2bcp-button-secondary,
.wcb2bcp-portal .wcb2bcp-button-secondary:visited {
	border-color: var(--wcb2bcp-border);
	background: #fff;
	color: var(--wcb2bcp-text);
}

.wcb2bcp-portal .wcb2bcp-button-secondary:hover,
.wcb2bcp-portal .wcb2bcp-button-secondary:focus {
	background: var(--wcb2bcp-bg);
	color: var(--wcb2bcp-text);
}

.wcb2bcp-portal .wcb2bcp-button-sm {
	padding: 6px 12px;
	font-size: 13px;
}

.wcb2bcp-portal .wcb2bcp-button-block {
	width: 100%;
}

.wcb2bcp-portal .wcb2bcp-button[disabled],
.wcb2bcp-portal .wcb2bcp-button-disabled {
	cursor: not-allowed;
	opacity: .4;
	pointer-events: none;
}

/* Keep the disabled Add button flat: no hover lift, no colour shift. */
.wcb2bcp-portal .wcb2bcp-button-disabled:hover,
.wcb2bcp-portal .wcb2bcp-button-disabled:focus {
	border-color: var(--wcb2bcp-primary);
	background: var(--wcb2bcp-primary);
	color: #fff;
}

.wcb2bcp-portal .wcb2bcp-badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.wcb2bcp-badge-success { background: #dcfce7; color: #166534; }
.wcb2bcp-badge-warning { background: #fef3c7; color: #92400e; }
.wcb2bcp-badge-danger  { background: #fee2e2; color: #991b1b; }
.wcb2bcp-badge-info    { background: #dbeafe; color: #1e40af; }
.wcb2bcp-badge-neutral { background: #f3f4f6; color: #374151; }

/* ------------------------------------------------------------------ *
 * Tables
 * ------------------------------------------------------------------ */

.wcb2bcp-table-wrap {
	overflow-x: auto;
	width: 100%;
}

.wcb2bcp-portal .wcb2bcp-table {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	margin: 0;
	font-size: 14px;
}

.wcb2bcp-portal .wcb2bcp-table th,
.wcb2bcp-portal .wcb2bcp-table td {
	padding: 12px 12px;
	border: 0;
	border-bottom: 1px solid var(--wcb2bcp-border);
	background: transparent;
	text-align: left;
	vertical-align: middle;
}

.wcb2bcp-portal .wcb2bcp-table thead th {
	border-bottom: 1px solid var(--wcb2bcp-border);
	background: #fafafa;
	color: var(--wcb2bcp-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-table tbody tr:last-child td { border-bottom: 0; }

.wcb2bcp-portal .wcb2bcp-table a {
	color: var(--wcb2bcp-text);
	font-weight: 500;
	text-decoration: none;
}

.wcb2bcp-portal .wcb2bcp-table a:hover { color: var(--wcb2bcp-primary); }

.wcb2bcp-table-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.wcb2bcp-table-card .wcb2bcp-table-wrap {
	margin: 0 calc(var(--wcb2bcp-pad) * -1);
	padding: 0 var(--wcb2bcp-pad);
}

.wcb2bcp-empty,
.wcb2bcp-muted {
	margin: 0;
	color: var(--wcb2bcp-muted);
	font-size: 14px;
}

.wcb2bcp-pagination {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: flex-end;
	margin-top: 14px;
}

/* Quick order */

.wcb2bcp-qo-filters {
	/* Same control height as the table filter bars, so the portal reads as
	   one design rather than two. */
	--wcb2bcp-filter-h: 44px;

	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin: 14px 0;
}

.wcb2bcp-qo-filters .wcb2bcp-input,
.wcb2bcp-qo-filters .wcb2bcp-button {
	height: var(--wcb2bcp-filter-h);
	box-sizing: border-box;
}

/* The search field carries a magnifier so it reads as a search box even
   before the customer notices the placeholder. */
.wcb2bcp-qo-filters #wcb2bcp-qo-search {
	padding-left: 38px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 12px center;
	background-size: 17px 17px;
}

.wcb2bcp-qo-filters #wcb2bcp-qo-category {
	padding-right: 34px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px 16px;
}

.wcb2bcp-qo-filters .wcb2bcp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 120px;
	padding: 0 20px;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-input {
	min-width: 0;
	max-width: 100%;
	padding: 10px 13px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: var(--wcb2bcp-button-radius);
	background: #fff;
	color: var(--wcb2bcp-text);
	font-size: 14px;
	line-height: 1.4;
}

/* The search takes the slack; the others size to their content so the
   button can never be pushed onto a line of its own. */
#wcb2bcp-qo-search { flex: 1 1 260px; min-width: 180px; }
#wcb2bcp-qo-category { flex: 0 1 220px; min-width: 150px; }

@media (max-width: 700px) {
	.wcb2bcp-qo-filters { --wcb2bcp-filter-h: 42px; }

	#wcb2bcp-qo-search,
	#wcb2bcp-qo-category { flex: 1 1 100%; }

	.wcb2bcp-qo-filters .wcb2bcp-button { flex: 1 1 100%; }
}

.wcb2bcp-qo-image img {
	display: block;
	width: 46px;
	height: 46px;
	border-radius: 8px;
	object-fit: cover;
}

.wcb2bcp-qo-name a { font-weight: 600; }

.wcb2bcp-qo-cat {
	display: block;
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

.wcb2bcp-qty-control {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 12px;
	background: #fff;
}

.wcb2bcp-portal .wcb2bcp-qty-btn {
	display: flex;
	width: 30px;
	height: 30px;
	flex: 0 0 30px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 8px;
	/* Flat fallback first, then a tint derived from the portal's own
	   primary colour so the stepper follows the Design settings. */
	background: #eef2f7;
	background: color-mix(in srgb, var(--wcb2bcp-primary) 14%, #fff);
	box-shadow: none;
	color: var(--wcb2bcp-primary);
	cursor: pointer;
	transition: background .15s ease;
}

.wcb2bcp-portal .wcb2bcp-qty-btn:hover {
	background: #e2e8f0;
	background: color-mix(in srgb, var(--wcb2bcp-primary) 26%, #fff);
}

.wcb2bcp-portal .wcb2bcp-qty-btn:disabled {
	cursor: not-allowed;
	opacity: .45;
}

.wcb2bcp-portal .wcb2bcp-qty-btn .wcb2bcp-icon {
	width: 15px;
	height: 15px;
	stroke-width: 2.4;
}

.wcb2bcp-portal .wcb2bcp-qo-qty-input {
	width: 52px;
	padding: 6px 2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	font-size: 14.5px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
}

.wcb2bcp-portal .wcb2bcp-qo-qty-input:focus {
	outline: 0;
}

/* Hide the native spinners: the plus/minus buttons replace them. */
.wcb2bcp-portal .wcb2bcp-qo-qty-input::-webkit-outer-spin-button,
.wcb2bcp-portal .wcb2bcp-qo-qty-input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.wcb2bcp-qo-na {
	color: var(--wcb2bcp-muted);
	font-size: 13px;
}

/* Action column: one right edge for Add, Choose options and disabled Add. */
.wcb2bcp-portal .wcb2bcp-table th.wcb2bcp-qo-th-add,
.wcb2bcp-portal .wcb2bcp-table td.wcb2bcp-qo-action {
	text-align: right;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-qo-action .wcb2bcp-button {
	min-width: 132px;
}

.wcb2bcp-portal .wcb2bcp-table td.wcb2bcp-qo-qty {
	white-space: nowrap;
}

.wcb2bcp-qo-footer {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-top: 16px;
}

.wcb2bcp-qo-message:empty { display: none; }

.wcb2bcp-qo-message {
	padding: 11px 14px;
	border-radius: var(--wcb2bcp-button-radius);
	margin: 12px 0 0;
	background: #f3f4f6;
	color: var(--wcb2bcp-text);
	font-size: 14px;
}

.wcb2bcp-qo-message.is-success { background: #dcfce7; color: #166534; }
.wcb2bcp-qo-message.is-error   { background: #fee2e2; color: #991b1b; }

.wcb2bcp-qo-row.is-added { background: #f0fdf4; }

/* Deliveries and saved lists */

.wcb2bcp-delivery-list { margin: 0; padding: 0; list-style: none; }

.wcb2bcp-delivery-item {
	padding: 16px 0;
	border-bottom: 1px solid var(--wcb2bcp-border);
}

.wcb2bcp-delivery-item:last-child { border-bottom: 0; }

.wcb2bcp-delivery-head {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.wcb2bcp-delivery-head strong { display: block; font-size: 15px; }
.wcb2bcp-delivery-date { text-align: right; }
.wcb2bcp-delivery-date span { display: block; font-size: 12px; }
.wcb2bcp-delivery-foot { margin-top: 12px; }

.wcb2bcp-saved-grid {
	display: grid;
	gap: var(--wcb2bcp-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.wcb2bcp-saved-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 12px;
}

/* Definition lists, forms, lists */

.wcb2bcp-definition {
	display: grid;
	gap: 16px;
	margin: 0;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.wcb2bcp-definition-row { margin: 0; }

.wcb2bcp-definition dt {
	margin: 0 0 3px;
	color: var(--wcb2bcp-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.wcb2bcp-definition dd {
	margin: 0;
	color: var(--wcb2bcp-text);
	font-size: 14.5px;
	word-break: break-word;
}

.wcb2bcp-form { display: flex; flex-direction: column; gap: 14px; }
.wcb2bcp-field { display: flex; flex-direction: column; gap: 5px; }

.wcb2bcp-field label {
	color: var(--wcb2bcp-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.wcb2bcp-form .wcb2bcp-button { align-self: flex-start; }
.wcb2bcp-list { margin: 0; padding-left: 18px; font-size: 14px; }

/* Empty states */

.wcb2bcp-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 34px 18px;
	text-align: center;
}

.wcb2bcp-empty-state-icon {
	display: flex;
	width: 46px;
	height: 46px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	margin-bottom: 4px;
	background: var(--wcb2bcp-bg);
	color: var(--wcb2bcp-muted);
}

.wcb2bcp-empty-state-title { font-size: 15px; font-weight: 650; }

.wcb2bcp-empty-state-text {
	max-width: 380px;
	margin: 0;
	color: var(--wcb2bcp-muted);
	font-size: 13.5px;
}

/* Access state cards */

.wcb2bcp-portal-standalone {
	display: block;
	max-width: 620px;
	padding: 40px 20px;
	margin: 0 auto;
}

.wcb2bcp-state { text-align: center; }

.wcb2bcp-portal .wcb2bcp-state-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
}

.wcb2bcp-state-text {
	margin: 0 0 16px;
	color: var(--wcb2bcp-muted);
	font-size: 14.5px;
}

.wcb2bcp-state-warning { border-top: 3px solid #f59e0b; }
.wcb2bcp-state-error   { border-top: 3px solid #ef4444; }
.wcb2bcp-state-info    { border-top: 3px solid var(--wcb2bcp-primary); }

/* Mobile menu toggle */

.wcb2bcp-portal .wcb2bcp-menu-toggle {
	display: none;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 10px;
	background: #fff;
	color: var(--wcb2bcp-text);
	cursor: pointer;
}

.wcb2bcp-portal .wcb2bcp-menu-toggle:hover {
	background: var(--wcb2bcp-bg);
}

/* Sidebar close button, mobile drawer only. */
.wcb2bcp-portal .wcb2bcp-sidebar-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: none;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.wcb2bcp-portal .wcb2bcp-sidebar-close:hover {
	background: rgba(255, 255, 255, .22);
}

/* Backdrop behind the mobile drawer. */
.wcb2bcp-sidebar-overlay {
	position: fixed;
	z-index: 998;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: none;
	background: rgba(15, 23, 42, .45);
	opacity: 0;
	transition: opacity .28s ease;
}

.wcb2bcp-portal.wcb2bcp-menu-open .wcb2bcp-sidebar-overlay { opacity: 1; }

body.wcb2bcp-no-scroll {
	overflow: hidden !important;
}

.wcb2bcp-menu-toggle-bar,
.wcb2bcp-menu-toggle-bar::before,
.wcb2bcp-menu-toggle-bar::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	content: "";
}

.wcb2bcp-menu-toggle-bar { position: relative; }
.wcb2bcp-menu-toggle-bar::before { position: absolute; top: -6px; }
.wcb2bcp-menu-toggle-bar::after  { position: absolute; top: 6px; }

.wcb2bcp-portal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	word-wrap: normal !important;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1200px) {
	.wcb2bcp-dashboard-main {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Side cards read better side by side than stacked once the columns
	   have collapsed. */
	.wcb2bcp-dashboard-col-side {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	}
}

@media (max-width: 1024px) {
	.wcb2bcp-portal-shell { grid-template-columns: minmax(0, 1fr); }

	.wcb2bcp-portal .wcb2bcp-menu-toggle { display: flex; }

	.wcb2bcp-portal .wcb2bcp-sidebar-close { display: flex; }

	/* The topbar stays put so the toggle is always reachable without
	   scrolling back up. */
	.wcb2bcp-topbar {
		position: sticky;
		z-index: 30;
		top: 0;
	}

	/* Off-canvas drawer: always in the DOM, slid out of view, so it can
	   animate. display:none cannot be transitioned. */
	.wcb2bcp-sidebar {
		position: fixed;
		z-index: 999;
		top: 0;
		bottom: 0;
		left: 0;
		width: 282px;
		max-width: 84vw;
		overflow-y: auto;
		border-radius: 0;
		box-shadow: 0 0 40px rgba(15, 23, 42, .3);
		transform: translateX(-100%);
		transition: transform .28s ease;
		-webkit-overflow-scrolling: touch;
	}

	.wcb2bcp-portal.wcb2bcp-menu-open .wcb2bcp-sidebar {
		transform: translateX(0);
	}

	.wcb2bcp-portal.wcb2bcp-menu-open .wcb2bcp-sidebar-overlay {
		display: block;
	}

	.wcb2bcp-topbar-label { display: none; }

	.wcb2bcp-user-meta { display: none; }
}

/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
	.wcb2bcp-sidebar,
	.wcb2bcp-sidebar-overlay {
		transition: none;
	}
}

@media (max-width: 900px) {
	.wcb2bcp-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wcb2bcp-value-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wcb2bcp-search-category { display: none; }
}

@media (max-width: 700px) {
	.wcb2bcp-content { padding: 16px; }
	.wcb2bcp-topbar { padding: 10px 16px; }

	.wcb2bcp-portal .wcb2bcp-header-title { font-size: 22px; }

	.wcb2bcp-stat-grid,
	.wcb2bcp-value-strip { grid-template-columns: minmax(0, 1fr); }

	.wcb2bcp-dashboard-col-side { grid-template-columns: minmax(0, 1fr); }

	.wcb2bcp-header-actions { width: 100%; }
	.wcb2bcp-header-actions .wcb2bcp-button { flex: 1 1 auto; }

	.wcb2bcp-notification-panel {
		right: auto;
		left: 0;
		width: min(300px, calc(100vw - 40px));
	}

	/* Stacked table rows on small screens. */
	.wcb2bcp-portal .wcb2bcp-table thead { display: none; }

	.wcb2bcp-portal .wcb2bcp-table tbody tr {
		display: block;
		padding: 12px 0;
		border-bottom: 1px solid var(--wcb2bcp-border);
	}

	.wcb2bcp-portal .wcb2bcp-table tbody td {
		display: flex;
		gap: 12px;
		align-items: center;
		justify-content: space-between;
		padding: 5px 0;
		border: 0;
		text-align: right;
	}

	.wcb2bcp-portal .wcb2bcp-table tbody td::before {
		color: var(--wcb2bcp-muted);
		content: attr(data-label);
		font-size: 12px;
		font-weight: 600;
		text-align: left;
	}

	.wcb2bcp-table-actions { justify-content: flex-end; }
	.wcb2bcp-qo-footer .wcb2bcp-button { flex: 1 1 100%; }

	/* Quick Order and Quick Reorder rows become compact product cards:
	   image and name, then stock and price, then stepper and Add. Other
	   portal tables keep their labelled stacked layout. */
	.wcb2bcp-portal .wcb2bcp-qo-table tbody tr {
		display: flex;
		gap: 8px 10px;
		align-items: center;
		flex-wrap: wrap;
		padding: 14px 0;
	}

	.wcb2bcp-portal .wcb2bcp-qo-table tbody td {
		display: block;
		padding: 0;
		text-align: left;
	}

	.wcb2bcp-portal .wcb2bcp-qo-table tbody td::before { display: none; }

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-image { flex: 0 0 42px; }
	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-image img { width: 42px; height: 42px; }

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-name { flex: 1 1 calc(100% - 52px); }

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-sku,
	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-stock { flex: 0 0 auto; }

	.wcb2bcp-portal .wcb2bcp-qo-table tbody td.wcb2bcp-qo-price {
		flex: 1 1 auto;
		font-size: 15px;
		text-align: right;
	}

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-qty { flex: 0 0 auto; }

	.wcb2bcp-portal .wcb2bcp-qo-table tbody td.wcb2bcp-qo-action {
		flex: 1 1 auto;
		text-align: right;
	}

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qty-control { padding: 3px; border-radius: 10px; }

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qty-btn {
		width: 27px;
		height: 27px;
		flex: 0 0 27px;
	}

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qty-btn .wcb2bcp-icon {
		width: 13px;
		height: 13px;
	}

	.wcb2bcp-portal .wcb2bcp-qo-table .wcb2bcp-qo-qty-input {
		width: 42px;
		font-size: 14px;
	}

	.wcb2bcp-portal .wcb2bcp-qo-action .wcb2bcp-button {
		min-width: 104px;
		padding: 8px 14px;
		font-size: 13px;
	}

	.wcb2bcp-portal .wcb2bcp-qo-placeholder td { text-align: center; }

	/* Variation panel: two options per row, left aligned. */
	.wcb2bcp-portal .wcb2bcp-var-row > td {
		display: block !important;
		padding: 0 !important;
		text-align: left !important;
	}

	.wcb2bcp-portal .wcb2bcp-var-row > td::before { display: none; }

	.wcb2bcp-portal .wcb2bcp-var-panel { text-align: left; }

	.wcb2bcp-portal .wcb2bcp-var-choose,
	.wcb2bcp-portal .wcb2bcp-var-selected { padding: 16px; }

	.wcb2bcp-portal .wcb2bcp-var-chip {
		flex: 1 1 calc(50% - 5px);
		min-width: 0;
		padding: 10px 12px;
	}

	.wcb2bcp-portal .wcb2bcp-var-chip-label { font-size: 13px; }
	.wcb2bcp-portal .wcb2bcp-var-chip-price { font-size: 13px; }
	.wcb2bcp-portal .wcb2bcp-var-chip-stock { font-size: 11px; }

	.wcb2bcp-portal .wcb2bcp-var-actions {
		align-items: center;
		flex-wrap: nowrap;
	}

	.wcb2bcp-portal .wcb2bcp-var-actions .wcb2bcp-var-add {
		flex: 1 1 auto;
		min-width: 0;
	}
	.wcb2bcp-delivery-date { text-align: left; }
}

/* ------------------------------------------------------------------ *
 * Full portal takeover
 *
 * These rules are the only ones outside the .wcb2bcp-portal wrapper.
 * They are gated on body.wcb2bcp-portal-active, which the plugin adds
 * only on portal pages, so normal My Account, shop, cart and checkout
 * pages are never touched. Turning off "Use custom full portal layout"
 * removes the body class and every rule below stops applying.
 * ------------------------------------------------------------------ */

body.wcb2bcp-portal-active .woocommerce-MyAccount-navigation,
body.wcb2bcp-portal-active nav.woocommerce-MyAccount-navigation,
body.wcb2bcp-portal-active .wd-my-account-sidebar,
body.wcb2bcp-portal-active .woocommerce-MyAccount-navigation-wrapper {
	display: none !important;
}

/* The portal supplies its own tiles, so suppress the theme's account
   dashboard cards and the default "Hello {user}" block. */
body.wcb2bcp-portal-active .woocommerce-MyAccount-content > .woocommerce-Address,
body.wcb2bcp-portal-active .wd-account-links,
body.wcb2bcp-portal-active .woodmart-account-links,
body.wcb2bcp-portal-active .wd-my-account-links,
body.wcb2bcp-portal-active .wd-account-page-links,
body.wcb2bcp-portal-active .woocommerce-MyAccount-dashboard-cards {
	display: none !important;
}

/* Give the portal the full content width instead of the narrow
   two-column My Account layout. */
body.wcb2bcp-portal-active .woocommerce-MyAccount-content,
body.wcb2bcp-portal-active .woocommerce-MyAccount-content-wrapper {
	width: 100% !important;
	max-width: none !important;
	flex: 0 0 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.wcb2bcp-portal-active .woocommerce-MyAccount-content::before,
body.wcb2bcp-portal-active .woocommerce-MyAccount-content::after {
	display: none !important;
}

body.wcb2bcp-portal-active .woocommerce {
	max-width: none !important;
}

body.wcb2bcp-portal-active .wcb2bcp-portal {
	width: 100%;
	max-width: none;
}

/* WooCommerce content rendered inside the portal shell (addresses,
   account details, order detail) gets card padding rather than the
   theme's own account styling. */
.wcb2bcp-portal .wcb2bcp-wc-content .woocommerce-MyAccount-navigation {
	display: none;
}

.wcb2bcp-portal .wcb2bcp-wc-content h2,
.wcb2bcp-portal .wcb2bcp-wc-content h3 {
	margin-top: 0;
	font-size: 17px;
	font-weight: 700;
}

.wcb2bcp-portal .wcb2bcp-wc-content .button,
.wcb2bcp-portal .wcb2bcp-wc-content button[type="submit"] {
	border-radius: var(--wcb2bcp-button-radius);
}

/* Muted SKU placeholder for variable products. */
.wcb2bcp-portal .wcb2bcp-sku-muted {
	color: var(--wcb2bcp-muted);
	font-size: 12.5px;
}

/* ------------------------------------------------------------------ *
 * Inline variation picker
 * ------------------------------------------------------------------ */

.wcb2bcp-portal .wcb2bcp-var-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	margin-top: 5px;
	background: #ede9fe;
	color: #5b21b6;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.5;
}

.wcb2bcp-portal .wcb2bcp-var-toggle {
	gap: 8px;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-var-toggle,
.wcb2bcp-portal .wcb2bcp-var-toggle:hover {
	border-color: var(--wcb2bcp-primary);
	background: #fff;
	color: var(--wcb2bcp-primary);
}

.wcb2bcp-portal .wcb2bcp-var-caret {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	margin-top: -3px;
	transform: rotate(45deg);
	transition: transform .18s ease;
}

.wcb2bcp-portal tr.is-expanded .wcb2bcp-var-caret {
	margin-top: 2px;
	transform: rotate(-135deg);
}

.wcb2bcp-portal tr.is-expanded > td {
	border-bottom: 0;
}

.wcb2bcp-portal .wcb2bcp-var-row > td {
	padding: 0 !important;
	border-bottom: 1px solid var(--wcb2bcp-border);
	background: #fff8f4;
}

.wcb2bcp-portal .wcb2bcp-var-loading {
	padding: 26px 20px;
	color: var(--wcb2bcp-muted);
	font-size: 14px;
	text-align: center;
}

.wcb2bcp-portal .wcb2bcp-var-panel {
	display: grid;
	gap: 0;
	grid-template-columns: fit-content(58%) minmax(300px, 1fr);
}

.wcb2bcp-portal .wcb2bcp-var-choose {
	padding: 20px;
}

.wcb2bcp-portal .wcb2bcp-var-heading {
	margin: 0 0 12px;
	color: var(--wcb2bcp-text);
	font-size: 14.5px;
	font-weight: 700;
}

/* Single attribute: option chips. */

.wcb2bcp-portal .wcb2bcp-var-chips {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.wcb2bcp-portal .wcb2bcp-var-chip {
	flex: 0 1 205px;
}

.wcb2bcp-portal .wcb2bcp-var-chip {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	text-align: left;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wcb2bcp-portal .wcb2bcp-var-chip:hover:not([disabled]) {
	border-color: var(--wcb2bcp-primary);
}

.wcb2bcp-portal .wcb2bcp-var-chip.is-selected {
	border-color: var(--wcb2bcp-primary);
	box-shadow: 0 0 0 3px rgba(255, 90, 31, .14);
}

.wcb2bcp-portal .wcb2bcp-var-chip[disabled] {
	cursor: not-allowed;
	opacity: .55;
}

.wcb2bcp-portal .wcb2bcp-var-chip-dot {
	position: relative;
	display: block;
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
	margin-top: 2px;
}

.wcb2bcp-portal .wcb2bcp-var-chip.is-selected .wcb2bcp-var-chip-dot {
	border-color: var(--wcb2bcp-primary);
}

.wcb2bcp-portal .wcb2bcp-var-chip.is-selected .wcb2bcp-var-chip-dot::after {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wcb2bcp-primary);
	content: "";
}

.wcb2bcp-portal .wcb2bcp-var-chip-body {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.wcb2bcp-portal .wcb2bcp-var-chip-label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.wcb2bcp-portal .wcb2bcp-var-chip-price {
	color: var(--wcb2bcp-text);
	font-size: 13.5px;
}

.wcb2bcp-portal .wcb2bcp-var-chip-stock {
	font-size: 12px;
	font-weight: 600;
}

.wcb2bcp-portal .wcb2bcp-var-chip-stock.is-in  { color: #15803d; }
.wcb2bcp-portal .wcb2bcp-var-chip-stock.is-out { color: #b91c1c; }

/* Two or more attributes: dropdowns. */

.wcb2bcp-portal .wcb2bcp-var-selects {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.wcb2bcp-portal .wcb2bcp-var-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.wcb2bcp-portal .wcb2bcp-var-field-label {
	color: var(--wcb2bcp-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.wcb2bcp-portal .wcb2bcp-var-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	font-size: 14px;
}

/* Selected summary and actions. */

.wcb2bcp-portal .wcb2bcp-var-selected {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	border-left: 1px solid var(--wcb2bcp-border);
}

.wcb2bcp-portal .wcb2bcp-var-summary {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wcb2bcp-portal .wcb2bcp-var-summary-label,
.wcb2bcp-portal .wcb2bcp-var-meta-label {
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

.wcb2bcp-portal .wcb2bcp-var-name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}

.wcb2bcp-portal .wcb2bcp-var-meta {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 4px;
	font-size: 13.5px;
}

.wcb2bcp-portal .wcb2bcp-var-price { font-weight: 700; }

.wcb2bcp-portal .wcb2bcp-var-stock.is-in  { color: #15803d; font-weight: 600; }
.wcb2bcp-portal .wcb2bcp-var-stock.is-out { color: #b91c1c; font-weight: 600; }

.wcb2bcp-portal .wcb2bcp-var-sku {
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

.wcb2bcp-portal .wcb2bcp-var-actions {
	display: flex;
	gap: 12px;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	padding-top: 12px;
	border-top: 1px solid var(--wcb2bcp-border);
}

.wcb2bcp-portal .wcb2bcp-var-qty {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.wcb2bcp-portal .wcb2bcp-var-qty-label {
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

.wcb2bcp-portal .wcb2bcp-var-add {
	min-width: 130px;
}

.wcb2bcp-portal .wcb2bcp-qty-btn[disabled] {
	cursor: not-allowed;
	opacity: .45;
}

@media (max-width: 900px) {
	.wcb2bcp-portal .wcb2bcp-var-panel {
		grid-template-columns: minmax(0, 1fr);
	}

	.wcb2bcp-portal .wcb2bcp-var-chip { flex: 1 1 190px; }

	.wcb2bcp-portal .wcb2bcp-var-selected {
		border-top: 1px solid var(--wcb2bcp-border);
		border-left: 0;
	}
}

@media (max-width: 700px) {
	.wcb2bcp-portal .wcb2bcp-var-row > td {
		display: block !important;
		padding: 0 !important;
	}

	.wcb2bcp-portal .wcb2bcp-var-row > td::before { content: ""; }

	.wcb2bcp-portal .wcb2bcp-var-row > td::before { content: ""; }
}

/* Read-only browsing markers, shared with the shortcode renderer. */
.wcb2bcp-portal .wcb2bcp-locked-price {
	color: var(--wcb2bcp-muted);
	font-size: 13.5px;
	font-style: italic;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-locked-note {
	display: block;
	margin-top: 3px;
	color: var(--wcb2bcp-muted);
	font-size: 12px;
}

/* ------------------------------------------------------------------ *
 * Table filters
 * ------------------------------------------------------------------ */

.wcb2bcp-portal .wcb2bcp-filters {
	/* One control height for every field and button in the bar. */
	--wcb2bcp-filter-h: 44px;

	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	padding: 12px 14px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 12px;
	margin-bottom: 16px;
	background: #fafafa;
}

.wcb2bcp-portal .wcb2bcp-filter-field {
	display: flex;
	gap: 8px;
	align-items: center;
	min-width: 0;
}

/* The search takes the slack; everything else sizes to its content, so a
   narrow card keeps the button on the same line instead of wrapping it. */
.wcb2bcp-portal .wcb2bcp-filter-search {
	flex: 1 1 180px;
	min-width: 140px;
}

.wcb2bcp-portal .wcb2bcp-filters input[type="search"],
.wcb2bcp-portal .wcb2bcp-filters input[type="date"],
.wcb2bcp-portal .wcb2bcp-filters select,
.wcb2bcp-portal .wcb2bcp-filters .wcb2bcp-button {
	height: var(--wcb2bcp-filter-h);
	box-sizing: border-box;
	line-height: 1.2;
}

.wcb2bcp-portal .wcb2bcp-filters input[type="search"],
.wcb2bcp-portal .wcb2bcp-filters input[type="date"],
.wcb2bcp-portal .wcb2bcp-filters select {
	width: 100%;
	padding: 0 12px;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	color: var(--wcb2bcp-text);
	font-size: 14px;
}

.wcb2bcp-portal .wcb2bcp-filters select {
	min-width: 150px;
	padding-right: 34px;
	/* Native arrow varies between themes, so draw a consistent one. */
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px 16px;
}

.wcb2bcp-portal .wcb2bcp-filters input[type="search"]:focus,
.wcb2bcp-portal .wcb2bcp-filters input[type="date"]:focus,
.wcb2bcp-portal .wcb2bcp-filters select:focus {
	border-color: var(--wcb2bcp-primary);
	outline: none;
}

/* Date fields: a visible From/To prefix and a calendar icon, because an
   empty native date input shows only mm/dd/yyyy. */
.wcb2bcp-portal .wcb2bcp-filter-dates {
	gap: 8px;
	flex: 0 1 auto;
}

.wcb2bcp-portal .wcb2bcp-date-field {
	position: relative;
	display: inline-flex;
	height: var(--wcb2bcp-filter-h);
	align-items: center;
	overflow: hidden;
	border: 1px solid var(--wcb2bcp-border);
	border-radius: 10px;
	background: #fff;
}

.wcb2bcp-portal .wcb2bcp-date-field:focus-within {
	border-color: var(--wcb2bcp-primary);
}

.wcb2bcp-portal .wcb2bcp-date-field.has-value {
	border-color: var(--wcb2bcp-primary);
}

.wcb2bcp-portal .wcb2bcp-date-label {
	padding: 0 8px 0 12px;
	border: 0;
	color: var(--wcb2bcp-muted);
	cursor: pointer;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-filters .wcb2bcp-date-field input[type="date"] {
	width: 132px;
	padding: 0 34px 0 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: 13.5px;
}

.wcb2bcp-portal .wcb2bcp-filters .wcb2bcp-date-field input[type="date"]:focus {
	border: 0;
}

/* Draw our own calendar affordance and lay the native picker over it, so
   the whole field opens the picker and looks the same in every browser. */
.wcb2bcp-portal .wcb2bcp-date-field::after {
	position: absolute;
	top: 50%;
	right: 10px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	background-color: currentColor;
	color: var(--wcb2bcp-muted);
	content: "";
	pointer-events: none;
	-webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
	mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
}

.wcb2bcp-portal .wcb2bcp-date-field.has-value::after { color: var(--wcb2bcp-primary); }

.wcb2bcp-portal .wcb2bcp-filters input[type="date"]::-webkit-calendar-picker-indicator {
	position: absolute;
	top: 0;
	right: 0;
	width: 36px;
	height: 100%;
	padding: 0;
	margin: 0;
	background: transparent;
	color: transparent;
	cursor: pointer;
	opacity: 0;
}

.wcb2bcp-portal .wcb2bcp-filter-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex: 0 0 auto;
}

.wcb2bcp-portal .wcb2bcp-filters .wcb2bcp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 18px;
	white-space: nowrap;
}

.wcb2bcp-portal .wcb2bcp-filter-summary {
	width: 100%;
	margin: 0;
	color: var(--wcb2bcp-muted);
	font-size: 12.5px;
}

@media (max-width: 782px) {
	.wcb2bcp-portal .wcb2bcp-filters {
		--wcb2bcp-filter-h: 42px;

		gap: 8px;
		padding: 12px;
	}

	.wcb2bcp-portal .wcb2bcp-filter-search { flex: 1 1 100%; }

	.wcb2bcp-portal .wcb2bcp-filter-field:not(.wcb2bcp-filter-search) { flex: 1 1 auto; }

	.wcb2bcp-portal .wcb2bcp-filter-dates { flex: 1 1 100%; }

	.wcb2bcp-portal .wcb2bcp-date-field { flex: 1 1 0; min-width: 0; }

	.wcb2bcp-portal .wcb2bcp-filters .wcb2bcp-date-field input[type="date"] {
		width: 100%;
		min-width: 0;
	}

	.wcb2bcp-portal .wcb2bcp-filter-actions { flex: 1 1 100%; }

	.wcb2bcp-portal .wcb2bcp-filter-actions .wcb2bcp-button { flex: 1 1 auto; }
}
