/* Cuba B2B — front end */

.cuba-b2b-notice {
	margin: 0 0 1.25em;
	padding: 0.85em 1.1em;
	border-left: 4px solid #2a6df4;
	background: #f2f6ff;
	color: #1c2433;
	font-size: 0.95em;
	line-height: 1.5;
}

.cuba-b2b-notice--suspended {
	border-left-color: #d98324;
	background: #fff6e9;
}

.cuba-b2b-notice a {
	font-weight: 600;
}

.cuba-b2b-hidden-price a {
	font-weight: 600;
	text-decoration: underline;
}

.cuba-b2b-unit-selector {
	margin: 0 0 1em;
}

.cuba-b2b-unit-selector__label {
	display: block;
	margin-bottom: 0.35em;
	font-weight: 600;
}

/* The floor used to be a flat 12em, which on a 320–360px handset was wider
 * than the buy panel that holds it and pushed the row sideways. It now asks
 * for 12em only when there is room to give it. */
.cuba-b2b-unit-selector__select {
	min-width: min(12em, 100%);
	max-width: 100%;
	padding: 0.5em;
}

.cuba-b2b-unit-selector__fixed {
	margin: 0;
	font-size: 0.95em;
}

.cuba-b2b-line-total {
	display: block;
	width: 100%;
	margin: 0.75em 0 1em;
	font-size: 1.05em;
}

.cuba-b2b-line-total__label {
	font-weight: 600;
}

.cuba-b2b-line-total__detail {
	color: #667085;
	font-size: 0.85em;
}

.cuba-b2b-price-breaks {
	margin: 1.5em 0;
}

.cuba-b2b-price-breaks__title {
	margin: 0 0 0.5em;
	font-size: 1.05em;
}

.cuba-b2b-price-breaks__table {
	width: auto;
	min-width: 18em;
	border-collapse: collapse;
}

.cuba-b2b-price-breaks__table th,
.cuba-b2b-price-breaks__table td {
	padding: 0.45em 1.1em 0.45em 0;
	text-align: left;
	border-bottom: 1px solid #e4e7ec;
}

.cuba-b2b-price-breaks__table tbody tr.is-active {
	background: #eef4ff;
	font-weight: 600;
}

.cuba-b2b-price-breaks__note {
	margin: 0.5em 0 0;
	color: #667085;
	font-size: 0.85em;
}

/* Checkout and order notices */

.cuba-b2b-quote-notice {
	margin: 1em 0;
	padding: 0.9em 1.1em;
	border: 1px solid #f0c36d;
	background: #fdf6e3;
	border-radius: 3px;
}

.cuba-b2b-quote-notice strong {
	display: block;
	margin-bottom: 0.25em;
}

/* Registration form */

.cuba-b2b-register {
	max-width: 46em;
}

.cuba-b2b-register fieldset {
	margin: 0 0 2em;
	padding: 1.25em 1.5em;
	border: 1px solid #e4e7ec;
	border-radius: 4px;
}

.cuba-b2b-register legend {
	padding: 0 0.5em;
	font-weight: 600;
	font-size: 1.05em;
}

.cuba-b2b-register .form-row {
	margin-bottom: 1em;
}

.cuba-b2b-register label {
	display: block;
	margin-bottom: 0.3em;
	font-weight: 600;
	font-size: 0.95em;
}

.cuba-b2b-register .required {
	color: #b42318;
	text-decoration: none;
}

.cuba-b2b-register input[type="text"],
.cuba-b2b-register input[type="email"],
.cuba-b2b-register input[type="tel"],
.cuba-b2b-register input[type="url"],
.cuba-b2b-register input[type="date"],
.cuba-b2b-register input[type="number"],
.cuba-b2b-register input[type="file"],
.cuba-b2b-register select,
.cuba-b2b-register textarea {
	width: 100%;
	padding: 0.55em 0.65em;
	border: 1px solid #d0d5dd;
	border-radius: 3px;
}

/* Belt and braces: a file input's intrinsic width is set by the browser
 * chrome around it, not by the sheet, and it was the last thing pushing the
 * form past the viewport. */
.cuba-b2b-register input,
.cuba-b2b-register select,
.cuba-b2b-register textarea {
	max-width: 100%;
}

/* The theme paints buttons through `.woocommerce .button`, and this form is a
 * shortcode on an ordinary page with no such ancestor — so the one control
 * that submits a distributor application was falling through to the browser's
 * default button at roughly 33px tall. The tokens are the theme's, with
 * fallbacks so the form still looks deliberate if the plugin is running under
 * another theme or on its own. */
.cuba-b2b-register button[type="submit"] {
	min-height: 44px;
	padding: 1rem 2rem;
	border: 1px solid var(--ink, #171717);
	background: var(--ink, #171717);
	color: var(--paper, #ffffff);
	font-family: inherit;
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
}

.cuba-b2b-register button[type="submit"]:hover,
.cuba-b2b-register button[type="submit"]:focus-visible {
	background: var(--bronze, #b89778);
	border-color: var(--bronze, #b89778);
}

.cuba-b2b-register .cuba-b2b-hp {
	position: absolute !important;
	left: -9999px !important;
}

.cuba-b2b-register__errors {
	margin: 0 0 1.5em;
	padding: 0.9em 1.1em;
	border-left: 4px solid #b42318;
	background: #fef3f2;
}

.cuba-b2b-register__errors ul {
	margin: 0.4em 0 0 1.1em;
}

.cuba-b2b-register__success {
	padding: 1.25em 1.5em;
	border-left: 4px solid #067647;
	background: #ecfdf3;
}

/* A fieldset defaults to min-width: min-content, which on a phone made the
 * registration form wider than the viewport and scrolled the whole document
 * sideways. Same reason the flex children need min-width: 0 — otherwise the
 * 14em basis becomes a 14em floor. */
.cuba-b2b-register fieldset {
	min-width: 0;
	max-width: 100%;
}

.cuba-b2b-cols {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
}

.cuba-b2b-cols > * {
	flex: 1 1 14em;
	min-width: 0;
}

@media (max-width: 480px) {
	.cuba-b2b-cols > * {
		flex-basis: 100%;
	}
}

/* My Account */

.cuba-b2b-company-users td,
.cuba-b2b-company-users th {
	padding: 0.6em 0.8em;
}

.cuba-b2b-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: #eef2f6;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.cuba-b2b-badge--platinum { background: #e8eaf0; color: #303650; }
.cuba-b2b-badge--gold     { background: #fdf3d8; color: #7a5a08; }
.cuba-b2b-badge--silver   { background: #eef2f6; color: #475467; }
.cuba-b2b-badge--owner    { background: #e6f0ff; color: #1849a9; }

/* A gallery item belonging to a size the buyer has not selected. The class is
 * set by variations.js; the parent gallery has to carry every photograph of
 * every size because that is the only list WooCommerce renders. */
.woocommerce-product-gallery__image.cuba-b2b-gallery-hidden {
	display: none;
}
