/**
 * BABYBOON Wholesale — front end.
 *
 * Built on the theme's own custom properties so it inherits any change made to
 * them, with fallbacks so the plugin still looks right if it is ever loaded on a
 * page the theme's main stylesheet has not reached.
 *
 * The brand direction is flat, low-density and single-accent: no shadows
 * anywhere, Amber as the only interface colour, 4px on inputs, 12px on
 * information panels and a pill on buttons. Space is the brand, so the vertical
 * rhythm here is deliberately looser than a form usually gets.
 */

.bb-ws-page {
	--ws-ink: var(--bb-ink, #1C2024);
	--ws-muted: var(--bb-muted, #5B5C60);
	--ws-accent: var(--bb-amber, #CE8614);
	--ws-ground: var(--bb-offwhite, #F5F2EE);
	--ws-surface: var(--bb-white, #FFFFFF);
	--ws-line: var(--bb-hairline, rgba(28, 32, 36, .14));
	--ws-line-strong: var(--bb-hairline-strong, rgba(28, 32, 36, .28));
	--ws-r-sm: var(--bb-r-sm, 4px);
	--ws-r-md: var(--bb-r-md, 12px);
	--ws-r-pill: var(--bb-r-pill, 999px);

	max-width: var(--bb-wrap-narrow, 760px);
	margin-inline: auto;
	color: var(--ws-ink);
	font-family: var(--bb-body, "Poppins", system-ui, sans-serif);
	line-height: 1.7;
}

/* ---- The opening ------------------------------------------------------- */

.bb-ws-intro {
	margin: 0 0 var(--bb-lg, 64px);
}

.bb-ws-kicker {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ws-muted);
}

html[lang^="ar"] .bb-ws-kicker,
[dir="rtl"] .bb-ws-kicker {
	letter-spacing: normal; /* Arabic is never letter-tracked. */
	text-transform: none;
}

.bb-ws-display {
	margin: 0 0 var(--bb-sm, 16px);
	font-family: var(--bb-display, "Salt Shaker", "Poppins", sans-serif);
	font-weight: 400;
	font-size: clamp(34px, 6vw, 54px);
	line-height: 1.1; /* Salt Shaker renders large; trim leading, never add. */
}

[dir="rtl"] .bb-ws-display {
	font-family: "Khorafi", "Alexandria", sans-serif;
	line-height: 1.35;
}

.bb-ws-lede {
	margin: 0;
	max-width: var(--bb-measure, 66ch);
	font-size: 17px;
	color: var(--ws-muted);
}

/* Three commitments. Never a row of identical feature cards — these are
   hairline-separated columns on the page's own ground. */
.bb-ws-page .bb-ws-benefits {
	list-style: none;
	margin: var(--bb-md, 32px) 0 0;
	padding: 0;
	padding-inline-start: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--bb-md, 32px);
	border-block-start: 1px solid var(--ws-line);
	padding-block-start: var(--bb-md, 32px);
}

.bb-ws-page .bb-ws-benefits h2 {
	margin: 0 0 6px;
	font-family: var(--bb-body, "Poppins", sans-serif);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
}

.bb-ws-page .bb-ws-benefits p {
	margin: 0;
	font-size: 14px;
	color: var(--ws-muted);
	line-height: 1.65;
}

@media (max-width: 720px) {
	.bb-ws-page .bb-ws-benefits {
		grid-template-columns: 1fr;
		gap: var(--bb-sm, 16px);
	}
}

/* ---- Panels ------------------------------------------------------------ */

.bb-ws-panel {
	margin: 0 0 var(--bb-md, 32px);
	padding: clamp(20px, 4vw, 32px);
	background: var(--ws-ground);
	border-radius: var(--ws-r-md);
}

.bb-ws-panel--good { background: var(--bb-powder, #BCCDE0); }
.bb-ws-panel--wait { background: var(--bb-rose, #DED1D3); }
.bb-ws-panel--stop { background: var(--bb-fog, #D9D8D8); }

.bb-ws-panel h2 {
	margin: 0 0 10px;
	font-family: var(--bb-display, "Salt Shaker", sans-serif);
	font-weight: 400;
	font-size: clamp(24px, 3.4vw, 32px);
	line-height: 1.15;
}

[dir="rtl"] .bb-ws-panel h2 {
	font-family: "Khorafi", "Alexandria", sans-serif;
	line-height: 1.4;
}

.bb-ws-panel p { margin: 0 0 12px; }
.bb-ws-panel p:last-child { margin-bottom: 0; }

.bb-ws-quote {
	margin: 14px 0;
	padding: 14px 18px;
	background: var(--ws-surface);
	border-radius: var(--ws-r-md);
	font-size: 15px;
}

.bb-ws-quote p:last-child { margin-bottom: 0; }

.bb-ws-meta {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--ws-muted);
}

.bb-ws-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
}

/* ---- The form ---------------------------------------------------------- */

.bb-ws-form { margin: 0; }

.bb-ws-fs {
	margin: 0 0 var(--bb-lg, 64px);
	padding: 0;
	border: 0;
	border-block-start: 1px solid var(--ws-line);
	padding-block-start: var(--bb-md, 32px);
}

.bb-ws-fs legend {
	padding: 0;
	margin: 0 0 6px;
	font-family: var(--bb-display, "Salt Shaker", sans-serif);
	font-weight: 400;
	font-size: clamp(22px, 3vw, 28px);
	line-height: 1.15;
}

[dir="rtl"] .bb-ws-fs legend {
	font-family: "Khorafi", "Alexandria", sans-serif;
	line-height: 1.4;
}

/* The requirements block is the one part of the page that changes under the
   reader, so it is given its own ground to make the change visible. */
.bb-ws-fs--req {
	border: 0;
	padding: clamp(20px, 4vw, 30px);
	background: var(--ws-ground);
	border-radius: var(--ws-r-md);
}

.bb-ws-requirements:empty { display: none; }

.bb-ws-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--bb-sm, 16px);
	margin: var(--bb-sm, 16px) 0 0;
}

@media (max-width: 640px) {
	.bb-ws-grid { grid-template-columns: 1fr; }
}

.bb-ws-field { margin: 0; }
.bb-ws-field--country { max-width: 420px; margin-block-start: var(--bb-sm, 16px); }

.bb-ws-field label,
.bb-ws-doc__label {
	display: block;
	margin: 0 0 5px;
	font-size: 13px;
	font-weight: 600;
}

.bb-ws-req { color: var(--ws-accent); }

.bb-ws-field input[type="text"],
.bb-ws-field input[type="email"],
.bb-ws-field input[type="tel"],
.bb-ws-field input[type="url"],
.bb-ws-field input[type="password"],
.bb-ws-field input[type="number"],
.bb-ws-field select,
.bb-ws-field textarea,
.bb-ws-doc input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	font: inherit;
	font-size: 15px;
	color: var(--ws-ink);
	background: var(--ws-surface);
	border: 1px solid var(--ws-line-strong);
	border-radius: var(--ws-r-sm);
	box-shadow: none;
}

.bb-ws-field select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: right 18px center, right 13px center;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-inline-end: 34px;
}

[dir="rtl"] .bb-ws-field select {
	background-position: left 18px center, left 13px center;
}

.bb-ws-field :is(input, select, textarea):focus-visible {
	outline: 2px solid var(--ws-accent);
	outline-offset: 1px;
	border-color: var(--ws-accent);
}

.bb-ws-help {
	margin: 5px 0 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--ws-muted);
}

.bb-ws-help--secure {
	margin-block-start: var(--bb-sm, 16px);
	padding-block-start: var(--bb-sm, 16px);
	border-block-start: 1px solid var(--ws-line);
}

/* ---- Documents --------------------------------------------------------- */

.bb-ws-page .bb-ws-docs {
	list-style: none;
	margin: var(--bb-md, 32px) 0 0;
	padding: 0;
	padding-inline-start: 0;
	display: grid;
	gap: var(--bb-sm, 16px);
}

.bb-ws-doc {
	padding: 16px 18px;
	background: var(--ws-surface);
	border-radius: var(--ws-r-md);
}

.bb-ws-doc input[type="file"] {
	margin-block-start: 10px;
	font-size: 13px;
	padding: 9px 12px;
}

.bb-ws-doc input[type="file"]::file-selector-button {
	margin-inline-end: 12px;
	padding: 7px 16px;
	font: inherit;
	font-size: 13px;
	color: var(--ws-ink);
	background: transparent;
	border: 1px solid var(--ws-line-strong);
	border-radius: var(--ws-r-pill);
	cursor: pointer;
}

.bb-ws-doc input[type="file"]::file-selector-button:hover {
	border-color: var(--ws-accent);
	color: var(--ws-accent);
}

/* The level tag. Required is the only one that takes the accent — if all three
   were coloured, none of them would mean anything. */
.bb-ws-tag {
	display: inline-block;
	margin-inline-start: 7px;
	padding: 1px 9px;
	border-radius: var(--ws-r-pill);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .02em;
	vertical-align: middle;
	white-space: nowrap;
	color: var(--ws-muted);
	border: 1px solid var(--ws-line);
}

[dir="rtl"] .bb-ws-tag { letter-spacing: normal; }

.bb-ws-tag--required {
	color: var(--ws-accent);
	border-color: currentColor;
}

/* ---- Checkboxes -------------------------------------------------------- */

.bb-ws-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.6;
	cursor: pointer;
}

.bb-ws-check input {
	margin: 3px 0 0;
	width: 16px;
	height: 16px;
	accent-color: var(--ws-accent);
	flex: none;
}

.bb-ws-check--na {
	margin-block-start: 10px;
	font-size: 13px;
	color: var(--ws-muted);
}

/* ---- Submit ------------------------------------------------------------ */

.bb-ws-submit {
	margin: 0 0 var(--bb-lg, 64px);
	padding-block-start: var(--bb-md, 32px);
	border-block-start: 1px solid var(--ws-line);
	display: grid;
	gap: var(--bb-sm, 16px);
	justify-items: start;
}

.bb-ws-submit .bb-ws-help { max-width: var(--bb-measure, 66ch); }

/* Buttons, only if the theme has not already defined them. */
.bb-ws-page .bb-btn {
	display: inline-block;
	padding: 12px 26px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ws-ground);
	background: var(--ws-accent);
	border: 1px solid var(--ws-accent);
	border-radius: var(--ws-r-pill);
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: opacity .15s ease;
}

