/* Auth modal — login / OTP */
.alikipa-auth {
	--alikipa-auth-accent: var(--alikipa-accent, #e11d48);
	position: fixed;
	inset: 0;
	z-index: 10060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	direction: rtl;
}

.alikipa-auth.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.alikipa-auth[hidden] {
	display: none !important;
}

.alikipa-auth.is-open[hidden] {
	display: flex !important;
}

.alikipa-auth__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 14, 20, 0.5);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.alikipa-auth__dialog {
	position: relative;
	z-index: 1;
	width: min(420px, 100%);
	max-height: min(92vh, 640px);
	overflow: auto;
	background: #fff;
	border-radius: 28px;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
	padding: 16px 22px 26px;
	transform: translateY(14px) scale(0.98);
	opacity: 0;
	transition:
		transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.18s ease;
}

.alikipa-auth.is-open .alikipa-auth__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.alikipa-auth__toolbar {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.alikipa-auth__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: #94a3b8;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.alikipa-auth__icon-btn:hover {
	background: #f1f5f9;
	color: #334155;
}

.alikipa-auth__back[hidden] {
	visibility: hidden;
	pointer-events: none;
}

.alikipa-auth__steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.alikipa-auth__step {
	display: block;
	width: 28px;
	height: 4px;
	border-radius: 999px;
	background: #f1f5f9;
}

.alikipa-auth__step.is-active {
	background: var(--alikipa-auth-accent);
}

.alikipa-auth__panel {
	display: none;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-top: 8px;
}

.alikipa-auth__panel.is-active {
	display: flex;
}

.alikipa-auth__hero-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 10px 0 18px;
	border-radius: 999px;
	background: linear-gradient(160deg, #fb7185 0%, var(--alikipa-auth-accent) 100%);
	box-shadow: 0 12px 36px color-mix(in srgb, var(--alikipa-auth-accent) 40%, transparent);
}

.alikipa-auth__hero-icon::before {
	content: '';
	position: absolute;
	inset: -16px;
	border-radius: 999px;
	background: radial-gradient(circle, color-mix(in srgb, var(--alikipa-auth-accent) 22%, transparent) 0%, transparent 70%);
	z-index: -1;
	pointer-events: none;
}

.alikipa-auth__title {
	margin: 0 0 8px;
	font-size: 1.35rem;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.4;
}

.alikipa-auth__subtitle {
	margin: 0 0 22px;
	font-size: 0.92rem;
	color: #94a3b8;
	line-height: 1.6;
}

.alikipa-auth__field {
	position: relative;
	display: block;
	width: 100%;
	margin-bottom: 14px;
}

.alikipa-auth__field-icon {
	position: absolute;
	top: 50%;
	inset-inline-end: 14px;
	transform: translateY(-50%);
	color: #94a3b8;
	pointer-events: none;
	display: inline-flex;
}

.alikipa-auth__field-ok {
	position: absolute;
	top: 50%;
	inset-inline-start: 12px;
	transform: translateY(-50%);
	display: inline-flex;
}

.alikipa-auth__input {
	width: 100%;
	min-height: 52px;
	padding: 12px 46px 12px 42px;
	border: 1.5px solid #e2e8f0;
	border-radius: 16px;
	background: #fff;
	font-size: 1rem;
	font-family: inherit;
	color: #0f172a;
	text-align: center;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.alikipa-auth__input::placeholder {
	color: #cbd5e1;
	text-align: right;
}

.alikipa-auth__input:focus {
	border-color: color-mix(in srgb, var(--alikipa-auth-accent) 55%, #e2e8f0);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--alikipa-auth-accent) 12%, transparent);
}

.alikipa-auth__field.is-valid .alikipa-auth__input {
	border-color: #86efac;
}

.alikipa-auth__error {
	width: 100%;
	margin: 0 0 10px;
	font-size: 0.85rem;
	color: #dc2626;
	text-align: right;
}

.alikipa-auth__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	margin-top: 6px;
	padding: 12px 18px;
	border: 0;
	border-radius: 16px;
	background: var(--alikipa-auth-accent);
	color: #fff;
	font-size: 1rem;
	font-weight: 800;
	font-family: inherit;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease, transform 0.12s ease;
}

.alikipa-auth__submit:hover:not(:disabled) {
	filter: brightness(1.05);
}

.alikipa-auth__submit:active:not(:disabled) {
	transform: scale(0.99);
}

.alikipa-auth__submit:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.alikipa-auth__otp {
	position: relative;
	display: flex;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-bottom: 16px;
	direction: ltr;
}

/* Receives SMS OTP suggestion; kept off-layout so cells stay tappable. */
.alikipa-auth__otp-autofill {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	opacity: 0;
}

.alikipa-auth__otp-cell {
	width: 48px;
	height: 54px;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	background: #fff;
	text-align: center;
	font-size: 1.25rem;
	font-weight: 700;
	font-family: inherit;
	color: #0f172a;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.alikipa-auth__otp-cell:focus {
	border-color: color-mix(in srgb, var(--alikipa-auth-accent) 55%, #e2e8f0);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--alikipa-auth-accent) 12%, transparent);
}

.alikipa-auth__resend-row {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0 0 16px;
}

.alikipa-auth__timer {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
}

.alikipa-auth__timer[hidden] {
	display: none !important;
}

.alikipa-auth__resend {
	margin: 0;
	padding: 8px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--alikipa-auth-accent, #e85d04);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.alikipa-auth__resend[hidden] {
	display: none !important;
}

.alikipa-auth__resend:disabled {
	opacity: 0.6;
	cursor: wait;
	text-decoration: none;
}

body.alikipa-auth-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.alikipa-auth__dialog {
		border-radius: 24px;
		padding: 14px 16px 22px;
	}

	.alikipa-auth__otp-cell {
		width: 42px;
		height: 50px;
	}
}
