function ProfileModal({ currentUser, handleImageUpload, handleUpdateAvatar, profileAvatarUrl, setProfileAvatarUrl, setShowProfileModal, strings }) {
    return (
        <>
        <div className="fixed inset-0 bg-brand-harbor/60 backdrop-blur-md z-50 flex items-center justify-center p-4">
            <div className="bg-white border border-brand-dune/80 rounded-3xl max-w-md w-full p-8 shadow-2xl text-brand-harbor">
                <div className="flex items-center justify-between mb-6">
                    <h3 className="text-xl font-bold text-brand-harbor">{strings.updateProfile}</h3>
                    <button onClick={() => setShowProfileModal(false)} className="w-8 h-8 rounded-full bg-brand-linen hover:bg-brand-dune/40 flex items-center justify-center text-brand-steel">✕</button>
                </div>
                <form onSubmit={handleUpdateAvatar} className="space-y-6">
                    <div className="flex justify-center">
                        <img src={profileAvatarUrl || currentUser.avatar} alt="Preview" className="w-24 h-24 rounded-2xl object-cover border-2 border-brand-sky shadow-lg" />
                    </div>
                    <div>
                        <label className="block text-xs font-bold uppercase text-brand-steel mb-2">{strings.profilePic}</label>
                        <input 
                            type="file" 
                            accept="image/*"
                            onChange={(e) => handleImageUpload(e, setProfileAvatarUrl)}
                            className="w-full text-sm text-brand-steel file:mr-4 file:py-2.5 file:px-4 file:rounded-xl file:border-0 file:text-xs file:font-bold file:bg-brand-linen file:text-brand-harbor hover:file:bg-brand-dune cursor-pointer" 
                        />
                    </div>
                    <div className="flex justify-end space-x-3 rtl:space-x-reverse pt-4 border-t border-brand-dune/30">
                        <button type="button" onClick={() => setShowProfileModal(false)} className="px-5 py-2.5 rounded-2xl text-sm font-semibold text-brand-steel hover:bg-brand-linen">{strings.cancel}</button>
                        <button type="submit" className="px-5 py-2.5 rounded-2xl text-sm font-bold bg-brand-harbor hover:bg-brand-sky text-white shadow-md">{strings.save}</button>
                    </div>
                </form>
            </div>
        </div>
        </>
    );
}
