/**
 * Minimal, intentionally un-themed styles for the Frisbii password fields.
 * Only what's needed to position the eye toggle and render the meter/hint.
 * The presentation plugin (wfz-nf-extended-editor) is expected to re-skin this.
 *
 * @package WFZ_NF_Frisbii_Connect
 */

.wfz-nffc-pw-inputwrap {
	position: relative;
	display: block;
}

.wfz-nffc-pw-input.wfz-nffc-pw-input {
	width: 100%;
	box-sizing: border-box;
	padding-right: 38px;
}

/* Scoped with .wfz-nffc-pw for enough specificity to beat theme button styles. */
.wfz-nffc-pw .wfz-nffc-pw-eye {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	background-color: transparent;
	box-shadow: none;
	text-decoration: none;
	color: #8c8f94;
	cursor: pointer;
	line-height: 0;
	opacity: 0.7;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.wfz-nffc-pw .wfz-nffc-pw-eye:hover,
.wfz-nffc-pw .wfz-nffc-pw-eye:focus {
	background: transparent;
	background-color: transparent;
	box-shadow: none;
	text-decoration: none;
	color: #50575e;
	opacity: 1;
	outline: none;
}

.wfz-nffc-pw.is-revealed .wfz-nffc-pw-eye {
	color: #50575e;
	opacity: 1;
}

/* Two eye states: crossed-out = masked (default), open = revealed. */
.wfz-nffc-pw-eye-icon {
	display: block;
}
.wfz-nffc-pw .wfz-nffc-pw-eye-on {
	display: none;
}
.wfz-nffc-pw.is-revealed .wfz-nffc-pw-eye-off {
	display: none;
}
.wfz-nffc-pw.is-revealed .wfz-nffc-pw-eye-on {
	display: block;
}

/* When Ninja Forms shows its status badge (::after, ~50px wide on the right) —
   the red error icon OR the green "pass" check — move the eye to the left of it
   and widen the input so text clears both. */
.nf-error .wfz-nffc-pw .wfz-nffc-pw-eye,
.nf-pass .wfz-nffc-pw .wfz-nffc-pw-eye {
	right: 58px;
}
.nf-error .wfz-nffc-pw .wfz-nffc-pw-input.wfz-nffc-pw-input,
.nf-pass .wfz-nffc-pw .wfz-nffc-pw-input.wfz-nffc-pw-input {
	padding-right: 86px;
}

/* Hide eye / meter when the field's settings turn them off. */
.wfz-nffc-pw[data-wfz-toggle="0"] .wfz-nffc-pw-eye {
	display: none;
}
.wfz-nffc-pw[data-wfz-meter="0"] .wfz-nffc-pw-meter {
	display: none;
}

/* Hidden until the field holds a value — the JS adds .wfz-nffc-pw-has-input on
   the first keystroke (and on "suggest a password"), so an untouched field
   shows no empty grey track. */
.wfz-nffc-pw-meter {
	display: none;
	height: 4px;
	margin-top: 6px;
	background: #e2e4e7;
	border-radius: 2px;
	overflow: hidden;
}

/* :not([data-wfz-meter="0"]) is required, not decorative: the "meter off" rule
   above has the SAME specificity and comes first, so without it this rule would
   win and re-show a meter the field's settings turned off. */
.wfz-nffc-pw.wfz-nffc-pw-has-input:not([data-wfz-meter="0"]) .wfz-nffc-pw-meter {
	display: block;
}

.wfz-nffc-pw-meter-bar {
	display: block;
	width: 0;
	height: 100%;
	background: #c8060a;
	transition: width 0.2s ease, background 0.2s ease;
}

.wfz-nffc-pw-meter-bar.wfz-nffc-pw-s0 { background: #c8060a; }
.wfz-nffc-pw-meter-bar.wfz-nffc-pw-s1 { background: #d98300; }
.wfz-nffc-pw-meter-bar.wfz-nffc-pw-s2 { background: #dbb100; }
.wfz-nffc-pw-meter-bar.wfz-nffc-pw-s3 { background: #2a7a3b; }

/* Strength advice — sits below the suggest button, above Ninja Forms' own error
   line. Carries ONLY the advice ("weak"/"medium"); every error stays with NF.
   The JS keeps this empty whenever NF has something to say, so the two can never
   both be visible — no hiding of NF's line is involved (three attempts at that
   failed live). Amber, never red: this is advice, and it never blocks. */
.wfz-nffc-pw-msg {
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.4;
	color: #9a5000;
}

/* Empty most of the time — take no room then. */
.wfz-nffc-pw-msg:empty {
	display: none;
}

/* "Suggest a strong password" text action. */
.wfz-nffc-pw .wfz-nffc-pw-suggest {
	display: inline-block;
	width: auto;
	min-height: 0;
	margin-top: 6px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	background-color: transparent;
	box-shadow: none;
	color: #50575e;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	text-decoration: underline;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.wfz-nffc-pw .wfz-nffc-pw-suggest:hover,
.wfz-nffc-pw .wfz-nffc-pw-suggest:focus {
	background: transparent;
	color: #135e96;
	box-shadow: none;
	outline: none;
}

.wfz-nffc-pw[data-wfz-suggest="0"] .wfz-nffc-pw-suggest {
	display: none;
}
