/* LD OTP Verification — Frontend Styles
   Designed to sit cleanly inside Elementor forms without fighting their CSS. */

/* -------------------------------------------------------------------------
   Field wrapper
   ------------------------------------------------------------------------- */
.ld-otp-wrap {
	width: 100%;
}

/* -------------------------------------------------------------------------
   Phone input row
   ------------------------------------------------------------------------- */
.ld-otp-phone-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ld-otp-prefix {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
	height: 100%;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	color: #333;
	white-space: nowrap;
	line-height: 40px;
	height: 40px;
}

.ld-otp-phone-input {
	flex: 1 1 160px;
	min-width: 140px;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.ld-otp-send-btn,
.ld-otp-verify-btn,
.ld-otp-resend-btn {
	display: inline-block;
	padding: 10px 18px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
	white-space: nowrap;
}

.ld-otp-send-btn {
	background: #2563eb;
	color: #fff;
}
.ld-otp-send-btn:hover:not(:disabled) {
	background: #1d4ed8;
}

.ld-otp-verify-btn {
	background: #16a34a;
	color: #fff;
}
.ld-otp-verify-btn:hover:not(:disabled) {
	background: #15803d;
}

.ld-otp-resend-btn {
	background: none;
	color: #2563eb;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	text-decoration: underline;
}
.ld-otp-resend-btn:hover {
	color: #1d4ed8;
}

.ld-otp-send-btn:disabled,
.ld-otp-verify-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   OTP code input row
   ------------------------------------------------------------------------- */
.ld-otp-verify-section {
	margin-top: 10px;
}

.ld-otp-code-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ld-otp-code-input {
	flex: 1 1 140px;
	max-width: 180px;
	letter-spacing: 4px;
	font-size: 16px;
	text-align: center;
}

/* -------------------------------------------------------------------------
   Timer row
   ------------------------------------------------------------------------- */
.ld-otp-timer-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
}

.ld-otp-timer {
	font-size: 12px;
	color: #888;
}

/* -------------------------------------------------------------------------
   Status messages
   ------------------------------------------------------------------------- */
.ld-otp-message {
	margin-top: 6px;
	font-size: 13px;
	padding: 6px 10px;
	border-radius: 4px;
	display: none;
}

.ld-otp-msg-error {
	background: #fef2f2;
	color: #dc2626;
	border-left: 3px solid #dc2626;
	display: block;
}

.ld-otp-msg-success {
	background: #f0fdf4;
	color: #16a34a;
	border-left: 3px solid #16a34a;
	display: block;
}

.ld-otp-msg-verified {
	background: #f0fdf4;
	color: #15803d;
	border-left: 3px solid #22c55e;
	font-weight: 600;
	display: block;
}

/* -------------------------------------------------------------------------
   Phone input locked after verification
   ------------------------------------------------------------------------- */
.ld-otp-phone-input[readonly] {
	background: #f9fafb;
	cursor: default;
	color: #555;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 480px) {
	.ld-otp-phone-row,
	.ld-otp-code-row {
		flex-direction: column;
		align-items: stretch;
	}

	.ld-otp-send-btn,
	.ld-otp-verify-btn {
		width: 100%;
		text-align: center;
	}

	.ld-otp-code-input {
		max-width: 100%;
	}
}