.bb-ws-page .bb-btn:hover { opacity: .88; }
.bb-ws-page .bb-btn--lg { padding: 15px 34px; font-size: 15px; }
.bb-ws-page .bb-btn--sm { padding: 8px 18px; font-size: 13px; }

.bb-ws-page .bb-btn--ghost {
	color: var(--ws-ink);
	background: transparent;
	border-color: var(--ws-line-strong);
}

.bb-ws-page .bb-btn--ghost:hover {
	border-color: var(--ws-ink);
	opacity: 1;
}

/* ---- Trade price, on the shop and product pages ------------------------ */

.bb-ws-price { display: block; line-height: 1.4; }

.bb-ws-price__rrp {
	display: block;
	font-size: 13px;
	color: var(--bb-muted, #5B5C60);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.bb-ws-price__now {
	display: block;
	font-size: 1.15em;
	font-weight: 600;
	color: var(--bb-ink, #1C2024);
}

.bb-ws-price__note {
	display: block;
	margin-block-start: 2px;
	font-size: 12px;
	letter-spacing: .02em;
	color: var(--bb-amber, #CE8614);
}

[dir="rtl"] .bb-ws-price__note { letter-spacing: normal; }

/* ---- The cart and checkout note --------------------------------------- */

.bb-ws-note {
	margin: 0 0 var(--bb-sm, 16px);
	padding: 13px 18px;
	background: var(--bb-offwhite, #F5F2EE);
	border-radius: var(--bb-r-md, 12px);
	font-size: 14px;
	line-height: 1.6;
	color: var(--bb-ink, #1C2024);
}

/* Short of the minimum is the one state that needs to be noticed, so it takes
   the accent as a rule rather than as a colour wash. */
.bb-ws-note--short {
	border-inline-start: 3px solid var(--bb-amber, #CE8614);
}

.bb-ws-flag {
	margin: 0 0 var(--bb-sm, 16px);
	font-size: 13px;
	color: var(--bb-amber, #CE8614);
}

.bb-ws-order-flag {
	margin: var(--bb-sm, 16px) 0 0;
	font-size: 13px;
	color: var(--bb-muted, #5B5C60);
}

/* ---- The account area -------------------------------------------------- */

.bb-ws-account .bb-ws-panel:first-child { margin-block-start: 0; }

.bb-ws-page .bb-ws-terms,
.bb-ws-account .bb-ws-terms {
	margin: 0 0 var(--bb-md, 32px);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--bb-sm, 16px);
	padding-block: var(--bb-sm, 16px);
	border-block: 1px solid var(--bb-hairline, rgba(28, 32, 36, .14));
}

.bb-ws-terms div { margin: 0; }

.bb-ws-terms dt {
	margin: 0 0 3px;
	font-size: 12px;
	color: var(--bb-muted, #5B5C60);
}

.bb-ws-terms dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--bb-ink, #1C2024);
}

@media (max-width: 640px) {
	.bb-ws-page .bb-ws-terms,
	.bb-ws-account .bb-ws-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
