/**
 * Max BizBot Notifier - My Account Sign In / Sign Up (OTP) styling.
 *
 * Design tokens
 *   Ink     #1F2937  headings, labels
 *   Slate   #6B7280  help text
 *   Accent  #8B5A2B  active tab underline, primary CTA (Sign Up)
 *   Line    #E0E0E0  borders
 *   Btn Bg  #ECECEC  secondary/OTP buttons (matches reference screenshots)
 */

.mbn-auth-wrap {
	max-width: 420px;
	margin: 40px auto;
	background: #FFFFFF;
	border-radius: 10px;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
	padding: 40px 36px;
	box-sizing: border-box;
}

/* ---- Tabs ---- */

.mbn-auth-tabs {
	display: flex;
	border-bottom: 1px solid #E0E0E0;
	margin-bottom: 28px;
}

.mbn-auth-tab {
	flex: 1;
	background: none;
	border: none;
	padding: 14px 8px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #9CA3AF;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.mbn-auth-tab:hover { color: #4B5563; }

.mbn-auth-tab.is-active {
	color: #1F2937;
	border-bottom-color: #8B5A2B;
}

.mbn-auth-panel[hidden] { display: none !important; }

/* ---- Field basics ---- */

.mbn-field-label {
	font-size: 13.5px;
	font-weight: 600;
	color: #1F2937;
	margin: 0 0 8px;
}

.mbn-req { color: #C0392B; }

.mbn-text-input,
.mbn-phone-input,
.mbn-isd-select,
.mbn-otp-input,
.mbn-email-input {
	font-size: 14px;
	padding: 11px 12px;
	border: 1px solid #D1D5DB;
	border-radius: 4px;
	background: #FFFFFF;
	color: #1F2937;
	width: 100%;
	box-sizing: border-box;
}

.mbn-text-input:focus,
.mbn-phone-input:focus,
.mbn-isd-select:focus,
.mbn-otp-input:focus,
.mbn-email-input:focus {
	outline: none;
	border-color: #8B5A2B;
	box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.12);
}

.mbn-email-input:disabled {
	background: #F9FAFB;
	color: #9CA3AF;
	cursor: not-allowed;
}

/* ---- Phone row (ISD select + number) ---- */

.mbn-phone-row {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
}

.mbn-isd-select {
	flex: 0 0 110px;
	cursor: pointer;
}

.mbn-phone-input { flex: 1; }

.mbn-phone-row-with-verify .mbn-phone-input-wrap {
	position: relative;
	flex: 1;
}

.mbn-phone-row-with-verify .mbn-phone-input { padding-right: 70px; }

.mbn-verify-link {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #2563EB;
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 0.03em;
	cursor: pointer;
	padding: 4px;
}
.mbn-verify-link:hover { color: #1D4ED8; }
.mbn-verify-link:disabled { color: #9CA3AF; cursor: not-allowed; }

/* ---- OTP entry row ---- */

.mbn-otp-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.mbn-otp-input {
	flex: 1;
	letter-spacing: 0.3em;
	font-weight: 600;
	text-align: center;
}

.mbn-btn-small {
	flex: 0 0 auto;
	background: #8B5A2B;
	color: #FFFFFF;
	border: none;
	border-radius: 4px;
	padding: 11px 16px;
	font-weight: 700;
	font-size: 12.5px;
	text-transform: uppercase;
	cursor: pointer;
}
.mbn-btn-small:hover { background: #714722; }
.mbn-btn-small:disabled { background: #D1B69A; cursor: not-allowed; }

.mbn-link-btn {
	background: none;
	border: none;
	color: #2563EB;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	padding: 4px 0;
}
.mbn-link-btn:hover { text-decoration: underline; }
.mbn-link-btn:disabled { color: #9CA3AF; cursor: not-allowed; }

.mbn-back-link {
	display: inline-block;
	margin-top: 14px;
}

/* ---- Messages ---- */

.mbn-auth-message {
	font-size: 13px;
	margin: 0 0 14px;
	min-height: 1px;
}
.mbn-auth-message:empty { display: none; }
.mbn-auth-message.is-error { color: #C0392B; }
.mbn-auth-message.is-success { color: #1F7A46; }

/* ---- Buttons ---- */

.mbn-btn-block {
	display: block;
	width: 100%;
	background: #ECECEC;
	color: #1F2937;
	border: none;
	border-radius: 3px;
	padding: 13px 16px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	margin-bottom: 14px;
	transition: background 0.15s ease;
}
.mbn-btn-block:hover { background: #E0E0E0; }
.mbn-btn-block:disabled { color: #B0B0B0; cursor: not-allowed; }

.mbn-btn-block.mbn-btn-primary {
	background: #8B5A2B;
	color: #FFFFFF;
}
.mbn-btn-block.mbn-btn-primary:hover { background: #714722; }
.mbn-btn-block.mbn-btn-primary:disabled { background: #D1B69A; color: #FFFFFF; }

/* ---- Password login fallback (reuses WooCommerce's own form markup) ---- */

.mbn-password-login .form-row { margin-bottom: 16px; }
.mbn-password-login label { display: block; font-size: 13.5px; font-weight: 600; color: #1F2937; margin-bottom: 8px; }
.mbn-password-login .required { color: #C0392B; }

/* WooCommerce's own .form-row-first/-last float two fields into narrow
   side-by-side columns (meant for a wider checkout form) - override to
   stack full-width like the rest of this widget's fields. !important because
   this ties in specificity with (and loads before, on at least one live
   theme) the theme's own equivalent WooCommerce-form override. */
.mbn-password-login .form-row-first,
.mbn-password-login .form-row-last,
.mbn-password-login .form-row-wide {
	float: none !important;
	width: 100% !important;
	clear: both !important;
}

.mbn-remember-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}
.mbn-remember-row label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.mbn-remember-row input[type="checkbox"] { accent-color: #8B5A2B; width: 16px; height: 16px; }

.woocommerce-LostPassword {
	font-size: 13px;
	margin-top: 4px;
}
.woocommerce-LostPassword a { color: #2563EB; }

/* ---- Registration extras ---- */

.mbn-help-text {
	font-size: 12.5px;
	color: #6B7280;
	margin: -6px 0 16px;
}

/* !important throughout: this row ties in CSS specificity with (and loses
   to, on at least one live theme) the theme's own generic label/input/link
   styling, same cause as the password-login form-row override above. */
.mbn-privacy-row {
	display: flex !important;
	align-items: flex-start !important;
	flex-wrap: nowrap !important;
	gap: 8px;
	font-size: 12.5px;
	color: #4B5563;
	margin-bottom: 20px;
	cursor: pointer;
}
.mbn-privacy-row input[type="checkbox"] {
	accent-color: #8B5A2B;
	width: 16px !important;
	height: 16px !important;
	min-width: 16px;
	margin-top: 1px;
	flex-shrink: 0 !important;
}
.mbn-privacy-row span { flex: 1; }
.mbn-privacy-row a { color: #2563EB !important; }

@media (max-width: 480px) {
	.mbn-auth-wrap { max-width: 100%; padding: 28px 20px; margin: 20px auto; }
	.mbn-isd-select { flex-basis: 96px; }
}

/* ---- Checkout phone verification widget ----
   billing_phone_country_code + billing_phone_raw are the only phone inputs
   the shopper sees; WooCommerce's own billing_phone is hidden and kept in
   sync server-side (see includes/mbn-otp-checkout.php). */

#billing_phone_field { display: none !important; }

.mbn-checkout-otp {
	margin: 16px 0 24px;
	padding: 18px 20px;
	background: #F9FAFB;
	border: 2px solid #25D366;
	border-radius: 8px;
}

.mbn-checkout-otp-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #1F2937;
	margin: 0 0 10px;
}

.mbn-checkout-otp-input-row {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

/* Custom flag country-code picker (replaces a native <select> so flag
   emoji + full country names can be shown in the open list, matching the
   reference design) - see initIsdDropdown() in checkout-otp.js. */

.mbn-checkout-isd {
	position: relative;
	flex: 0 0 96px;
}

.mbn-checkout-isd-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	padding: 11px 8px;
	border: 1px solid #949494;
	border-radius: 4px;
	background: #FFFFFF;
	color: #1F2937;
	cursor: pointer;
	box-sizing: border-box;
}
.mbn-checkout-isd-toggle:hover { border-color: #6B7280; }

.mbn-isd-flag { font-size: 16px; line-height: 1; }
.mbn-isd-code { font-weight: 600; }
.mbn-isd-arrow { margin-left: auto; font-size: 10px; color: #6B7280; }

.mbn-checkout-isd-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 20;
	width: 260px;
	max-height: 240px;
	overflow-y: auto;
	background: #FFFFFF;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 4px;
}

.mbn-checkout-isd-option {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	padding: 9px 10px;
	font-size: 13.5px;
	color: #1F2937;
	text-align: left;
	cursor: pointer;
	border-radius: 4px;
}
.mbn-checkout-isd-option:hover,
.mbn-checkout-isd-option:focus { background: #F3F4F6; outline: none; }
.mbn-checkout-isd-option .mbn-isd-flag { font-size: 18px; }
.mbn-isd-name { flex: 1; }

.mbn-checkout-otp-input {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	padding: 11px 12px;
	border: 1px solid #949494;
	border-radius: 4px;
	background: #FFFFFF;
	color: #1F2937;
	box-sizing: border-box;
}

.mbn-checkout-otp-sendbtn {
	flex: 0 0 auto;
	background: #25D366;
	color: #FFFFFF;
	border: none;
	border-radius: 4px;
	padding: 11px 18px;
	font-weight: 700;
	font-size: 13px;
	white-space: nowrap;
	cursor: pointer;
}
.mbn-checkout-otp-sendbtn:hover { background: #1EA855; }
.mbn-checkout-otp-sendbtn:disabled,
.mbn-checkout-otp-sendbtn[hidden] { display: none; }

.mbn-checkout-otp .mbn-otp-row { margin-bottom: 10px; }
.mbn-checkout-otp .mbn-auth-message { margin-bottom: 10px; }

.mbn-checkout-otp-notice {
	margin: 10px 0;
	padding: 12px 14px;
	background: #ECFDF3;
	border: 1px solid #B7EBC6;
	border-radius: 6px;
	color: #1F5133;
	font-size: 13px;
	line-height: 1.5;
}
.mbn-checkout-otp-notice strong { display: block; margin-bottom: 4px; }

.mbn-checkout-otp-caption {
	margin: 0;
	font-size: 12px;
	color: #6B7280;
}

/* ---- Checkout "Login with OTP / Email & Password" prompt ----
   Separate feature from the WhatsApp-verification widget above - shown
   above Billing Details for guests to log into an existing account
   (see includes/mbn-otp-checkout-login.php). Reuses the same
   .mbn-otp-block / .mbn-btn-block etc. building blocks as My Account. */

.mbn-checkout-login-wrap {
	margin: 0 0 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid #E0E0E0;
	max-width: 480px;
}

.mbn-checkout-login-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mbn-checkout-login-actions .mbn-btn-block {
	flex: 1 1 200px;
	margin-bottom: 0;
}

@media (max-width: 480px) {
	.mbn-checkout-login-actions .mbn-btn-block { flex-basis: 100%; }
}
