/* B2B Trade Pricing – front-end styles. Keep light; themes can override or disable via the b2btp_load_frontend_styles filter. */

.b2btp-price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35em;
}
.b2btp-price--stacked {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1em;
}
.b2btp-price__retail {
	opacity: 0.6;
	font-weight: normal;
	text-decoration: line-through;
}
.b2btp-price__trade {
	text-decoration: none;
	font-weight: 700;
}
.b2btp-badge {
	display: inline-block;
	font-size: 0.7em;
	line-height: 1.6;
	padding: 0 0.6em;
	border-radius: 999px;
	background: #1e5eff;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	vertical-align: middle;
}
.b2btp-price--cart .b2btp-price__retail {
	font-size: 0.85em;
}

/* Forms */
.b2btp-form .b2btp-field {
	margin: 0 0 1em;
}
.b2btp-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25em;
}
.b2btp-form input[type="text"],
.b2btp-form input[type="email"],
.b2btp-form input[type="tel"],
.b2btp-form input[type="url"],
.b2btp-form input[type="password"],
.b2btp-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.b2btp-field--consent label,
.b2btp-field--remember label {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	font-weight: normal;
}
.b2btp-field--consent input {
	margin-top: 0.3em;
}
.b2btp-form__footer {
	font-size: 0.9em;
	margin-top: 1em;
}

/* Notices */
.b2btp-notice {
	padding: 0.9em 1.1em;
	border-radius: 4px;
	margin: 0 0 1.25em;
	border-left: 4px solid #1e5eff;
	background: rgba(30, 94, 255, 0.08);
	color: inherit;
}
.b2btp-notice--error {
	border-left-color: #d63638;
	background: #fcf0f1;
}
.b2btp-notice--success {
	border-left-color: #00a32a;
	background: #edfaef;
}
.b2btp-notice ul {
	margin: 0;
	padding-left: 1.2em;
}

/* Status + dashboard */
.b2btp-status {
	padding: 1em 1.2em;
	border-radius: 6px;
	background: rgba(128, 128, 128, 0.08);
	color: inherit;
	margin-bottom: 1.5em;
}
.b2btp-status--approved {
	background: #edfaef;
}
.b2btp-status--pending {
	background: #fff8e5;
}
.b2btp-status--rejected {
	background: #fcf0f1;
}
.b2btp-status__headline {
	font-weight: 700;
	margin: 0 0 0.4em;
}
.b2btp-dashboard__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1em;
	margin: 1.25em 0;
}
.b2btp-card {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	padding: 1em 1.2em;
	border-radius: 8px;
	background: rgba(128, 128, 128, 0.08);
	color: inherit;
}
.b2btp-card__label {
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}
.b2btp-card__value {
	font-size: 1.25em;
	font-weight: 700;
}
.b2btp-card__value--ok {
	color: #00a32a;
}
.b2btp-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5em;
}
.b2btp-table th,
.b2btp-table td {
	text-align: left;
	padding: 0.5em 0.75em;
	border-bottom: 1px solid #e5e5e5;
}
.b2btp-dashboard__links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em 1.5em;
}

/* Quantity note, tax note, hidden prices */
.b2btp-qty-note {
	font-size: 0.85em;
	opacity: 0.8;
	margin: 0.5em 0;
}
.b2btp-tax-note {
	font-size: 0.7em;
	opacity: 0.7;
	margin-left: 0.3em;
}
.b2btp-price-hidden {
	font-size: 0.9em;
	font-weight: 600;
}

/* Toast */
.b2btp-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 20px);
	background: #1d2327;
	color: #fff;
	padding: 0.8em 1.2em;
	border-radius: 6px;
	box-shadow: 0 6px 20px rgba(0,0,0,.2);
	opacity: 0;
	transition: opacity .25s, transform .25s;
	z-index: 99999;
	max-width: 90vw;
	font-size: 0.95em;
}
.b2btp-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}
.b2btp-toast a {
	color: #fff;
	text-decoration: underline;
	margin-left: 0.5em;
}
.b2btp-toast--error {
	background: #b32d2e;
}

