// Strength result indicator — hidden until the user types.
#pass-strength-result {
	background: #eee;
	border: 1px solid #ddd;
	color: #23282d;
	font-size: 0.875em;
	padding: 3px 5px;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
	margin-top: 6px;
	display: none !important;

	&.short  { background: #f1adad; border-color: #e35b5b; display: block !important; }
	&.bad    { background: #fbc5a9; border-color: #f4a077; display: block !important; }
	&.good   { background: #ffe399; border-color: #ffc733; display: block !important; }
	&.strong { background: #c1e1b9; border-color: #83c373; display: block !important; }
}

// Wrapper: grid layout so the toggle button and input share the same cell
// (toggle overlaid on the right), and the caps-lock warning appended by
// WP's user-profile.js flows naturally into the next row without affecting
// the toggle button's size or alignment.
.wp-pwd {
	display: grid;

	input[type="password"],
	input[type="text"] {
		grid-row: 1;
		grid-column: 1;
		padding-right: 2em; // leave room for toggle button
	}
}

// Caps-lock warning injected by WP's user-profile.js inside .wp-pwd.
// It auto-places into row 2 of the grid, below the input.
.caps-warning {
	align-items: center;
	gap: 4px;
	font-size: 0.8em;
	color: #646970;
	margin-top: 2px;
	display: none;

	.caps-icon svg {
		width: 16px;
		height: 16px;
		display: block;
	}
}

// Toggle visibility button — overlaid on the right side of the input via grid.
// position: static overrides the password-meter extension's global
// .wp-hide-pw { position: absolute } so the button stays in grid flow.
.wp-hide-pw {
	grid-row: 1;
	grid-column: 1;
	justify-self: end;
	align-self: center;
	z-index: 1;
	position: static;
	display: flex;
	align-items: center;
	background: none;
	border: none;
	box-shadow: none;
	cursor: pointer;
	padding: 0 6px;
	color: #646970;

	&:hover,
	&:focus {
		color: #1d2327;
		background: none;
		box-shadow: none;
		border: none;
		outline: 1px solid transparent;
	}

	.dashicons {
		width: 18px;
		height: 18px;
		font-size: 18px;
		line-height: 1;
		vertical-align: middle;
	}
}

// Generate password button.
.wp-generate-pw {
	display: block;
	margin-top: 6px;
}

// Password hint / generation guideline.
.indicator-hint {
	font-size: 0.85em;
	color: #646970;
	margin-top: 4px;
}

// Weak password confirmation group — hidden until WP's script shows it.
.pw-weak {
	display: none;
	margin-top: 6px;
	font-size: 0.85em;

	.pw-checkbox {
		margin-right: 4px;
		vertical-align: middle;
	}

	label {
		cursor: pointer;
		vertical-align: middle;
	}
}
