/**
 * JezPress OTP Verification — frontend field styles.
 *
 * A single bordered input group holds the country code (inline) and the
 * number; a helper line and a full-width action button sit beneath it.
 *
 * @package JezPress\OTP_Verification
 * @since   1.0.0
 */

.jpov-otp {
	--jpov-accent: #5b6ee1;
	--jpov-accent-hover: #4453c9;
	--jpov-border: #d6dae3;
	--jpov-radius: 10px;
	max-width: 520px;
}

/* Input group: country + number share one bordered, rounded container. */
.jpov-otp__group {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--jpov-border);
	border-radius: var(--jpov-radius);
	background: #fff;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jpov-otp__group:focus-within {
	border-color: var(--jpov-accent);
	box-shadow: 0 0 0 3px rgba(91, 110, 225, 0.18);
}

/* Country selector styled as an inline segment (e.g. "AU +61"). */
.jpov-otp__country {
	flex: 0 0 auto;
	border: 0;
	border-right: 1px solid #eceef3;
	background: #f4f5f9;
	padding: 0 28px 0 12px;
	font-weight: 600;
	font-size: 14px;
	color: #2a2f3a;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23667' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
}

.jpov-otp__local,
.jpov-otp__phone,
.jpov-otp__code {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 12px 14px;
	font-size: 16px;
	color: #1f2430;
	outline: none;
	box-shadow: none;
}

.jpov-otp__local::placeholder,
.jpov-otp__phone::placeholder,
.jpov-otp__code::placeholder {
	color: #9aa0ac;
}

/* Helper line under the number. */
.jpov-otp__help {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 8px 2px 0;
	font-size: 13px;
	line-height: 1.4;
	color: #6b7280;
}

.jpov-otp__help-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border: 1px solid #c2c7d0;
	border-radius: 50%;
	font-size: 11px;
	font-style: italic;
	font-family: Georgia, "Times New Roman", serif;
	color: #6b7280;
}

/* Full-width action buttons with an icon. */
.jpov-otp__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 12px;
	padding: 12px 16px;
	border: 0;
	border-radius: var(--jpov-radius);
	background: var(--jpov-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.04s ease, opacity 0.15s ease;
}

.jpov-otp__btn:hover {
	background: var(--jpov-accent-hover);
	color: #fff;
}

.jpov-otp__btn:active {
	transform: translateY(1px);
}

.jpov-otp__btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.jpov-otp__icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

/* Code entry row (shown after a code is sent). */
.jpov-otp__code-row {
	margin-top: 12px;
}

/* Status message. */
.jpov-otp__status {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	min-height: 1.2em;
}

.jpov-otp__status[data-state="error"] {
	color: #b32d2e;
}

.jpov-otp__status[data-state="success"] {
	color: #1a7f37;
}

.jpov-otp__status[data-state="info"] {
	color: #555;
}

/* Verified state. */
.jpov-otp--verified .jpov-otp__group {
	border-color: #1a7f37;
	background: #f3faf4;
}

/* Form-editor preview. */
.jpov-otp--preview {
	padding: 10px;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	color: #50575e;
	font-style: italic;
}
