/* WPC SMS Verify. Colours follow the theme where it sets --primary-color. */

.wpc-smsv {
	--wpc-smsv-accent: var(--primary-color, #f39c32);
	--wpc-smsv-error: #b3261e;
	--wpc-smsv-success: #1e7b34;
	margin-top: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.wpc-smsv [hidden] {
	display: none !important;
}

.gfield.wpc-sms-verify .iti {
	display: block;
	width: 100%;
}

/* Gravity Forms sets padding: 8px on every search input in the form, which wipes the
   left padding the country search box needs for its magnifying glass icon. Put it back. */
.gform_wrapper .gfield.wpc-sms-verify .iti input.iti__search-input {
	height: auto;
	padding: 10px calc(var(--iti-spacer-horizontal) + var(--iti-clear-icon-size) + var(--iti-spacer-horizontal)) 10px calc(var(--iti-spacer-horizontal) + var(--iti-globe-icon-size) + var(--iti-spacer-horizontal));
	border: 0;
	border-radius: 0;
}

.wpc-smsv-hint {
	margin: 0 0 0.5rem;
	color: #555;
}

.wpc-smsv-turnstile:empty {
	display: none;
}

.wpc-smsv-turnstile {
	margin-bottom: 0.5rem;
}

.wpc-smsv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0.5rem 1.25rem;
	border: 1px solid var(--wpc-smsv-accent);
	border-radius: 999px;
	background: #fff;
	color: #222;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.wpc-smsv-btn:hover:not(:disabled),
.wpc-smsv-btn:focus-visible {
	background: var(--wpc-smsv-accent);
	color: #fff;
}

.wpc-smsv-btn:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

.wpc-smsv-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.wpc-smsv-code-label {
	display: block;
	margin-bottom: 0.375rem;
	font-weight: 500;
}

.wpc-smsv-number {
	white-space: nowrap;
}

.wpc-smsv-code-inputs {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.wpc-smsv-code-input {
	flex: 0 1 9rem;
	min-width: 0;
	min-height: 40px;
	padding: 0.375rem 0.75rem;
	font-size: 1.125rem;
	letter-spacing: 0.25em;
	font-variant-numeric: tabular-nums;
}

.wpc-smsv-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin-top: 0.375rem;
}

.wpc-smsv-btn.wpc-smsv-link {
	min-height: 32px;
	padding: 0.25rem 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: #222;
	font-weight: 500;
	text-decoration: underline;
}

.wpc-smsv-btn.wpc-smsv-link:hover:not(:disabled),
.wpc-smsv-btn.wpc-smsv-link:focus-visible {
	background: none;
	color: var(--wpc-smsv-accent);
}

.wpc-smsv-btn.wpc-smsv-link:disabled {
	text-decoration: none;
}

.wpc-smsv-done {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1rem;
}

.wpc-smsv-done-text {
	color: var(--wpc-smsv-success);
	font-weight: 600;
}

.wpc-smsv-done-text::before {
	content: "\2713\00a0";
}

.wpc-smsv-status {
	margin: 0.375rem 0 0;
	min-height: 1px;
}

.wpc-smsv-status:empty {
	margin: 0;
}

.wpc-smsv-status.is-error {
	color: var(--wpc-smsv-error);
}

.wpc-smsv-status.is-info {
	color: #555;
}

.wpc-smsv-status.is-success {
	display: none; /* The verified row already says it. Screen readers still hear it via role="status". */
}

.wpc-smsv-is-verified input[readonly] {
	background: #f6f6f6;
}

/* The country list must sit above modal popups such as the theme's download popup (z-index 99999). */
.iti--detached-country-selector,
.iti--fullscreen-popup {
	z-index: 100001;
}