/* Bulk order form */
.b2btp-bulk-order {
	position: relative;
}
.b2btp-bulk-order.is-loading .b2btp-bulk-order__table {
	opacity: 0.5;
}
.b2btp-bulk-order__toolbar {
	display: flex;
	gap: 0.75em;
	flex-wrap: wrap;
	margin-bottom: 1em;
}
.b2btp-bulk-order__search {
	flex: 1 1 260px;
}
.b2btp-bulk-order__category {
	flex: 0 1 220px;
}
.b2btp-bulk-order__status {
	min-height: 1.4em;
	margin-bottom: 0.5em;
	opacity: 0.8;
}
.b2btp-bulk-order__table {
	width: 100%;
	border-collapse: collapse;
}
.b2btp-bulk-order__table th,
.b2btp-bulk-order__table td {
	padding: 0.6em 0.5em;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
	vertical-align: middle;
}
.b2btp-bulk-order__table .b2btp-col-product {
	width: 45%;
}
.b2btp-bulk-order__table .b2btp-col-product img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 4px;
	margin-right: 0.6em;
	float: left;
}
.b2btp-bulk-order__table .b2btp-col-product div {
	overflow: hidden;
}
.b2btp-row__rules,
.b2btp-list__sku {
	display: block;
	font-size: 0.8em;
	opacity: 0.7;
}
.b2btp-row.is-unavailable {
	opacity: 0.55;
}
.b2btp-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
}
.b2btp-qty__btn {
	border: 0;
	background: rgba(128, 128, 128, 0.12);
	color: inherit;
	padding: 0 0.7em;
	cursor: pointer;
	font-size: 1em;
	line-height: 1;
}
.b2btp-qty__input {
	width: 4.5em;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: center;
	-moz-appearance: textfield;
}
.b2btp-qty__input::-webkit-outer-spin-button,
.b2btp-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.b2btp-bulk-order__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1em;
	margin: 1em 0;
}
.b2btp-bulk-order__footer {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1em;
	padding: 0.8em 0;
	background: var(--wp--preset--color--base, #fff);
	color: inherit;
	border-top: 2px solid rgba(128, 128, 128, 0.3);
	margin-top: 0.5em;
}
.b2btp-bulk-order__summary {
	font-weight: 600;
}

@media (max-width: 640px) {
	.b2btp-bulk-order__table thead {
		display: none;
	}
	.b2btp-bulk-order__table tr {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 0.3em 0.75em;
		padding: 0.75em 0;
		border-bottom: 1px solid #e5e5e5;
	}
	.b2btp-bulk-order__table td {
		border: 0;
		padding: 0;
	}
	.b2btp-bulk-order__table .b2btp-col-product {
		grid-column: 1 / -1;
		width: auto;
	}
	.b2btp-bulk-order__table .b2btp-col-sku {
		grid-column: 1 / -1;
		font-size: 0.85em;
		opacity: 0.7;
	}
	.b2btp-bulk-order__table .b2btp-col-add {
		text-align: right;
	}
}

/* Purchase lists */
.b2btp-save-list {
	display: flex;
	gap: 0.5em;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 0.75em;
	width: 100%;
}
.b2btp-lists__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin: 1.5em 0 0.75em;
}
.b2btp-lists__title {
	margin: 0;
}
.b2btp-list {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1em 1.2em;
	margin-bottom: 1em;
}
.b2btp-list__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
}
.b2btp-list__count {
	font-size: 0.85em;
	opacity: 0.7;
	margin-left: 0.4em;
}
.b2btp-list__actions {
	display: flex;
	align-items: center;
	gap: 0.75em;
}
.b2btp-list__actions .button-link,
.b2btp-list__remove-item {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
	color: inherit;
	font: inherit;
}
.b2btp-list__remove-item {
	text-decoration: none;
	font-size: 1.3em;
	line-height: 1;
}
.b2btp-list__table {
	margin: 0.75em 0 0;
}
.b2btp-list__product img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 0.5em;
}
.b2btp-list__qty input {
	width: 5em;
}
.b2btp-list__footer {
	margin: 0.75em 0 0;
	text-align: right;
}
.b2btp-list__empty,
.b2btp-lists__empty {
	opacity: 0.75;
}
