/**
 * MK Wholesale storefront — register form, price lock, pending banner
 */

.mkw-pending-banner {
	background: var(--mkw-brand, #31962c);
	color: #fff;
	text-align: center;
	padding: 10px 16px;
	font-size: 14px;
	line-height: 1.4;
}

.mkw-login-price {
	display: inline-block;
	max-width: 220px;
	line-height: 0;
}
.mkw-login-price img {
	width: 100%;
	height: auto;
	display: block;
}

/* Guests should not see stock/BACK SOON — only the login-to-view-price CTA. */
body.mkw-prices-locked .mk-card-oos,
body.mkw-prices-locked [data-mk-card-oos],
body.mkw-prices-locked img[src*="back-soon"] {
	display: none !important;
}

/* PDP: one price/CTA only — hide the variation-form duplicate + buy box. */
body.mkw-prices-locked .woocommerce-variation-price,
body.mkw-prices-locked .woocommerce-variation-add-to-cart,
body.mkw-prices-locked form.cart .quantity,
body.mkw-prices-locked form.cart .single_add_to_cart_button,
body.mkw-prices-locked form.cart .mk-buy-now-button,
body.mkw-prices-locked .mk-buy-now-button,
body.mkw-prices-locked .mk-pdp-actions,
body.mkw-prices-locked .mk-classic-add-to-cart .price {
	display: none !important;
}

.mkw-pending-price {
	margin: 8px 0 16px;
	font-size: 15px;
	font-weight: 600;
	color: #333;
}

body.mkw-modal-open {
	overflow: hidden;
}

.mkw-modal[hidden] {
	display: none !important;
}

.mkw-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.mkw-modal__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	padding: 0;
	margin: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.mkw-modal__sheet {
	position: relative;
	z-index: 1;
	width: min(380px, 100%);
	background: #fff;
	color: #111;
	border-radius: 8px;
	padding: 22px 22px 18px;
	box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
	box-sizing: border-box;
}

.mkw-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #444;
}

.mkw-modal__sheet h2 {
	margin: 0 28px 16px 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
}

.mkw-modal__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mkw-modal__form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.mkw-modal__form input[type="text"],
.mkw-modal__form input[type="password"] {
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 400;
}

.mkw-modal__check {
	flex-direction: row !important;
	align-items: center;
	gap: 8px !important;
	font-weight: 500 !important;
}

.mkw-modal__error {
	background: #fde8e8;
	color: #8a1f1f;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 13px;
	margin: 0;
}

.mkw-modal__submit {
	background: #111;
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 4px;
}

.mkw-modal__submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.mkw-modal__links {
	margin: 14px 0 0;
	font-size: 13px;
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.mkw-modal__links a {
	color: #111;
	text-decoration: none;
}

.mkw-modal__links a:hover {
	text-decoration: underline;
}

.mkw-form,
.mkw-thanks,
.mkw-note {
	max-width: 720px;
	margin: 24px auto 48px;
	font-family: inherit;
}

.mkw-section-title {
	margin: 28px 0 10px;
	font-size: 18px;
}
.mkw-intro {
	text-align: center;
	margin-bottom: 20px;
	font-size: 15px;
	line-height: 1.45;
}

.mkw-error {
	background: #fde8e8;
	color: #8a1f1f;
	padding: 10px 14px;
	border-radius: 8px;
}

.mkw-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
}

.mkw-grid > label:not(.mkw-half):not(.mkw-check) {
	grid-column: 1 / -1;
}

.mkw-half { grid-column: span 1; }

.mkw-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.mkw-form input[type="text"],
.mkw-form input[type="email"],
.mkw-form input[type="url"],
.mkw-form input[type="tel"],
.mkw-form input[type="password"],
.mkw-form select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 400;
	box-sizing: border-box;
}

.mkw-hint {
	font-size: 12px;
	font-weight: 400;
	opacity: 0.7;
}

.mkw-check {
	grid-column: 1 / -1;
	flex-direction: row !important;
	align-items: center;
	gap: 8px !important;
	font-weight: 500 !important;
}
.mkw-check input { width: auto; }

.mkw-submit {
	margin-top: 16px;
	background: var(--mkw-brand, #31962c);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.mkw-login-link { margin-top: 16px; font-size: 14px; }
.mkw-login-link a { color: var(--mkw-brand, #31962c); }

.mkw-thanks {
	text-align: center;
	padding: 32px 16px;
	font-size: 16px;
	line-height: 1.5;
}

.mkw-min-order { margin-bottom: 16px; }

body.mkw-prices-locked .mk-classic-price .woocommerce-Price-amount,
body.mkw-prices-locked .price .woocommerce-Price-amount {
	/* Belt: HTML filter is the source of truth; hide leftover amounts if a template bypasses it. */
}

@media (max-width: 640px) {
	.mkw-grid { grid-template-columns: 1fr; }
	.mkw-half { grid-column: 1 / -1; }
}
