/**
 * The code field, as a row of single-character boxes.
 *
 * Loaded by the checkout dialog, the login form and the signup form alike, so
 * a code looks and behaves the same wherever a customer is asked for one. The
 * Glass preset repaints these; this file is what Classic gets, and what any
 * theme sees before a preset is applied.
 */
.e4g-otp-digits {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0 0 16px;
	/* A code reads left to right in every language this plugin is shown in. */
	direction: ltr;
}

.e4g-otp-digits .e4g-otp-digit {
	/* Shrink to fit rather than hold a width: the cards these sit in are
	   sized in percentages, and six fixed boxes overflow a narrow one.
	   The !important answers input[type=text]{width:100% !important}, which
	   several of the plugin's own stylesheets set. */
	flex: 1 1 0;
	min-width: 0;
	width: auto !important;
	max-width: 48px !important;
	height: 56px;
	padding: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: normal;
	text-align: center;
	color: #101828;
	background: #fff;
	border: 1px solid #cfd4dc;
	border-radius: 10px;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-moz-appearance: textfield;
}

.e4g-otp-digits .e4g-otp-digit::-webkit-outer-spin-button,
.e4g-otp-digits .e4g-otp-digit::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.e4g-otp-digits .e4g-otp-digit:focus {
	outline: none;
	border-color: var(--e4g-brand, #e97510);
	box-shadow: 0 0 0 3px rgba(233, 117, 16, .2);
}

/* Set by the script: progress through the code is visible without counting. */
.e4g-otp-digits .e4g-otp-digit.is-filled {
	border-color: var(--e4g-brand, #e97510);
	box-shadow: inset 0 0 0 1px var(--e4g-brand, #e97510);
}

/* The resend, offered as a sentence rather than a button competing with the
   confirm next to it. */
.e4g-otp-resend-line {
	display: flex;
	align-items: baseline;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 0;
	font-size: 14px;
}

.e4g-otp-resend-line .e4g-otp-resend {
	display: inline;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font: inherit;
	font-weight: 700;
	line-height: inherit;
	color: var(--e4g-brand, #e97510) !important;
	cursor: pointer;
}

.e4g-otp-resend-line .e4g-otp-resend[disabled] {
	cursor: default;
	/* Still brand-coloured while counting down: greyed out reads as broken
	   rather than as not yet. */
	opacity: 1;
}

.e4g-otp-resend-line .e4g-otp-resend:not([disabled]):hover {
	text-decoration: underline;
}

@media (max-width: 420px) {
	.e4g-otp-digits { gap: 6px; }
	.e4g-otp-digits .e4g-otp-digit {
		max-width: 42px !important;
		height: 50px;
		font-size: 20px;
	}
}
