fix(mobile): resolve iPhone SE modal height cut-off and phone input overflow

This commit is contained in:
Urvish Prajapati 2026-10-30 15:39:50 +05:30
parent 817be0ab9e
commit 92d6869c7b
2 changed files with 14 additions and 11 deletions

View File

@ -82,8 +82,8 @@ export const AuthModal: React.FC<AuthModalProps> = ({
if (!isOpen) return null;
return (
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-slate-950/70 backdrop-blur-md transition-all duration-300">
<div className="relative w-full max-w-md bg-slate-900 border border-slate-800 rounded-3xl p-6 md:p-8 space-y-6 shadow-2xl text-slate-100">
<div className="fixed inset-0 z-[100] flex items-center justify-center p-3 sm:p-4 bg-slate-950/70 backdrop-blur-md transition-all duration-300 overflow-y-auto">
<div className="relative w-full max-w-md bg-slate-900 border border-slate-800 rounded-3xl p-5 sm:p-6 md:p-8 space-y-4 sm:space-y-6 shadow-2xl text-slate-100 max-h-[92vh] overflow-y-auto my-auto">
{/* Close button */}
<button
onClick={onClose}
@ -288,8 +288,8 @@ export const AuthModal: React.FC<AuthModalProps> = ({
<label className="text-[10px] uppercase font-black tracking-wider text-slate-500 flex items-center gap-1">
<Phone className="h-3 w-3 text-indigo-400" /> Phone Number
</label>
<div className="flex gap-2">
<div className="relative">
<div className="flex gap-2 w-full">
<div className="relative shrink-0 w-[95px]">
<select
value={authDialCode}
onChange={(e) => {
@ -301,7 +301,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({
setAuthPhone(cleanPhoneInput(authPhone, rule.maxLength, false));
}
}}
className="w-[90px] bg-slate-950 border border-slate-800 rounded-xl px-3 py-2.5 text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 appearance-none"
className="w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-2.5 text-xs sm:text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 appearance-none pr-6"
>
{COUNTRY_CODES.map((cc) => (
<option key={`${cc.country}-${cc.code}`} value={cc.code}>
@ -309,6 +309,9 @@ export const AuthModal: React.FC<AuthModalProps> = ({
</option>
))}
</select>
<div className="absolute right-2.5 top-1/2 -translate-y-1/2 pointer-events-none text-slate-500 text-[10px]">
▼
</div>
</div>
<input
type="tel"
@ -316,7 +319,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({
onChange={(e) => setAuthPhone(cleanPhoneInput(e.target.value, activeRule.maxLength, false))}
placeholder={activeRule.placeholder}
maxLength={activeRule.maxLength}
className="flex-1 bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 placeholder:text-slate-700"
className="min-w-0 flex-1 bg-slate-950 border border-slate-800 rounded-xl px-3 sm:px-4 py-2.5 text-xs sm:text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 placeholder:text-slate-700"
/>
</div>
<p className="text-[10px] text-slate-500 font-medium">

View File

@ -101,8 +101,8 @@ export const PaymentSuccessModal: React.FC<PaymentSuccessModalProps> = ({
onClose();
};
return (
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-slate-950/75 backdrop-blur-md transition-all duration-300">
<div className="relative w-full max-w-xl bg-slate-900 border border-slate-800 rounded-2xl p-5 md:p-6 space-y-4 shadow-2xl text-slate-100 overflow-hidden animate-in fade-in zoom-in-95 duration-200">
<div className="fixed inset-0 z-[100] flex items-center justify-center p-3 sm:p-4 bg-slate-950/75 backdrop-blur-md transition-all duration-300 overflow-y-auto">
<div className="relative w-full max-w-xl bg-slate-900 border border-slate-800 rounded-2xl p-4 sm:p-5 md:p-6 space-y-3 sm:space-y-4 shadow-2xl text-slate-100 max-h-[92vh] overflow-y-auto my-auto animate-in fade-in zoom-in-95 duration-200">
{/* Ambient Background Glow */}
<div className="absolute -top-10 left-1/2 -translate-x-1/2 w-48 h-48 bg-emerald-500/10 rounded-full blur-3xl pointer-events-none" />
@ -254,9 +254,9 @@ export const PaymentSuccessModal: React.FC<PaymentSuccessModalProps> = ({
)}
</div>
</div>
<div className="flex justify-between items-center text-slate-400 font-semibold">
<span>Payment ID</span>
<span className="text-white font-mono font-bold bg-slate-800 px-2 py-0.5 rounded text-[10px] border border-slate-700/50">
<div className="flex justify-between items-center text-slate-400 font-semibold gap-2">
<span className="shrink-0">Payment ID</span>
<span className="text-white font-mono font-bold bg-slate-800 px-2 py-0.5 rounded text-[10px] border border-slate-700/50 break-all text-right">
{verificationResult.paymentId}
</span>
</div>