/* =================================================================
 * BFP — "Same as Phone" toggle for the WhatsApp Number field
 * (signup / register form of NotifyFlow WhatsApp Auth)
 * Additive only; matches the existing orange form styling.
 *
 * Toggle ON  -> WhatsApp field mirrors Phone and is disabled (field only).
 * Toggle OFF -> WhatsApp field editable (default).
 * The LABEL stays normal in both states.
 * ============================================================== */

/* header row: [ "WhatsApp Number *" ] ................ [ toggle ] */
.nfwa-auth-form .bfp-wa-label-head {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px;
	width: 100%;
	margin: 0;
	min-height: 20px;
}

.nfwa-auth-form .bfp-wa-label-left {
	display: inline-flex !important;
	align-items: baseline;
	gap: 4px;
	min-width: 0;
}

/* toggle shell — keep it vertically centered with the label text */
.nfwa-auth-form .bfp-same-as-phone {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	position: relative;
	top: 8px; /* nudge down to sit level with the label text */
}

.nfwa-auth-form .bfp-same-as-phone__label {
	display: inline-flex !important;
	align-items: center !important;
	position: relative;
	gap: 7px;
	margin: 0 !important;
	width: auto !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	color: #8a827e !important;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

/* hide the native checkbox completely (appearance:none + transparent + covers the track).
   NOTE: the other session's CSS adds .bfp-locked to all inputs after OTP with
   `opacity:1 !important`, so we must out-specify it — hence the double-class selectors below. */
.nfwa-auth-form input.bfp-same-as-phone__input,
.nfwa-auth-form .bfp-same-as-phone__input,
.nfwa-auth-form input.bfp-same-as-phone__input.bfp-locked {
	appearance: none !important;
	-webkit-appearance: none !important;
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	outline: none !important;
	cursor: pointer;
	pointer-events: auto !important;
	z-index: 2;
}

/* the switch track */
.nfwa-auth-form .bfp-same-as-phone__track {
	position: relative;
	display: inline-block;
	width: 34px;
	height: 19px;
	flex: 0 0 34px;
	border-radius: 999px;
	background: #e3ddd9;
	transition: background .18s ease;
}

.nfwa-auth-form .bfp-same-as-phone__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
	transition: transform .18s ease;
}

.nfwa-auth-form .bfp-same-as-phone__input:checked + .bfp-same-as-phone__track {
	background: #ff4b1f;
}

.nfwa-auth-form .bfp-same-as-phone__input:checked + .bfp-same-as-phone__track::after {
	transform: translateX(15px);
}

.nfwa-auth-form .bfp-same-as-phone__input:focus-visible + .bfp-same-as-phone__track {
	outline: 3px solid rgba(255, 75, 31, .28);
	outline-offset: 2px;
}

/* active state text colour */
.nfwa-auth-form .bfp-same-as-phone__input:checked ~ .bfp-same-as-phone__text {
	color: #ff4b1f;
	font-weight: 800;
}

/* locked (mirrored) WhatsApp FIELD only — label is left untouched */
.nfwa-auth-form input[name="whatsapp"].bfp-wa-locked {
	background: #f4f1ef !important;
	border-color: #e7ddd7 !important;
	color: #6f6763 !important;
	cursor: not-allowed;
}

@media (max-width: 380px) {
	.nfwa-auth-form .bfp-same-as-phone__label { font-size: 11px !important; }
	.nfwa-auth-form .bfp-same-as-phone__track { width: 32px; height: 18px; flex-basis: 32px; }
	.nfwa-auth-form .bfp-same-as-phone__track::after { width: 14px; height: 14px; }
	.nfwa-auth-form .bfp-same-as-phone__input:checked + .bfp-same-as-phone__track::after { transform: translateX(14px); }
}
/* =================================================================
 * Terms / Privacy / Refund agreement checkbox (register form)
 * Sits below the WhatsApp field; after OTP it ends up below the OTP area
 * and is shown disabled (checked).
 * ============================================================== */

.nfwa-auth-form .bfp-terms-agree {
	margin: 2px 0 4px;
}

.nfwa-auth-form .bfp-terms-agree__label {
	display: flex !important;
	align-items: flex-start !important;
	gap: 9px;
	width: 100% !important;
	margin: 0 !important;
	font-size: 12.5px !important;
	line-height: 1.5 !important;
	font-weight: 500 !important;
	color: #6f6763 !important;
	cursor: pointer;
	user-select: none;
}

.nfwa-auth-form .bfp-terms-agree__input {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	pointer-events: none !important;
}

/* custom square box */
.nfwa-auth-form .bfp-terms-agree__mark {
	position: relative;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 1.5px solid #d5cbc5;
	border-radius: 5px;
	background: #fff;
	transition: background .16s ease, border-color .16s ease;
}

.nfwa-auth-form .bfp-terms-agree__mark::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1.5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .16s ease;
}

.nfwa-auth-form .bfp-terms-agree__input:checked + .bfp-terms-agree__mark {
	background: #ff4b1f;
	border-color: #ff4b1f;
}

.nfwa-auth-form .bfp-terms-agree__input:checked + .bfp-terms-agree__mark::after {
	transform: rotate(45deg) scale(1);
}

.nfwa-auth-form .bfp-terms-agree__input:focus-visible + .bfp-terms-agree__mark {
	outline: 3px solid rgba(255, 75, 31, .28);
	outline-offset: 2px;
}

.nfwa-auth-form .bfp-terms-agree__text {
	min-width: 0;
}

.nfwa-auth-form .bfp-terms-agree__text a {
	color: #ff4b1f !important;
	font-weight: 700;
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

.nfwa-auth-form .bfp-terms-agree__text a:hover {
	color: #ed3e15 !important;
}

/* error state (not agreed) */
.nfwa-auth-form .bfp-terms-agree--error .bfp-terms-agree__mark {
	border-color: #e0554a;
	box-shadow: 0 0 0 3px rgba(224, 85, 74, .14);
}

/* locked (after OTP sent) */
.nfwa-auth-form .bfp-terms-agree--locked .bfp-terms-agree__label {
	cursor: default;
	color: #8a827e !important;
}

.nfwa-auth-form .bfp-terms-agree--locked .bfp-terms-agree__mark {
	background: #ff4b1f;
	border-color: #ff4b1f;
	opacity: .6;
}

.nfwa-auth-form .bfp-terms-agree--locked .bfp-terms-agree__input:checked + .bfp-terms-agree__mark {
	background: #ff4b1f;
	border-color: #ff4b1f;
}

.nfwa-auth-form .bfp-terms-agree__input:disabled + .bfp-terms-agree__mark {
	cursor: default;
}

/* Bot-trap honeypot — visually off-screen, ignored by real users, never focusable */
.nfwa-auth-form .bfp-bot-field {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
