/**
 * The sign-in form. Sized in em and left mostly unstyled so it inherits the
 * theme it lands in — this appears on wp-login.php and on whatever page the
 * shortcode is dropped into, and those rarely look anything alike.
 */

.wakit-otp {
	/* Repeated rather than shared with admin.css: that stylesheet is only ever
	   loaded on the plugin's own admin screens, and this form renders on
	   wp-login.php and on whatever page the shortcode is dropped into. */
	--wakit-primary: #22c55e;
	--wakit-primary-hover: #16a34a;
	--wakit-primary-active: #15803d;

	margin: 1.25em 0;
	max-width: 22em;
}

.wakit-otp__title {
	font-size: 1.1em;
	margin: 0 0 0.6em;
}

.wakit-otp label {
	display: block;
	font-size: 0.85em;
	margin-bottom: 0.25em;
}

.wakit-otp input[type='tel'],
.wakit-otp input[type='text'] {
	box-sizing: border-box;
	margin-bottom: 0.6em;
	padding: 0.45em 0.6em;
	width: 100%;
}

.wakit-otp__code {
	font-size: 1.2em;
	letter-spacing: 0.3em;
}

.wakit-otp input[type='tel']:focus,
.wakit-otp input[type='text']:focus {
	border-color: var( --wakit-primary );
	box-shadow: 0 0 0 1px var( --wakit-primary );
	outline: 2px solid transparent;
}

/*
 * The one button that signs the visitor in, painted rather than inherited.
 * On wp-login.php it would otherwise be core's blue, and inside a theme it
 * would be whatever that theme makes of .button — neither says Wakit, and the
 * two never match each other. Sized in em so it still takes the surrounding
 * type, which is the rest of this form's rule.
 */
.wakit-otp button.wakit-otp__verify {
	background: var( --wakit-primary );
	border: 1px solid var( --wakit-primary );
	border-radius: 4px;
	color: #fff;
	cursor: pointer;
	padding: 0.45em 1.1em;
	text-shadow: none;
}

.wakit-otp button.wakit-otp__verify:hover,
.wakit-otp button.wakit-otp__verify:focus {
	background: var( --wakit-primary-hover );
	border-color: var( --wakit-primary-hover );
	color: #fff;
}

.wakit-otp button.wakit-otp__verify:active {
	background: var( --wakit-primary-active );
	border-color: var( --wakit-primary-active );
	color: #fff;
}

.wakit-otp__message {
	font-size: 0.85em;
	margin-bottom: 0.6em;
}

.wakit-otp__message:empty {
	display: none;
}

.wakit-otp__message.is-error {
	color: #b32d2e;
}

.wakit-otp__link {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: block;
	font-size: 0.8em;
	margin-top: 0.5em;
	opacity: 0.75;
	padding: 0;
	text-decoration: underline;
}

/* On wp-login.php, separate it from the password form above. */
.login .wakit-otp-login-slot {
	border-top: 1px solid #dcdcde;
	margin-top: 1em;
	padding-top: 1em;
}
