/**
 * AnnGhar WhatsApp OTP Login - premium centered login card.
 * No Bootstrap, no jQuery, no external fonts: everything below is plain CSS driven by
 * assets/js/otp-login.js toggling the `hidden` attribute on the two `.annghar-otp-step`s.
 */

.annghar-otp-card {
	--annghar-brand: #2e6b3f;
	--annghar-brand-dark: #234f2f;
	--annghar-brand-soft: rgba(46, 107, 63, 0.09);
	--annghar-text: #1c1f1d;
	--annghar-text-muted: #6b7570;
	--annghar-border: #e3e7e4;
	--annghar-danger: #b3261e;

	width: 100%;
	max-width: 420px;
	margin: 40px auto;
	padding: 40px 36px;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 2px 8px rgba(28, 31, 29, 0.04), 0 16px 40px rgba(28, 31, 29, 0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.annghar-otp-card * {
	box-sizing: border-box;
}

.annghar-otp-form {
	margin: 0;
}

.annghar-otp-login [hidden] {
	display: none !important;
}

.annghar-otp-step {
	animation: annghar-otp-fade-in 0.35s ease;
}

@keyframes annghar-otp-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.annghar-otp-title {
	margin: 0 0 8px;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--annghar-text);
}

.annghar-otp-subtitle {
	margin: 0 0 30px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--annghar-text-muted);
}

.annghar-otp-phone-display {
	color: var(--annghar-text);
	font-weight: 600;
	word-break: break-all;
}

.annghar-otp-field {
	margin-bottom: 22px;
}

.annghar-otp-field label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--annghar-text);
}

.annghar-otp-input {
	display: block;
	width: 100%;
	padding: 14px 16px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--annghar-text);
	background: #fff;
	border: 1.5px solid var(--annghar-border);
	border-radius: 12px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.annghar-otp-input::placeholder {
	color: #a9b0ac;
}

.annghar-otp-input:focus {
	outline: none;
	border-color: var(--annghar-brand);
	box-shadow: 0 0 0 4px var(--annghar-brand-soft);
}

.annghar-otp-phone-wrap {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.annghar-otp-phone-prefix {
	display: flex;
	align-items: center;
	padding: 0 14px;
	font-size: 16px;
	font-weight: 600;
	color: var(--annghar-text-muted);
	background: #f4f6f4;
	border: 1.5px solid var(--annghar-border);
	border-radius: 12px;
	flex-shrink: 0;
}

.annghar-otp-phone-input {
	flex: 1;
	min-width: 0;
}

.annghar-otp-code-input {
	text-align: center;
	font-size: 24px;
	font-weight: 600;
	letter-spacing: 0.5em;
	font-variant-numeric: tabular-nums;
	padding-left: 12px; /* visually re-center the letter-spaced digits */
	/* Repeating cell divider behind the single input, giving the "▢▢▢▢▢▢" boxed
	   look the design calls for without splitting this into 6 separate inputs
	   (which assets/js/otp-login.js isn't written to manage per-digit focus for). */
	background-image: repeating-linear-gradient(
		90deg,
		var(--annghar-border) 0,
		var(--annghar-border) 1.5px,
		transparent 1.5px,
		transparent calc(100% / 6)
	);
	background-size: 100% 1.5px;
	background-position: bottom;
	background-repeat: no-repeat;
}

.annghar-otp-button {
	display: block;
	width: 100%;
	padding: 15px 20px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: var(--annghar-brand);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.annghar-otp-button:hover {
	background: var(--annghar-brand-dark);
}

.annghar-otp-button:active {
	transform: scale(0.99);
}

.annghar-otp-button:disabled,
.annghar-otp-button.is-busy {
	opacity: 0.65;
	cursor: progress;
}

.annghar-otp-link {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--annghar-brand);
	cursor: pointer;
	text-decoration: none;
}

.annghar-otp-link:hover {
	text-decoration: underline;
}

.annghar-otp-change-phone {
	margin-left: 6px;
}

.annghar-otp-resend-row {
	margin: 20px 0 0;
	text-align: center;
}

.annghar-otp-countdown {
	font-size: 13.5px;
	color: var(--annghar-text-muted);
	font-variant-numeric: tabular-nums;
}

.annghar-otp-message {
	margin-top: 18px;
	min-height: 1.2em;
	font-size: 13.5px;
	text-align: center;
	line-height: 1.5;
}

.annghar-otp-message.is-error {
	color: var(--annghar-danger);
}

.annghar-otp-message.is-success {
	color: var(--annghar-brand);
}

.annghar-otp-input:focus-visible,
.annghar-otp-button:focus-visible,
.annghar-otp-link:focus-visible {
	outline: 2px solid var(--annghar-brand);
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.annghar-otp-card {
		margin: 16px auto;
		padding: 32px 22px;
		border-radius: 16px;
	}

	.annghar-otp-title {
		font-size: 22px;
	}

	.annghar-otp-code-input {
		letter-spacing: 0.35em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.annghar-otp-step {
		animation: none;
	}
}
